2017-09-01 15:45:50 +00:00
|
|
|
all: coap-example-server coap-example-client
|
|
|
|
# use target "plugtest-server" explicitly when required
|
2013-06-19 12:53:21 +00:00
|
|
|
|
2017-05-16 14:04:19 +00:00
|
|
|
CONTIKI=../../..
|
2011-09-14 14:33:01 +00:00
|
|
|
|
2013-12-18 19:09:33 +00:00
|
|
|
# automatically build RESTful resources
|
|
|
|
REST_RESOURCES_DIR = ./resources
|
2014-04-22 08:31:43 +00:00
|
|
|
ifndef TARGET
|
2013-12-18 19:09:33 +00:00
|
|
|
REST_RESOURCES_FILES = $(notdir $(shell find $(REST_RESOURCES_DIR) -name '*.c'))
|
2014-04-22 08:31:43 +00:00
|
|
|
else
|
|
|
|
ifeq ($(TARGET), native)
|
|
|
|
REST_RESOURCES_FILES = $(notdir $(shell find $(REST_RESOURCES_DIR) -name '*.c'))
|
|
|
|
else
|
|
|
|
REST_RESOURCES_FILES = $(notdir $(shell find $(REST_RESOURCES_DIR) -name '*.c' ! -name 'res-plugtest*'))
|
|
|
|
endif
|
|
|
|
endif
|
2013-12-18 19:09:33 +00:00
|
|
|
|
|
|
|
PROJECTDIRS += $(REST_RESOURCES_DIR)
|
|
|
|
PROJECT_SOURCEFILES += $(REST_RESOURCES_FILES)
|
2011-09-14 14:33:01 +00:00
|
|
|
|
2017-09-01 14:57:50 +00:00
|
|
|
# Include the CoAP implementation
|
|
|
|
MODULES += os/net/app-layer/coap
|
2011-09-14 14:33:01 +00:00
|
|
|
|
2012-05-13 14:23:28 +00:00
|
|
|
# optional rules to get assembly
|
2012-01-30 00:28:43 +00:00
|
|
|
#CUSTOM_RULE_C_TO_OBJECTDIR_O = 1
|
|
|
|
#CUSTOM_RULE_S_TO_OBJECTDIR_O = 1
|
|
|
|
|
2011-09-14 14:33:01 +00:00
|
|
|
include $(CONTIKI)/Makefile.include
|
|
|
|
|
2012-05-13 14:23:28 +00:00
|
|
|
# optional rules to get assembly
|
2012-01-30 00:28:43 +00:00
|
|
|
#$(OBJECTDIR)/%.o: asmdir/%.S
|
|
|
|
# $(CC) $(CFLAGS) -MMD -c $< -o $@
|
|
|
|
# @$(FINALIZE_DEPENDENCY)
|
|
|
|
#
|
|
|
|
#asmdir/%.S: %.c
|
|
|
|
# $(CC) $(CFLAGS) -MMD -S $< -o $@
|
|
|
|
|
2012-05-13 14:23:28 +00:00
|
|
|
# border router rules
|
2011-09-14 14:33:01 +00:00
|
|
|
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c
|
|
|
|
(cd $(CONTIKI)/tools && $(MAKE) tunslip6)
|
|
|
|
|
|
|
|
connect-router: $(CONTIKI)/tools/tunslip6
|
2015-09-30 14:06:58 +00:00
|
|
|
sudo $(CONTIKI)/tools/tunslip6 fd00::1/64
|
2011-09-14 14:33:01 +00:00
|
|
|
|
|
|
|
connect-router-cooja: $(CONTIKI)/tools/tunslip6
|
2015-09-30 14:06:58 +00:00
|
|
|
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 -p 60001 fd00::1/64
|
2014-05-15 11:12:22 +00:00
|
|
|
|
2017-10-28 19:34:32 +00:00
|
|
|
connect-router-native: $(CONTIKI)/examples/native-border-router/border-router.native
|
|
|
|
sudo $(CONTIKI)/examples/native-border-router/border-router.native -a 127.0.0.1 -p 60001 fd00::1/64
|
2014-05-15 11:12:22 +00:00
|
|
|
|
|
|
|
connect-minimal:
|
2017-05-13 11:09:58 +00:00
|
|
|
sudo ip address add fdfd::1/64 dev tap0
|