27 lines
675 B
Makefile
27 lines
675 B
Makefile
CONTIKI=../../../..
|
|
|
|
ifeq ($(MAKECMDGOALS),)
|
|
$(error Please specify whether coap-client or coap-server should be built)
|
|
endif
|
|
|
|
ifneq ($(filter coap-client coap-client.flash, $(MAKECMDGOALS)),)
|
|
ifeq ($(SERVER_IPV6_ADDR),)
|
|
$(error Please define SERVER_IPV6_ADDR=<full ipv6 addr>)
|
|
else
|
|
CFLAGS += -DSERVER_IPV6_ADDR=\"$(SERVER_IPV6_ADDR)\"
|
|
CFLAGS += -DDEVICE_NAME=\"nRF52_DK_CoAP_Client\"
|
|
endif
|
|
else
|
|
CFLAGS += -DDEVICE_NAME=\"nRF52-DK-CoAP-Server\"
|
|
endif
|
|
|
|
# automatically build RESTful resources
|
|
PROJECTDIRS += ./resources
|
|
|
|
# REST Engine shall use Erbium CoAP implementation
|
|
MODULES += os/net/app-layer/coap
|
|
|
|
MAKE_ROUTING = MAKE_ROUTING_NONE
|
|
|
|
include $(CONTIKI)/Makefile.include
|