From: Felix Fietkau Date: Wed, 29 Jun 2022 18:35:29 +0000 (+0200) Subject: build: move some code to libunet X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=ef05d9efd15d2c0e08685d663b465f666d6edff6;p=project%2Funetd.git build: move some code to libunet Signed-off-by: Felix Fietkau --- 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 )