-
Notifications
You must be signed in to change notification settings - Fork 12
/
Makefile.uwb
62 lines (50 loc) · 1.84 KB
/
Makefile.uwb
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
# Please define UWB_CONTIKI pointing to the contiki-uwb directory in
# your application Makefile
ifndef UWB_CONTIKI
${error UWB_CONTIKI not defined!}
endif
# If you want to use a Contiki tree different from the one
# of the submodule, place a file named Makefile.redirect to
# contiki subdirectory and define the CONTIKI constant there
ifneq ("$(wildcard $(UWB_CONTIKI)/contiki/Makefile.redirect)","")
include $(UWB_CONTIKI)/contiki/Makefile.redirect
${warning Using non-submodule Contiki: $(CONTIKI)}
else
# by default use contiki subdir
CONTIKI = $(UWB_CONTIKI)/contiki
endif
UWB_MODULES += core/net core/sys
# If requested, include Glossy and Crystal and disable other stacks
ifeq ($(UWB_WITH_GLOSSY),1)
CFLAGS += -DNETSTACK_CONF_WITH_GLOSSY=1
UWB_MODULES += dev/dw1000/glossy dev/dw1000/crystal
CFLAGS+=-DNETSTACK_CONF_NETWORK=dummynet_driver
CONTIKI_WITH_IPV6 = 0
CONTIKI_WITH_RIME = 0
# CONTIKI_WITH_TREX = 0 # ?
endif
# If requested, include TSM and disable other stacks
ifeq ($(UWB_WITH_TSM),1)
CFLAGS += -DNETSTACK_CONF_WITH_TSM=1
UWB_MODULES += dev/dw1000/tsm
CFLAGS+=-DNETSTACK_CONF_NETWORK=dummynet_driver
CONTIKI_WITH_IPV6 = 0
CONTIKI_WITH_RIME = 0
# CONTIKI_WITH_GLOSSY = 0 # ?
endif
# use to print configuration macros at compile time
ifeq ($(UWB_CONTIKI_PRINT_DEF),1)
CFLAGS += -DUWB_CONTIKI_PRINT_DEF=1
endif
ifdef UWB_MODULES
UNIQUE_UWB_MODULES = $(call uniq,$(UWB_MODULES))
UWB_MODULEDIRS = ${wildcard ${addprefix $(UWB_CONTIKI)/, $(UNIQUE_UWB_MODULES)}}
UWB_MODULES_SOURCES = ${foreach d, $(UWB_MODULEDIRS), ${subst ${d}/,,${wildcard $(d)/*.c}}}
CONTIKI_SOURCEFILES += $(UWB_MODULES_SOURCES)
APPDS += $(UWB_MODULEDIRS)
endif
TARGETDIRS += $(UWB_CONTIKI)/platform
# use this as dependency to force a target to always rebuild
.PHONY: FORCE
# include the original Contiki Makefile
include $(CONTIKI)/Makefile.include