@@ -15,6 +15,8 @@ override CPPFLAGS += -isystem ../RadioLib/examples/NonArduino/Tock
15
15
# Include the base of libtock-c to fix the libtock/ includes from RadioLib
16
16
override CPPFLAGS += -I$(TOCK_USERLAND_BASE_DIR ) /
17
17
18
+ ifeq ($(CMAKE ) ,1)
19
+ # Use the RadioLib cmake build infrastructure
18
20
LIBS_cortex-m += ../RadioLib/examples/NonArduino/Tock/build-arm/RadioLib/libRadioLib.a
19
21
LIBS_cortex-m0 += ../RadioLib/examples/NonArduino/Tock/build-arm/RadioLib/libRadioLib.a
20
22
LIBS_cortex-m3 += ../RadioLib/examples/NonArduino/Tock/build-arm/RadioLib/libRadioLib.a
@@ -42,3 +44,26 @@ include $(TOCK_USERLAND_BASE_DIR)/AppMakefile.mk
42
44
mkdir -p build-riscv && cd build-riscv && \
43
45
LIBTOCK_C_DIRECTORY=" $( TOCK_USERLAND_BASE_DIR) /../../../" cmake -G " CodeBlocks - Unix Makefiles" -DRISCV_BUILD=1 .. && \
44
46
$(MAKE ) -j4 2> /dev/null || true
47
+ else
48
+ # Use the libtock-c Make system
49
+ LIBS_cortex-m0 += $(TOCK_USERLAND_BASE_DIR ) /examples/lora/RadioLib/build/cortex-m0/RadioLib.a
50
+ LIBS_cortex-m3 += $(TOCK_USERLAND_BASE_DIR ) /examples/lora/RadioLib/build/cortex-m3/RadioLib.a
51
+ LIBS_cortex-m4 += $(TOCK_USERLAND_BASE_DIR ) /examples/lora/RadioLib/build/cortex-m4/RadioLib.a
52
+ LIBS_cortex-m7 += $(TOCK_USERLAND_BASE_DIR ) /examples/lora/RadioLib/build/cortex-m7/RadioLib.a
53
+
54
+ LIBS_rv32imc += $(TOCK_USERLAND_BASE_DIR ) /examples/lora/RadioLib/build/rv32imc/RadioLib.a
55
+ LIBS_rv32imac += $(TOCK_USERLAND_BASE_DIR ) /examples/lora/RadioLib/build/rv32imac/RadioLib.a
56
+
57
+ include $(TOCK_USERLAND_BASE_DIR ) /AppMakefile.mk
58
+
59
+ LIBNAME := RadioLib
60
+
61
+ $(LIBNAME)_DIR := $(TOCK_USERLAND_BASE_DIR ) /examples/lora/$(LIBNAME )
62
+
63
+ $(LIBNAME)_SRCS := \
64
+ $(wildcard $($(LIBNAME ) _DIR) /src/* .cpp) \
65
+ $(wildcard $($(LIBNAME ) _DIR) /src/* /* .cpp) \
66
+ $(wildcard $($(LIBNAME ) _DIR) /src/* /* /* .cpp)
67
+
68
+ include $(TOCK_USERLAND_BASE_DIR ) /TockLibrary.mk
69
+ endif
0 commit comments