Skip to content
Permalink
Browse files

Work on CMake build system

Try to get unixsim to compile, but it currently has linking problems
  • Loading branch information...
dziegel committed Apr 25, 2018
1 parent 2a10cb3 commit cce6cd11ffc1e0bddcb5a9c96674d1a7ae73e36f
Showing with 73 additions and 0 deletions.
  1. +1 −0 .gitignore
  2. +35 −0 CMakeLists.txt
  3. +14 −0 ports/unix/CMakeLists.txt
  4. +23 −0 ports/unix/unixsim/CMakeLists.txt
@@ -3,6 +3,7 @@
*.a
*lwip_unittests.xml
.depend
/ports/unix/unixsim/build
/ports/unix/unixsim/simhost
/ports/unix/unixsim/simrouter
/ports/unix/unixsim/simnode
@@ -0,0 +1,35 @@
set(lwipcontribexamples_SRCS
examples/httpd/fs_example/fs_example.c
examples/httpd/ssi_example/ssi_example.c
examples/lwiperf/lwiperf_example.c
examples/mdns/mdns_example.c
examples/mqtt/mqtt_example.c
examples/ppp/pppos_example.c
examples/snmp/snmp_private_mib/lwip_prvmib.c
examples/snmp/snmp_v3/snmpv3_dummy.c
examples/snmp/snmp_example.c
examples/sntp/sntp_example.c
examples/tftp/tftp_example.c
)
add_library(lwipcontribexamples EXCLUDE_FROM_ALL ${lwipcontribexamples_SRCS})

set(lwipcontribapps_SRCS
apps/httpserver/httpserver-netconn.c
apps/chargen/chargen.c
apps/udpecho/udpecho.c
apps/tcpecho/tcpecho.c
apps/shell/shell.c
apps/udpecho_raw/udpecho_raw.c
apps/tcpecho_raw/tcpecho_raw.c
apps/netio/netio.c
apps/ping/ping.c
apps/socket_examples/socket_examples.c
apps/rtp/rtp.c
)
add_library(lwipcontribapps EXCLUDE_FROM_ALL ${lwipcontribapps_SRCS})

set(lwipcontribaddons_SRCS
addons/tcp_isn/tcp_isn.c
addons/ipv6_static_routing/ip6_route_table.c
)
add_library(lwipcontribaddons EXCLUDE_FROM_ALL ${lwipcontribaddons_SRCS})
@@ -0,0 +1,14 @@
set(lwipcontribportunix_SRCS
port/sys_arch.c
port/perf.c
port/netif/tapif.c
port/netif/tunif.c
port/netif/unixif.c
port/netif/list.c
port/netif/tcpdump.c
port/netif/delif.c
port/netif/sio.c
port/netif/fifo.c
)

add_library(lwipcontribportunix EXCLUDE_FROM_ALL ${lwipcontribportunix_SRCS})
@@ -0,0 +1,23 @@
cmake_minimum_required(VERSION 3.8)

include_directories(lwip PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../lwip/src/include"
"${CMAKE_CURRENT_SOURCE_DIR}/../../../"
"${CMAKE_CURRENT_SOURCE_DIR}/../port/include"
"${CMAKE_CURRENT_SOURCE_DIR}/./"
)

add_subdirectory(../../../ contrib)
add_subdirectory(../../../../lwip/src lwip)
add_subdirectory(../ unixport)

link_libraries(pthread)

add_executable(simhost simhost.c)
target_link_libraries(simhost lwipcontribportunix lwipcontribexamples lwipcontribapps lwipcontribaddons lwip)

add_executable(simnode simnode.c)
target_link_libraries(simnode lwipcontribportunix lwipcontribexamples lwipcontribapps lwipcontribaddons lwip)

add_executable(simrouter simrouter.c)
target_link_libraries(simrouter lwipcontribportunix lwipcontribexamples lwipcontribapps lwipcontribaddons lwip)

0 comments on commit cce6cd1

Please sign in to comment.
You can’t perform that action at this time.