1########################################################################
2# platform-specific options
3
4ifeq ($(TARGET), econotag)
5CFLAGS += -DUIP_CONF_TCP=0
6endif
7
8ifeq ($(TARGET), minimal-net)
9UIP_CONF_IPV6_RPL=0
10CFLAGS += -DUIP_CONF_IPV6_RPL=0 -DRPL_BORDER_ROUTER=0
11endif
12
13# usually, you should not need changing anything beyond this line
14########################################################################
15
16# the library's version
17VERSION:=@PACKAGE_VERSION@
18
19# tools
20@SET_MAKE@
21SHELL = /bin/sh
22MKDIR = mkdir
23
24abs_builddir = @abs_builddir@
25top_builddir = @top_builddir@
26top_srcdir:= @top_srcdir@
27DISTDIR=$(top_builddir)/@PACKAGE_TARNAME@-@PACKAGE_VERSION@
28DTLS_SOURCES:=dtls-server.c dtls-client.c
29FILES:=Makefile.in $(DTLS_SOURCES)
30
31all: dtls-server dtls-client
32	$(MAKE) $(MAKEFLAGS) ROLE=server dtls-server
33	$(MAKE) $(MAKEFLAGS) clean
34	$(MAKE) $(MAKEFLAGS) ROLE=client dtls-client
35
36CONTIKI=$(top_srcdir)/../..
37
38WITH_UIP6=1
39UIP_CONF_IPV6=1
40
41ifneq ($(ROLE),client)
42	CFLAGS+= -DHARD_CODED_ADDRESS=\"aaaa::02:232\"
43else
44	CFLAGS+= -DUDP_CONNECTION_ADDR="fe80::ff:fe02:232" \
45		 -DHARD_CODED_ADDRESS=\"aaaa::02:230\"
46endif
47
48CFLAGS += -ffunction-sections
49LDFLAGS += -Wl,--gc-sections,--undefined=_reset_vector__,--undefined=InterruptVectors,--undefined=_copy_data_init__,--undefined=_clear_bss_init__,--undefined=_end_of_init__
50
51CFLAGS += -DSHA2_USE_INTTYPES_H
52
53APPS += tinydtls/aes tinydtls/sha2 tinydtls/ecc tinydtls
54
55ccm-test: tests/ccm-test
56
57dist:	$(FILES)
58	test -d $(DISTDIR)/examples/contiki || $(MKDIR) -p $(DISTDIR)/examples/contiki
59	cp $(FILES) $(DISTDIR)/examples/contiki
60
61ifeq ("@WITH_CONTIKI@", "1")
62include $(CONTIKI)/Makefile.include
63endif
64