Remove memory allocation in olsr_timer_add()
[oonf.git] / src / core / CMakeLists.txt
1 SET(OONF_CORE_SRCS olsr_cfg.c
2                    olsr_clock.c
3                    olsr_http.c
4                    olsr_interface.c
5                    olsr_logging_cfg.c
6                    olsr_logging.c
7                    olsr_memcookie.c
8                    olsr_netaddr_acl.c
9                    olsr_packet_socket.c
10                    olsr_plugins.c
11                    olsr_socket.c
12                    olsr_stream_socket.c
13                    olsr_telnet.c
14                    olsr_timer.c
15                    olsr.c
16                    os_net_generic.c
17                    os_system_generic.c)
18                    
19 # add os_specific source files
20 IF(WIN32)
21     FILE(GLOB SRCS "os_win32/*.c")    
22     set(OONF_SRCS ${OONF_SRCS} ${SRCS})
23 ENDIF(WIN32)
24
25 IF(LINUX)
26     SET(OONF_CORE_SRCS ${OONF_CORE_SRCS}
27                        os_linux/os_net_linux.c
28                        os_linux/os_system_linux.c
29                        os_linux/os_routing_linux.c)
30 ENDIF(LINUX)
31
32 IF(BSD)
33     FILE(GLOB SRCS "os_bsd/*.c")    
34     set(OONF_SRCS ${OONF_SRCS} ${SRCS})
35 ENDIF(BSD)
36
37 IF(ANDROID)
38     include_directories(src/android)
39     FILE(GLOB SRCS "android/*.c")    
40     set(OONF_SRCS ${OONF_SRCS} ${SRCS})
41 ENDIF(ANDROID)
42
43 ADD_LIBRARY(static_core STATIC ${OONF_CORE_SRCS})
44 ADD_LIBRARY(${OONF_LIBPREFIX}_core SHARED ${OONF_CORE_SRCS})
45
46 IF(WIN32)
47     TARGET_LINK_LIBRARIES(static_core static_common)
48     TARGET_LINK_LIBRARIES(${OONF_LIBPREFIX}_core ${OONF_LIBPREFIX}_common)
49
50     TARGET_LINK_LIBRARIES(static_config static_regex)
51     TARGET_LINK_LIBRARIES(${OONF_LIBPREFIX}_config ${OONF_LIBPREFIX}_regex)
52
53     TARGET_LINK_LIBRARIES(static_core static_config)
54     TARGET_LINK_LIBRARIES(${OONF_LIBPREFIX}_core ${OONF_LIBPREFIX}_config)
55
56     TARGET_LINK_LIBRARIES(static_core ws2_32 iphlpapi)
57     TARGET_LINK_LIBRARIES(${OONF_LIBPREFIX}_core ws2_32 iphlpapi)
58 ENDIF(WIN32)