2015-04-17 20:10:46 +08:00
|
|
|
EXTRA_CFLAGS += ${PROJECTINCLUDE}
|
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip/contiki
|
2015-06-08 21:23:20 +08:00
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip/contiki/os/lib
|
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip/contiki/os
|
2015-04-17 20:10:46 +08:00
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip
|
2015-05-28 17:14:21 +08:00
|
|
|
EXTRA_CFLAGS += -I${srctree}/include/drivers
|
2015-04-17 20:10:46 +08:00
|
|
|
|
2015-07-30 20:54:28 +08:00
|
|
|
ifneq ($(CONFIG_NET_BUF_SIZE),)
|
|
|
|
EXTRA_CFLAGS += -DNET_NUM_BUFS=$(CONFIG_NET_BUF_SIZE)
|
|
|
|
endif
|
|
|
|
|
2015-06-12 21:18:06 +08:00
|
|
|
# Zypher specific files
|
|
|
|
obj-y = net_init.o \
|
|
|
|
net_buf.o \
|
|
|
|
net_context.o
|
|
|
|
|
|
|
|
# Contiki IP stack files
|
|
|
|
obj-y += contiki/netstack.o \
|
|
|
|
contiki/packetbuf.o \
|
|
|
|
contiki/nbr-table.o \
|
|
|
|
contiki/linkaddr.o \
|
|
|
|
contiki/queuebuf.o \
|
|
|
|
contiki/ip/uip-debug.o \
|
|
|
|
contiki/ip/uip-packetqueue.o \
|
|
|
|
contiki/ip/uip-udp-packet.o \
|
|
|
|
contiki/ip/udp-socket.o \
|
|
|
|
contiki/ip/simple-udp.o \
|
|
|
|
contiki/ip/uiplib.o \
|
|
|
|
contiki/ip/uip-nameserver.o \
|
|
|
|
contiki/ip/tcpip.o \
|
|
|
|
contiki/os/sys/process.o \
|
|
|
|
contiki/os/sys/stimer.o \
|
|
|
|
contiki/os/sys/etimer.o \
|
|
|
|
contiki/os/sys/timer.o \
|
|
|
|
contiki/os/sys/arg.o \
|
|
|
|
contiki/os/sys/ctimer.o \
|
|
|
|
contiki/os/sys/rtimer.o \
|
|
|
|
contiki/os/sys/clock.o \
|
|
|
|
contiki/os/dev/nullradio.o \
|
|
|
|
contiki/os/lib/mmem.o \
|
|
|
|
contiki/os/lib/memb.o \
|
|
|
|
contiki/os/lib/list.o \
|
|
|
|
contiki/os/lib/random.o \
|
|
|
|
contiki/os/lib/aes-128.o \
|
|
|
|
contiki/mac/mac.o \
|
|
|
|
contiki/mac/framer.o \
|
|
|
|
contiki/mac/mac-sequence.o \
|
|
|
|
contiki/llsec/nullsec.o
|
|
|
|
|
2015-07-01 21:14:58 +08:00
|
|
|
obj-$(CONFIG_NETWORKING_WITH_IPV6) += \
|
|
|
|
contiki/ipv6/uip6.o \
|
|
|
|
contiki/ipv6/uip-icmp6.o \
|
|
|
|
contiki/ipv6/uip-ds6.o \
|
|
|
|
contiki/ipv6/uip-nd6.o \
|
|
|
|
contiki/ipv6/uip-ds6-route.o \
|
|
|
|
contiki/ipv6/uip-ds6-nbr.o
|
|
|
|
|
|
|
|
obj-$(CONFIG_NETWORKING_WITH_IPV4) += \
|
|
|
|
contiki/ipv4/uip_arp.o \
|
|
|
|
contiki/ipv4/uip.o \
|
|
|
|
contiki/ipv4/uip-neighbor.o
|
|
|
|
|
2015-06-12 21:18:06 +08:00
|
|
|
# RPL (RFC 6550) support
|
2015-04-17 20:10:46 +08:00
|
|
|
ifeq ($(CONFIG_NETWORKING_WITH_RPL),y)
|
|
|
|
EXTRA_CFLAGS += -DUIP_CONF_IPV6_RPL=1
|
2015-06-12 21:18:06 +08:00
|
|
|
obj-y += contiki/rpl/rpl-of0.o \
|
|
|
|
contiki/rpl/rpl-mrhof.o \
|
|
|
|
contiki/rpl/rpl-dag.o \
|
|
|
|
contiki/rpl/rpl-timers.o \
|
|
|
|
contiki/rpl/rpl.o \
|
|
|
|
contiki/rpl/rpl-ext-header.o \
|
|
|
|
contiki/rpl/rpl-icmp6.o \
|
|
|
|
contiki/ipv6/multicast/uip-mcast6-route.o \
|
|
|
|
contiki/ipv6/multicast/smrf.o \
|
|
|
|
contiki/ipv6/multicast/uip-mcast6-stats.o
|
2015-04-17 20:10:46 +08:00
|
|
|
else
|
|
|
|
EXTRA_CFLAGS += -DUIP_CONF_IPV6_RPL=0
|
|
|
|
endif
|
|
|
|
|
2015-06-12 21:18:06 +08:00
|
|
|
# 6LoWPAN support
|
2015-05-05 20:16:38 +08:00
|
|
|
ifeq ($(CONFIG_NETWORKING_WITH_6LOWPAN),y)
|
|
|
|
EXTRA_CFLAGS += -DSICSLOWPAN_CONF_ENABLE
|
2015-05-25 20:07:21 +08:00
|
|
|
obj-y += contiki/sicslowpan/sicslowpan_compression.o
|
|
|
|
obj-y += contiki/sicslowpan/sicslowpan_fragmentation.o
|
2015-05-05 20:16:38 +08:00
|
|
|
else
|
2015-05-25 19:53:52 +08:00
|
|
|
obj-y += contiki/sicslowpan/null_compression.o
|
|
|
|
obj-y += contiki/sicslowpan/null_fragmentation.o
|
2015-05-05 20:16:38 +08:00
|
|
|
endif
|
|
|
|
|
2015-04-28 21:23:43 +08:00
|
|
|
ifeq ($(CONFIG_NETWORKING_WITH_LOGGING),y)
|
|
|
|
EXTRA_CFLAGS += -DUIP_CONF_LOGGING=1
|
|
|
|
endif
|
2015-06-12 21:18:06 +08:00
|
|
|
obj-$(CONFIG_NETWORKING_WITH_LOGGING) += contiki/uip-log.o
|
2015-04-28 21:23:43 +08:00
|
|
|
|
2015-05-22 15:46:24 +08:00
|
|
|
obj-$(CONFIG_NETWORKING_WITH_LOOPBACK) += net_driver_loopback.o
|
2015-06-12 21:18:06 +08:00
|
|
|
obj-$(CONFIG_NETWORKING_WITH_15_4_LOOPBACK) += dummy_15_4_radio.o
|
2015-07-10 19:04:35 +08:00
|
|
|
obj-$(CONFIG_NETWORKING_WITH_15_4_LOOPBACK_UART) += dummy_15_4_radio.o
|
2015-06-12 21:18:06 +08:00
|
|
|
obj-$(CONFIG_NETWORKING_WITH_15_4) += net_driver_15_4.o \
|
|
|
|
contiki/mac/frame802154.o \
|
|
|
|
contiki/mac/framer-802154.o \
|
|
|
|
contiki/mac/csma.o \
|
|
|
|
contiki/mac/mac-sequence.o \
|
|
|
|
contiki/mac/sicslowmac/sicslowmac.o
|
2015-04-28 21:23:43 +08:00
|
|
|
|
2015-06-12 21:18:06 +08:00
|
|
|
# At the moment we only need nullsec driver for 802.15.4
|
|
|
|
#obj-$(CONFIG_NETWORKING_WITH_15_4) += contiki/llsec/ccm-star.o \
|
|
|
|
# contiki/llsec/ccm-star.o \
|
|
|
|
# contiki/llsec/anti-replay.o
|
2015-06-11 13:51:53 +08:00
|
|
|
|
2015-06-12 21:18:06 +08:00
|
|
|
ifeq ($(CONFIG_NETWORKING_WITH_15_4),)
|
|
|
|
obj-y += contiki/mac/nullmac.o \
|
2015-09-17 18:38:32 +08:00
|
|
|
contiki/mac/framer-nullmac.o \
|
|
|
|
contiki/mac/nullrdc.o
|
2015-06-11 15:17:54 +08:00
|
|
|
endif
|
|
|
|
|
2015-06-12 21:18:06 +08:00
|
|
|
obj-$(CONFIG_NETWORKING_UART) += contiki/os/dev/slip.o \
|
2015-06-25 18:33:08 +08:00
|
|
|
contiki/os/dev/slip-arch.o \
|
|
|
|
net_driver_slip.o
|
2015-06-11 13:51:53 +08:00
|
|
|
|
2015-08-03 22:16:14 +08:00
|
|
|
ifeq ($(CONFIG_TINYDTLS),y)
|
|
|
|
EXTRA_CFLAGS += -DCONTIKI_TARGET_ZEPHYR=1
|
|
|
|
EXTRA_CFLAGS += -DWITH_SHA256=1
|
|
|
|
EXTRA_CFLAGS += -DDTLS_TICKS_PER_SECOND=sys_clock_ticks_per_sec
|
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip/contiki/os/sys
|
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip/tinydtls
|
|
|
|
endif
|
|
|
|
obj-$(CONFIG_TINYDTLS) += tinydtls/dtls.o \
|
|
|
|
tinydtls/crypto.o \
|
|
|
|
tinydtls/hmac.o \
|
|
|
|
tinydtls/aes/rijndael.o \
|
|
|
|
tinydtls/sha2/sha2.o \
|
|
|
|
tinydtls/ccm.o \
|
|
|
|
tinydtls/netq.o \
|
|
|
|
tinydtls/dtls_time.o \
|
|
|
|
tinydtls/peer.o \
|
|
|
|
tinydtls/session.o \
|
|
|
|
tinydtls/ecc/ecc.o
|
|
|
|
|
|
|
|
|
|
|
|
ifeq ($(CONFIG_TINYDTLS_DEBUG),)
|
|
|
|
EXTRA_CFLAGS += -DNDEBUG
|
|
|
|
endif
|
|
|
|
obj-$(CONFIG_TINYDTLS_DEBUG) += tinydtls/debug.o
|
|
|
|
|
2015-08-26 22:31:54 +08:00
|
|
|
ifeq ($(CONFIG_ER_COAP),y)
|
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip/rest-engine
|
|
|
|
EXTRA_CFLAGS += -I${srctree}/net/ip/er-coap
|
|
|
|
endif
|
|
|
|
obj-$(CONFIG_ER_COAP) += er-coap/er-coap.o \
|
|
|
|
er-coap/er-coap-engine.o \
|
|
|
|
er-coap/er-coap-transactions.o \
|
|
|
|
er-coap/er-coap-observe.o \
|
|
|
|
er-coap/er-coap-separate.o \
|
|
|
|
er-coap/er-coap-res-well-known-core.o \
|
|
|
|
er-coap/er-coap-block1.o \
|
|
|
|
er-coap/er-coap-context.o \
|
|
|
|
rest-engine/rest-engine.o
|
|
|
|
|
2015-08-26 22:33:05 +08:00
|
|
|
obj-$(CONFIG_ER_COAP_CLIENT) += er-coap/er-coap-observe-client.o
|
|
|
|
|
2015-04-17 20:10:46 +08:00
|
|
|
# workaround for include file location
|
2015-06-16 21:31:39 +08:00
|
|
|
CREATE_INCLUDE_LINK_net := $(shell ln -s ${ZEPHYR_BASE}/net/ip/contiki ${ZEPHYR_BASE}/net/ip/contiki/net > /dev/null 2>&1)
|