summaryrefslogtreecommitdiff
path: root/src/ipcpd/udp/CMakeLists.txt
diff options
context:
space:
mode:
authorDimitri Staessens <[email protected]>2017-12-18 20:50:04 +0100
committerSander Vrijders <[email protected]>2017-12-19 10:27:02 +0100
commite5cc7fbcf165ef9c205b6c136f239f645a8d7830 (patch)
tree334120a6cc6dcbe240076b3957233da337bf7ad2 /src/ipcpd/udp/CMakeLists.txt
parentd654c997f142b22e2529dc0fb9fab4f799f7ef56 (diff)
downloadouroboros-e5cc7fbcf165ef9c205b6c136f239f645a8d7830.tar.gz
ouroboros-e5cc7fbcf165ef9c205b6c136f239f645a8d7830.zip
ipcpd: Use the term "layer" and deprecate "shim"
This changes the terminology to use layer instead of DIF and deprecate the word "shim" for the IPCPs that attach to Ethernet LLC and UDP .The terminology has not yet been changed in the variable names etc. This reflects the design choices in Ouroboros to make IPCPs pure resource allocators instead of also providing an "IPC service". The Ouroboros IPCPs that attach to Ethernet and UDP implement the allocator and are thus not really shims. Signed-off-by: Dimitri Staessens <[email protected]> Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/ipcpd/udp/CMakeLists.txt')
-rw-r--r--src/ipcpd/udp/CMakeLists.txt60
1 files changed, 60 insertions, 0 deletions
diff --git a/src/ipcpd/udp/CMakeLists.txt b/src/ipcpd/udp/CMakeLists.txt
new file mode 100644
index 00000000..20c1b58e
--- /dev/null
+++ b/src/ipcpd/udp/CMakeLists.txt
@@ -0,0 +1,60 @@
+get_filename_component(CURRENT_SOURCE_PARENT_DIR
+ ${CMAKE_CURRENT_SOURCE_DIR} DIRECTORY)
+get_filename_component(CURRENT_BINARY_PARENT_DIR
+ ${CMAKE_CURRENT_BINARY_DIR} DIRECTORY)
+
+include_directories(${CMAKE_CURRENT_SOURCE_DIR})
+include_directories(${CMAKE_CURRENT_BINARY_DIR})
+
+include_directories(${CURRENT_SOURCE_PARENT_DIR})
+include_directories(${CURRENT_BINARY_PARENT_DIR})
+
+include_directories(${CMAKE_SOURCE_DIR}/include)
+include_directories(${CMAKE_BINARY_DIR}/include)
+
+set(IPCP_UDP_TARGET ipcpd-udp CACHE INTERNAL "")
+
+set(UDP_SOURCES
+ # Add source files here
+ ${CMAKE_CURRENT_SOURCE_DIR}/main.c)
+
+add_executable(ipcpd-udp ${UDP_SOURCES} ${IPCP_SOURCES})
+target_link_libraries(ipcpd-udp LINK_PUBLIC ouroboros-dev)
+
+# Find the nsupdate executable
+find_program(NSUPDATE_EXECUTABLE
+ NAMES nsupdate
+ DOC "The nsupdate tool that enables DDNS")
+
+# Find the nslookup executable
+find_program(NSLOOKUP_EXECUTABLE
+ NAMES nslookup
+ DOC "The nslookup tool that resolves DNS names")
+
+mark_as_advanced(NSLOOKUP_EXECUTABLE NSUPDATE_EXECUTABLE)
+
+if (NSLOOKUP_EXECUTABLE AND NSUPDATE_EXECUTABLE)
+ set(DISABLE_DDNS FALSE CACHE BOOL "Disable DDNS support")
+ if (NOT DISABLE_DNS)
+ message(STATUS "DDNS support enabled")
+ set(HAVE_DDNS TRUE CACHE INTERNAL "")
+ else ()
+ message(STATUS "DDNS support disabled by user")
+ unset(HAVE_DDNS CACHE)
+ endif ()
+else ()
+ if (NSLOOKUP_EXECUTABLE)
+ message(STATUS "Install nsupdate to enable DDNS support")
+ elseif (NSUPDATE_EXECUTABLE)
+ message(STATUS "Install nslookup to enable DDNS support")
+ else ()
+ message(STATUS "Install nslookup and nsupdate to enable DDNS support")
+ endif ()
+endif ()
+
+include(AddCompileFlags)
+if (CMAKE_BUILD_TYPE MATCHES "Debug*")
+ add_compile_flags(ipcpd-udp -DCONFIG_OUROBOROS_DEBUG)
+endif ()
+
+install(TARGETS ipcpd-udp RUNTIME DESTINATION sbin)