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