2016-04-22 17:51:59 +02:00
|
|
|
EXE=wallclock
|
2015-01-21 15:09:31 +01:00
|
|
|
|
2016-04-22 17:51:59 +02:00
|
|
|
all: $(EXE)
|
2014-05-29 17:06:43 +02:00
|
|
|
|
|
|
|
CONTIKI=../../..
|
|
|
|
|
2014-12-31 09:53:24 +01:00
|
|
|
CFLAGS += -DPROJECT_CONF_H=\"project-conf.h\"
|
2014-05-29 17:06:43 +02:00
|
|
|
|
2014-12-31 09:53:24 +01:00
|
|
|
# automatically build RESTful resources
|
|
|
|
REST_RESOURCES_DIR = ./resources
|
2015-01-21 15:09:31 +01:00
|
|
|
REST_RESOURCES_DIR_COMMON = ../resources-common
|
|
|
|
REST_RESOURCES_FILES= $(notdir \
|
|
|
|
$(shell find $(REST_RESOURCES_DIR_COMMON) -name '*.c') \
|
|
|
|
)
|
2014-12-31 09:53:24 +01:00
|
|
|
|
2015-01-21 15:09:31 +01:00
|
|
|
PROJECTDIRS += $(REST_RESOURCES_DIR) $(REST_RESOURCES_DIR_COMMON)
|
2014-12-31 09:53:24 +01:00
|
|
|
PROJECT_SOURCEFILES += $(REST_RESOURCES_FILES)
|
2014-05-29 17:06:43 +02:00
|
|
|
|
|
|
|
# linker optimizations
|
|
|
|
SMALL=1
|
|
|
|
|
2014-12-31 09:53:24 +01:00
|
|
|
# REST Engine shall use Erbium CoAP implementation
|
|
|
|
APPS += er-coap
|
|
|
|
APPS += rest-engine
|
2015-01-21 15:09:31 +01:00
|
|
|
APPS += json json-resource time
|
2014-05-29 17:06:43 +02:00
|
|
|
|
2014-12-31 09:53:24 +01:00
|
|
|
CONTIKI_WITH_IPV6 = 1
|
2014-05-29 17:06:43 +02:00
|
|
|
include $(CONTIKI)/Makefile.include
|
|
|
|
|
2016-04-22 17:51:59 +02:00
|
|
|
$(CONTIKI)/tools/tunslip6: $(CONTIKI)/tools/tunslip6.c
|
2014-05-29 17:06:43 +02:00
|
|
|
(cd $(CONTIKI)/tools && $(MAKE) tunslip6)
|
|
|
|
|
2016-04-22 17:51:59 +02:00
|
|
|
connect-router: $(CONTIKI)/tools/tunslip6
|
2014-05-29 17:06:43 +02:00
|
|
|
sudo $(CONTIKI)/tools/tunslip6 aaaa::1/64
|
|
|
|
|
2016-04-22 17:51:59 +02:00
|
|
|
connect-router-cooja: $(CONTIKI)/tools/tunslip6
|
2014-12-31 09:53:24 +01:00
|
|
|
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 -p 60001 aaaa::1/64
|
|
|
|
|
2014-05-29 17:06:43 +02:00
|
|
|
connect-minimal:
|
2016-04-22 17:51:59 +02:00
|
|
|
sudo ip address add fdfd::1/64 dev tap0
|
2015-01-21 15:09:31 +01:00
|
|
|
|
2016-04-22 17:51:59 +02:00
|
|
|
avr-size: $(EXE).$(TARGET).sz
|
2015-01-21 15:09:31 +01:00
|
|
|
|
2016-04-22 17:51:59 +02:00
|
|
|
# At some point we may want to include the eeprom file
|
|
|
|
flash: $(EXE).$(TARGET).u # $(EXE).$(TARGET).eu
|
2015-01-21 15:09:31 +01:00
|
|
|
|
|
|
|
.PHONY: flash avr-size
|
2016-04-22 17:51:59 +02:00
|
|
|
.PRECIOUS: $(EXE).$(TARGET).hex $(EXE).$(TARGET).eep
|