Files
libcoap/examples/contiki/Makefile.contiki
T
Olaf Bergmann 0f062e557e Makefile: fixed build infrastructure for Contiki examples
The new structure of libcoap allows to clone Contiki in a
subdirectory. The example build now uses Makefile to first clone
Contiki and then invoke Makefile.contiki for the actual build.
The TARGET is set to minimal-net by default but can be changed to
any other (tested) target.
2016-02-16 14:19:11 +01:00

34 lines
901 B
Makefile

########################################################################
# platform-specific options
ifeq ($(TARGET), econotag)
CONTIKI_WITH_RPL=0
CFLAGS += -DUIP_CONF_TCP=0 -DCOAP_MAX_BLOCK_SZX=1
endif
ifeq ($(TARGET), mbxxx)
CFLAGS += -DUIP_CONF_TCP=0 -DCOAP_MAX_BLOCK_SZX=1 -DHAVE_ASSERT_H -DHAVE_LIMITS_H
STM32W_CPUREV=CC
#STM32W_CPUREV=xB
endif
# usually, you should not need changing anything beyond this line
########################################################################
CONTIKI?=../../../..
ifneq ($(NODE_ADDR),)
CFLAGS += -DNODE_ADDR=$(NODE_ADDR)
endif
all: server
CFLAGS += -ffunction-sections
LDFLAGS += -Wl,--gc-sections,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__
CFLAGS += #-DSHORT_ERROR_RESPONSE -DNDEBUG
APPS += libcoap
include $(CONTIKI)/Makefile.include