summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2013-11-14 13:41:13 +0100
committerJohn Crispin <blogic@openwrt.org>2013-11-15 17:05:20 +0100
commit916f95cb58604038695347ee41a430d8ca1f0556 (patch)
tree5dbb52a6adaf28c6c6989ea37e6975aa52075160 /CMakeLists.txt
parentf9d31edb8938341b9217ee4c14eb58111414eb97 (diff)
downloadprocd-916f95cb58604038695347ee41a430d8ca1f0556.tar.gz
debloat and reorganize code
split app into procd and init binaries remove log support, this is an external service now Signed-off-by: John Crispin <blogic@openwrt.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt32
1 files changed, 10 insertions, 22 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a521ea7..d353801 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,9 @@ IF(APPLE)
LINK_DIRECTORIES(/opt/local/lib)
ENDIF()
-SET(SOURCES main.c ubus.c service.c service_validate.c instance.c utils.c md5.c hotplug.c state.c mkdev.c early.c inittab.c preinit.c coldplug.c syslog.c log.c watchdog.c signal.c system.c debug.c rcS.c trigger.c measure.c)
+SET(SOURCES procd.c signal.c watchdog.c state.c inittab.c rcS.c ubus.c system.c
+ service/service.c service/instance.c service/validate.c service/trigger.c
+ plug/coldplug.c plug/hotplug.c utils/utils.c utils/md5.c)
find_library(json NAMES json-c json)
SET(LIBS ubox ubus ${json} blobmsg_json json_script)
@@ -19,42 +21,28 @@ IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -g3)
ENDIF()
-ADD_LIBRARY(validate SHARED validate.c)
-
-INSTALL(TARGETS validate
- LIBRARY DESTINATION lib
-)
ADD_EXECUTABLE(procd ${SOURCES})
-
-TARGET_LINK_LIBRARIES(procd ${LIBS} validate)
-
+TARGET_LINK_LIBRARIES(procd ${LIBS})
INSTALL(TARGETS procd
RUNTIME DESTINATION sbin
)
-ADD_EXECUTABLE(askfirst askfirst.c)
-INSTALL(TARGETS askfirst
+ADD_EXECUTABLE(init initd/init.c initd/early.c initd/preinit.c initd/mkdev.c watchdog.c)
+TARGET_LINK_LIBRARIES(init ${LIBS})
+INSTALL(TARGETS init
RUNTIME DESTINATION sbin
)
-ADD_EXECUTABLE(udevtrigger udevtrigger.c)
+ADD_EXECUTABLE(udevtrigger plug/udevtrigger.c)
INSTALL(TARGETS udevtrigger
RUNTIME DESTINATION sbin
)
-ADD_EXECUTABLE(logread logread.c)
-TARGET_LINK_LIBRARIES(logread ${LIBS})
-INSTALL(TARGETS logread
- RUNTIME DESTINATION sbin
-)
-
-ADD_EXECUTABLE(validate_data validate_data.c)
-TARGET_LINK_LIBRARIES(validate_data ${LIBS} validate)
-
-INSTALL(TARGETS validate_data
+ADD_EXECUTABLE(askfirst utils/askfirst.c)
+INSTALL(TARGETS askfirst
RUNTIME DESTINATION sbin
)