mss-bpf: remove unused-but-set variable
[project/unetd.git] / CMakeLists.txt
index 4ac58f1c82babf49e44e61f6bc41c17fd6f276d0..492f1b7a6cec4eb92a17d939b8532921f579a12e 100644 (file)
@@ -5,8 +5,7 @@ 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
+       wg.c wg-user.c
 )
 
 SET(RUNSTATEDIR /var/run)
@@ -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
 )