ADD_DEFINITIONS(-DDEBUG -g3)
ENDIF()
-IF(CMAKE_SYSTEM_PROCESSOR STREQUAL "mips")
add_subdirectory(upgraded)
-ENDIF()
ADD_EXECUTABLE(procd ${SOURCES})
TARGET_LINK_LIBRARIES(procd ${LIBS})
PROJECT(upgraded C)
ADD_DEFINITIONS(-Os -ggdb -Wall -Werror --std=gnu99 -Wmissing-declarations)
-set(CMAKE_EXE_LINKER_FLAGS -static)
+set(CMAKE_EXE_LINKER_FLAGS "-static -fPIC")
set(CMAKE_FIND_LIBRARY_SUFFIXES .a)
set(CMAKE_EXE_LINK_DYNAMIC_C_FLAGS)
set(CMAKE_EXE_LINK_DYNAMIC_CXX_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
ADD_EXECUTABLE(upgraded upgraded.c ../watchdog.c)
-TARGET_LINK_LIBRARIES(upgraded ubox rt)
+TARGET_LINK_LIBRARIES(upgraded ubox rt -lc -lgcc_pic)
INSTALL(TARGETS upgraded
RUNTIME DESTINATION sbin
)