From ef05d9efd15d2c0e08685d663b465f666d6edff6 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 29 Jun 2022 20:35:29 +0200 Subject: [PATCH] build: move some code to libunet Signed-off-by: Felix Fietkau --- CMakeLists.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ac58f1..b51fc44 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,7 +5,6 @@ PROJECT(unetd C) SET(SOURCES main.c network.c host.c service.c pex.c utils.c - curve25519.c siphash.c wg.c wg-dummy.c wg-user.c ) @@ -31,10 +30,13 @@ ELSE() SET(ubus "") ENDIF() +ADD_LIBRARY(unet SHARED curve25519.c siphash.c) +TARGET_LINK_LIBRARIES(unet ubox) + ADD_EXECUTABLE(unetd ${SOURCES}) -TARGET_LINK_LIBRARIES(unetd ubox ${ubus} blobmsg_json ${libjson} ${nl} ${bpf}) +TARGET_LINK_LIBRARIES(unetd unet ubox ${ubus} blobmsg_json ${libjson} ${nl} ${bpf}) -INSTALL(TARGETS unetd +INSTALL(TARGETS unetd unet RUNTIME DESTINATION sbin LIBRARY DESTINATION lib ) -- 2.30.2