• source navigation  • diff markup  • identifier search  • freetext search  • 

Sources/netifd/CMakeLists.txt

  1 cmake_minimum_required(VERSION 2.6)
  2 
  3 PROJECT(netifd C)
  4 
  5 IF(NOT ${CMAKE_VERSION} LESS 3.0)
  6   include(CheckCCompilerFlag)
  7   check_c_compiler_flag(-Wimplicit-fallthrough HAS_IMPLICIT_FALLTHROUGH)
  8 ENDIF()
  9 
 10 ADD_DEFINITIONS(-Os -Wall -Werror --std=gnu99 -Wmissing-declarations -Wno-unknown-warning-option -Wno-format-truncation)
 11 
 12 IF(HAS_IMPLICIT_FALLTHROUGH)
 13   ADD_DEFINITIONS(-Wimplicit-fallthrough)
 14 ENDIF()
 15 
 16 SET(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "")
 17 
 18 SET(SOURCES
 19         main.c utils.c system.c tunnel.c handler.c
 20         interface.c interface-ip.c interface-event.c
 21         iprule.c proto.c proto-static.c proto-shell.c
 22         config.c device.c bridge.c veth.c vlan.c alias.c
 23         macvlan.c ubus.c vlandev.c wireless.c)
 24 
 25 
 26 SET(LIBS
 27         ubox ubus uci json-c blobmsg_json)
 28 
 29 IF (NOT DEFINED LIBNL_LIBS)
 30   FIND_LIBRARY(libnl NAMES libnl-3 libnl nl-3 nl)
 31   SET(LIBNL_LIBS ${libnl})
 32 ENDIF()
 33 
 34 IF("${CMAKE_SYSTEM_NAME}" MATCHES "Linux" AND NOT DUMMY_MODE)
 35         SET(SOURCES ${SOURCES} system-linux.c)
 36         SET(LIBS ${LIBS} ${LIBNL_LIBS})
 37 ELSE()
 38         ADD_DEFINITIONS(-DDUMMY_MODE=1)
 39         SET(SOURCES ${SOURCES} system-dummy.c)
 40 ENDIF()
 41 
 42 IF(DEBUG)
 43   ADD_DEFINITIONS(-DDEBUG -g3)
 44   IF(NO_OPTIMIZE)
 45     ADD_DEFINITIONS(-O0)
 46   ENDIF()
 47 ENDIF()
 48 
 49 
 50 ADD_EXECUTABLE(netifd ${SOURCES})
 51 
 52 TARGET_LINK_LIBRARIES(netifd ${LIBS})
 53 
 54 INSTALL(TARGETS netifd
 55         RUNTIME DESTINATION sbin
 56 )

This page was automatically generated by LXR 0.3.1.  •  OpenWrt