-
Notifications
You must be signed in to change notification settings - Fork 5
/
CMakeLists.txt
64 lines (48 loc) · 2.62 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
cmake_minimum_required(VERSION 3.0.0)
project(transceiver C)
set(CMAKE_C_STANDARD 11)
include_directories(.)
include_directories(src/mac)
include_directories(src/phy)
include_directories(src/platform)
include_directories(src/runtime)
include_directories(src/util)
### Group source files to PHY and MAC layer for UE/BS respectively
# PHY layer
set(PHY_BS src/phy/phy_common.h src/phy/phy_bs.h src/phy/phy_bs.c src/phy/phy_common.c src/phy/phy_config.h src/phy/phy_config.c)
set(PHY_UE src/phy/phy_common.h src/phy/phy_ue.h src/phy/phy_ue.c src/phy/phy_common.c src/phy/phy_config.h src/phy/phy_config.c)
# MAC layer
set(MAC_COMMON src/mac/mac_config.h src/mac/mac_channels.h src/mac/mac_common.h src/mac/mac_fragmentation.h src/mac/mac_messages.h
src/mac/mac_channels.c src/mac/mac_messages.c src/mac/mac_common.c src/mac/mac_fragmentation.c src/mac/tap_dev.c)
set(MAC_UE ${MAC_COMMON} src/mac/mac_ue.h src/mac/mac_ue.c)
set(MAC_BS ${MAC_COMMON} src/mac/mac_bs.h src/mac/mac_bs.c)
# Platform
set(PLATFORM_PLUTO src/platform/platform.h src/platform/pluto.h src/platform/pluto.c
src/platform/pluto_gpio.c src/platform/pluto_gpio.h)
set(PLATFORM_SIM src/platform/platform.h src/platform/platform_simulation.h src/platform/platform_simulation.c)
# Utility
set(UTIL src/util/log.h src/util/log.c src/util/ringbuf.h src/util/ringbuf.c)
### Add different executables
# Simulation target
add_executable(test_mac src/runtime/test.h src/runtime/test_mac.c ${PLATFORM_SIM}
${PHY_BS} ${PHY_UE} ${MAC_UE} ${MAC_BS} ${UTIL})
target_link_libraries(test_mac liquid m config)
target_compile_definitions(test_mac PUBLIC USE_SIM SIM_LOG_BER SIM_LOG_DELAY)
# Basestation
add_executable(basestation src/runtime/basestation.c ${PLATFORM_PLUTO} ${PHY_BS} ${MAC_BS} ${UTIL})
target_link_libraries(basestation liquid m iio pthread rt config)
target_compile_definitions(basestation PUBLIC MAC_ENABLE_TAP_DEV)
#Client
add_executable(client src/runtime/client.c ${PLATFORM_PLUTO}
${PHY_UE} ${MAC_UE} ${UTIL})
target_link_libraries(client liquid m iio pthread rt config)
target_compile_definitions(client PUBLIC MAC_ENABLE_TAP_DEV)
#Client XO calibration tool
add_executable(client-calib src/runtime/client-calib.c ${PLATFORM_PLUTO}
${PHY_UE} ${MAC_UE} ${UTIL})
target_link_libraries(client-calib liquid m iio pthread rt config)
# CFO estimation accuracy test
add_executable(test_cfo_estimation src/runtime/test_cfo_estimation.c ${PLATFORM_SIM}
${PHY_BS} ${PHY_UE} ${MAC_UE} ${MAC_BS} ${UTIL})
target_link_libraries(test_cfo_estimation liquid m config)
target_compile_definitions(test_cfo_estimation PUBLIC USE_SIM)