service/service.c service/instance.c service/validate.c service/trigger.c service/watch.c
plug/coldplug.c plug/hotplug.c utils/utils.c)
-find_library(json NAMES json-c json)
-SET(LIBS ubox ubus ${json} blobmsg_json json_script)
+SET(LIBS ubox ubus json-c blobmsg_json json_script)
IF(DEBUG)
ADD_DEFINITIONS(-DDEBUG -g3)
ENDIF()
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips")
-add_subdirectory(upgraded)
+IF(ZRAM_TMPFS)
+ ADD_DEFINITIONS(-DZRAM_TMPFS)
+ SET(SOURCES_ZRAM initd/zram.c)
+ENDIF()
+
+IF(BUILD_UPGRADED)
+ add_subdirectory(upgraded)
ENDIF()
ADD_EXECUTABLE(procd ${SOURCES})
)
-ADD_EXECUTABLE(init initd/init.c initd/early.c initd/preinit.c initd/mkdev.c watchdog.c)
+ADD_EXECUTABLE(init initd/init.c initd/early.c initd/preinit.c initd/mkdev.c watchdog.c
+ utils/utils.c ${SOURCES_ZRAM})
TARGET_LINK_LIBRARIES(init ${LIBS})
INSTALL(TARGETS init
RUNTIME DESTINATION sbin