# OLD_USEMODULE := $(sort $(USEMODULE)) OLD_USEPKG := $(sort $(USEPKG)) # include board dependencies -include $(RIOTBOARD)/$(BOARD)/Makefile.dep # pull dependencies from drivers include $(RIOTBASE)/drivers/Makefile.dep ifneq (,$(filter csma_sender,$(USEMODULE))) USEMODULE += random USEMODULE += xtimer endif ifneq (,$(filter gnrc_mac,$(USEMODULE))) USEMODULE += gnrc_priority_pktqueue USEMODULE += csma_sender endif ifneq (,$(filter nhdp,$(USEMODULE))) USEMODULE += sock_udp USEMODULE += xtimer USEMODULE += oonf_rfc5444 endif ifneq (,$(filter sntp,$(USEMODULE))) USEMODULE += gnrc_sock_udp USEMODULE += xtimer endif ifneq (,$(filter gnrc_netdev_default,$(USEMODULE))) USEMODULE += gnrc_netif USEMODULE += gnrc_netdev USEMODULE += netdev_default endif ifneq (,$(filter netdev_ieee802154,$(USEMODULE))) USEMODULE += ieee802154 endif ifneq (,$(filter gnrc_uhcpc,$(USEMODULE))) USEMODULE += uhcpc USEMODULE += gnrc_sock_udp USEMODULE += fmt endif ifneq (,$(filter nordic_softdevice_ble,$(USEPKG))) USEMODULE += softdevice_handler USEMODULE += ble_common USEMODULE += ble_6lowpan USEMODULE += gnrc_sixlowpan USEMODULE += gnrc_sixlowpan_iphc USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_netdev USEMODULE += gnrc_ipv6_netif endif ifneq (,$(filter gnrc_%,$(filter-out gnrc_netapi gnrc_netreg gnrc_netif% gnrc_pkt%,$(USEMODULE)))) USEMODULE += gnrc endif ifneq (,$(filter gnrc_sock_%,$(USEMODULE))) USEMODULE += gnrc_sock endif ifneq (,$(filter gnrc_sock_ip,$(USEMODULE))) USEMODULE += sock_ip endif ifneq (,$(filter gnrc_sock_udp,$(USEMODULE))) USEMODULE += gnrc_udp USEMODULE += random # to generate random ports USEMODULE += sock_udp endif ifneq (,$(filter gnrc_sock,$(USEMODULE))) USEMODULE += gnrc_netapi_mbox USEMODULE += sock endif ifneq (,$(filter gnrc_netapi_mbox,$(USEMODULE))) USEMODULE += core_mbox endif ifneq (,$(filter netdev_tap,$(USEMODULE))) USEMODULE += netif USEMODULE += netdev_eth ifneq (,$(filter gnrc_%,$(USEMODULE))) USEMODULE += gnrc_netdev endif endif ifneq (,$(filter gnrc_tftp,$(USEMODULE))) USEMODULE += gnrc_udp USEMODULE += xtimer endif ifneq (,$(filter gnrc_rpl_p2p,$(USEMODULE))) USEMODULE += gnrc_rpl endif ifneq (,$(filter gnrc_rpl,$(USEMODULE))) USEMODULE += fib USEMODULE += gnrc_ipv6_router_default USEMODULE += trickle USEMODULE += xtimer endif ifneq (,$(filter trickle,$(USEMODULE))) USEMODULE += random USEMODULE += xtimer endif ifneq (,$(filter ieee802154,$(USEMODULE))) ifneq (,$(filter gnrc_ipv6, $(USEMODULE))) USEMODULE += gnrc_sixlowpan endif ifneq (,$(filter gnrc_ipv6_router, $(USEMODULE))) USEMODULE += gnrc_sixlowpan_router endif ifneq (,$(filter gnrc_ipv6_default, $(USEMODULE))) USEMODULE += gnrc_sixlowpan_default endif ifneq (,$(filter gnrc_ipv6_router_default, $(USEMODULE))) USEMODULE += gnrc_sixlowpan_router_default endif ifneq (,$(filter lwip%, $(USEMODULE))) USEMODULE += lwip_sixlowpan endif endif ifneq (,$(filter gnrc_sixlowpan_default,$(USEMODULE))) USEMODULE += gnrc_ipv6_default USEMODULE += gnrc_sixlowpan USEMODULE += gnrc_sixlowpan_nd USEMODULE += gnrc_sixlowpan_frag USEMODULE += gnrc_sixlowpan_iphc endif ifneq (,$(filter gnrc_sixlowpan_router_default,$(USEMODULE))) USEMODULE += gnrc_ipv6_router_default USEMODULE += gnrc_sixlowpan_router USEMODULE += gnrc_sixlowpan_frag USEMODULE += gnrc_sixlowpan_iphc endif ifneq (,$(filter gnrc_sixlowpan_border_router_default,$(USEMODULE))) USEMODULE += gnrc_ipv6_router_default USEMODULE += gnrc_sixlowpan_nd_border_router USEMODULE += gnrc_sixlowpan_router USEMODULE += gnrc_sixlowpan_frag USEMODULE += gnrc_sixlowpan_iphc endif ifneq (,$(filter gnrc_sixlowpan_router,$(USEMODULE))) USEMODULE += gnrc_sixlowpan_nd_router endif ifneq (,$(filter gnrc_sixlowpan_frag,$(USEMODULE))) USEMODULE += gnrc_sixlowpan USEMODULE += xtimer endif ifneq (,$(filter gnrc_sixlowpan_iphc,$(USEMODULE))) USEMODULE += gnrc_sixlowpan USEMODULE += gnrc_sixlowpan_ctx USEMODULE += gnrc_sixlowpan_iphc_nhc endif ifneq (,$(filter gnrc_sixlowpan,$(USEMODULE))) USEMODULE += gnrc_ipv6 USEMODULE += gnrc_sixlowpan_netif USEMODULE += sixlowpan endif ifneq (,$(filter gnrc_sixlowpan_ctx,$(USEMODULE))) USEMODULE += ipv6_addr USEMODULE += xtimer endif ifneq (,$(filter gnrc_sixlowpan_nd_border_router,$(USEMODULE))) USEMODULE += gnrc_sixlowpan_nd_router endif ifneq (,$(filter gnrc_sixlowpan_nd_router,$(USEMODULE))) USEMODULE += gnrc_sixlowpan_nd endif ifneq (,$(filter gnrc_sixlowpan_nd,$(USEMODULE))) USEMODULE += gnrc_ndp USEMODULE += gnrc_ndp_internal USEMODULE += gnrc_sixlowpan_ctx USEMODULE += random USEMODULE += xtimer endif ifneq (,$(filter gnrc_ipv6_default,$(USEMODULE))) USEMODULE += gnrc_ipv6 USEMODULE += gnrc_icmpv6 ifeq (1,$(GNRC_NETIF_NUMOF)) ifeq (,$(filter gnrc_sixlowpan_nd,$(USEMODULE))) USEMODULE += gnrc_ndp_host endif else USEMODULE += gnrc_ndp_host endif endif ifneq (,$(filter gnrc_ipv6_router_default,$(USEMODULE))) USEMODULE += gnrc_ipv6_router USEMODULE += gnrc_icmpv6 ifeq (1,$(GNRC_NETIF_NUMOF)) ifeq (,$(filter gnrc_sixlowpan_nd_router,$(USEMODULE))) USEMODULE += gnrc_ndp_router endif else USEMODULE += gnrc_ndp_router endif endif ifneq (,$(filter gnrc_ndp_host,$(USEMODULE))) USEMODULE += gnrc_ndp_node USEMODULE += random USEMODULE += xtimer endif ifneq (,$(filter gnrc_ndp_router,$(USEMODULE))) USEMODULE += gnrc_ndp_node USEMODULE += random USEMODULE += xtimer endif ifneq (,$(filter gnrc_ndp_node,$(USEMODULE))) USEMODULE += gnrc_ndp_internal endif ifneq (,$(filter gnrc_ndp_%,$(USEMODULE))) USEMODULE += gnrc_ndp endif ifneq (,$(filter gnrc_ndp,$(USEMODULE))) ifneq (,$(filter gnrc_sixlowpan,$(USEMODULE))) USEMODULE += gnrc_sixlowpan_nd else USEMODULE += gnrc_ndp_node endif USEMODULE += gnrc_ndp_internal USEMODULE += gnrc_icmpv6 USEMODULE += random USEMODULE += xtimer endif ifneq (,$(filter gnrc_ndp2,$(USEMODULE))) USEMODULE += gnrc_icmpv6 endif ifneq (,$(filter gnrc_icmpv6_echo,$(USEMODULE))) USEMODULE += gnrc_icmpv6 endif ifneq (,$(filter gnrc_icmpv6_error,$(USEMODULE))) USEMODULE += gnrc_icmpv6 endif ifneq (,$(filter gnrc_icmpv6,$(USEMODULE))) USEMODULE += inet_csum USEMODULE += gnrc_ipv6 USEMODULE += icmpv6 endif ifneq (,$(filter gnrc_rpl_srh,$(USEMODULE))) USEMODULE += ipv6_ext_rh endif ifneq (,$(filter ipv6_ext_rh,$(USEMODULE))) USEMODULE += ipv6_ext endif ifneq (,$(filter gnrc_ipv6_ext,$(USEMODULE))) USEMODULE += gnrc_ipv6 endif ifneq (,$(filter gnrc_ipv6_whitelist,$(USEMODULE))) USEMODULE += ipv6_addr endif ifneq (,$(filter gnrc_ipv6_blacklist,$(USEMODULE))) USEMODULE += ipv6_addr endif ifneq (,$(filter gnrc_ipv6_router,$(USEMODULE))) USEMODULE += gnrc_ipv6 endif ifneq (,$(filter gnrc_ipv6,$(USEMODULE))) USEMODULE += inet_csum USEMODULE += ipv6_addr USEMODULE += gnrc_ipv6_hdr USEMODULE += gnrc_ipv6_nc USEMODULE += gnrc_ipv6_netif endif ifneq (,$(filter gnrc_ipv6_hdr,$(USEMODULE))) USEMODULE += ipv6_hdr USEMODULE += gnrc_pktbuf endif ifneq (,$(filter sixlowpan,$(USEMODULE))) USEMODULE += ipv6_hdr endif ifneq (,$(filter ipv6_hdr,$(USEMODULE))) USEMODULE += inet_csum USEMODULE += ipv6_addr endif ifneq (,$(filter gnrc_ipv6_nc,$(USEMODULE))) USEMODULE += ipv6_addr endif ifneq (,$(filter gnrc_ipv6_nib_6lbr,$(USEMODULE))) USEMODULE += gnrc_ipv6_nib_6lr endif ifneq (,$(filter gnrc_ipv6_nib_6lr,$(USEMODULE))) USEMODULE += gnrc_ipv6_nib_6ln USEMODULE += gnrc_ipv6_nib_router endif ifneq (,$(filter gnrc_ipv6_nib_6ln,$(USEMODULE))) USEMODULE += gnrc_ipv6_nib USEMODULE += gnrc_sixlowpan_nd endif ifneq (,$(filter gnrc_ipv6_nib_router,$(USEMODULE))) USEMODULE += gnrc_ipv6_nib endif ifneq (,$(filter gnrc_ipv6_nib,$(USEMODULE))) USEMODULE += evtimer USEMODULE += gnrc_ndp2 USEMODULE += ipv6_addr USEMODULE += random endif ifneq (,$(filter gnrc_ipv6_netif,$(USEMODULE))) USEMODULE += ipv6_addr USEMODULE += gnrc_netif USEMODULE += bitfield USEMODULE += xtimer endif ifneq (,$(filter gnrc_udp,$(USEMODULE))) USEMODULE += inet_csum USEMODULE += udp endif ifneq (,$(filter gnrc_tcp,$(USEMODULE))) USEMODULE += inet_csum USEMODULE += random USEMODULE += tcp USEMODULE += xtimer USEMODULE += core_mbox endif ifneq (,$(filter gnrc_nettest,$(USEMODULE))) USEMODULE += gnrc_netapi USEMODULE += gnrc_netreg USEMODULE += gnrc_netif USEMODULE += gnrc_pktbuf USEMODULE += xtimer endif ifneq (,$(filter gnrc_pktdump,$(USEMODULE))) USEMODULE += gnrc_pktbuf USEMODULE += od endif ifneq (,$(filter od,$(USEMODULE))) USEMODULE += fmt endif ifneq (,$(filter newlib_nano,$(USEMODULE))) USEMODULE += newlib endif ifneq (,$(filter newlib,$(USEMODULE))) # allow custom newlib syscalls implementations by adding # newlib_syscalls_XXX to USEMODULE ifeq (,$(filter newlib_syscalls_%,$(USEMODULE))) USEMODULE += newlib_syscalls_default endif ifeq (,$(filter rtt_stdio,$(USEMODULE))) USEMODULE += uart_stdio endif endif ifneq (,$(filter posix_sockets,$(USEMODULE))) USEMODULE += bitfield USEMODULE += random USEMODULE += vfs endif ifneq (,$(filter rtt_stdio,$(USEMODULE))) USEMODULE += xtimer endif ifneq (,$(filter uart_stdio,$(USEMODULE))) USEMODULE += isrpipe endif ifneq (,$(filter isrpipe,$(USEMODULE))) USEMODULE += tsrb endif ifneq (,$(filter posix,$(USEMODULE))) USEMODULE += xtimer endif ifneq (,$(filter posix_semaphore,$(USEMODULE))) USEMODULE += sema USEMODULE += xtimer endif ifneq (,$(filter lwip_sixlowpan,$(USEMODULE))) USEMODULE += lwip_ipv6_autoconfig endif ifneq (,$(filter lwip_ipv6_autoconfig lwip_ipv6_mld,$(USEMODULE))) USEMODULE += lwip_ipv6 endif ifneq (,$(filter lwip_ipv6,$(USEMODULE))) USEMODULE += random endif ifneq (,$(filter lwip_udplite,$(USEMODULE))) USEMODULE += lwip_udp endif ifneq (,$(filter lwip_sock_%,$(USEMODULE))) USEMODULE += lwip_sock endif ifneq (,$(filter lwip_sock_ip,$(USEMODULE))) USEMODULE += lwip_raw USEMODULE += sock_ip endif ifneq (,$(filter lwip_sock_tcp,$(USEMODULE))) USEMODULE += lwip_tcp USEMODULE += sock_tcp endif ifneq (,$(filter lwip_sock_udp,$(USEMODULE))) USEMODULE += lwip_udp USEMODULE += sock_udp endif ifneq (,$(filter lwip_%,$(USEMODULE))) USEMODULE += lwip endif ifneq (,$(filter lwip,$(USEMODULE))) USEPKG += lwip USEMODULE += core_mbox USEMODULE += lwip_api USEMODULE += lwip_contrib USEMODULE += lwip_core USEMODULE += lwip_netif ifeq (,$(filter lwip_ipv4 lwip_ipv6,$(USEMODULE))) USEMODULE += lwip_ipv4 endif ifeq (,$(filter lwip_tcp lwip_udp lwip_udplite,$(USEMODULE))) USEMODULE += lwip_raw endif endif ifneq (,$(filter lwip_ppp,$(USEMODULE))) USEMODULE += lwip_polarssl endif ifneq (,$(filter lwip_contrib,$(USEMODULE))) USEMODULE += sema USEMODULE += xtimer endif ifneq (,$(filter sema,$(USEMODULE))) USEMODULE += xtimer endif ifneq (,$(filter libfixmath-unittests,$(USEMODULE))) USEPKG += libfixmath USEMODULE += libfixmath endif ifneq (,$(filter fib,$(USEMODULE))) USEMODULE += universal_address USEMODULE += xtimer endif ifneq (,$(filter oonf_rfc5444,$(USEMODULE))) USEMODULE += oonf_common endif ifneq (,$(filter oonf_common,$(USEMODULE))) USEPKG += oonf_api USEMODULE += posix_sockets endif # if any log_* is used, also use LOG pseudomodule ifneq (,$(filter log_%,$(USEMODULE))) USEMODULE += log endif ifneq (,$(filter cpp11-compat,$(USEMODULE))) USEMODULE += xtimer USEMODULE += timex FEATURES_REQUIRED += cpp endif ifneq (,$(filter gnrc,$(USEMODULE))) USEMODULE += gnrc_netapi USEMODULE += gnrc_netreg USEMODULE += gnrc_netif USEMODULE += gnrc_netif_hdr USEMODULE += gnrc_pktbuf endif ifneq (,$(filter gnrc_pktbuf, $(USEMODULE))) ifeq (,$(filter gnrc_pktbuf_%, $(USEMODULE))) USEMODULE += gnrc_pktbuf_static endif USEMODULE += gnrc_pkt endif ifneq (,$(filter gnrc_pktbuf_%, $(USEMODULE))) USEMODULE += gnrc_pktbuf # make MODULE_GNRC_PKTBUF macro available for all implementations endif ifneq (,$(filter gnrc_netdev,$(USEMODULE))) USEMODULE += netopt endif ifneq (,$(filter netstats_%, $(USEMODULE))) USEMODULE += netstats endif ifneq (,$(filter gnrc_lwmac,$(USEMODULE))) USEMODULE += gnrc_mac USEMODULE += gnrc_netdev FEATURES_REQUIRED += periph_rtt endif ifneq (,$(filter pthread,$(USEMODULE))) USEMODULE += xtimer USEMODULE += timex endif ifneq (,$(filter schedstatistics,$(USEMODULE))) USEMODULE += xtimer endif ifneq (,$(filter arduino,$(USEMODULE))) FEATURES_REQUIRED += arduino FEATURES_REQUIRED += cpp USEMODULE += xtimer endif ifneq (,$(filter xtimer,$(USEMODULE))) FEATURES_REQUIRED += periph_timer USEMODULE += div endif ifneq (,$(filter saul_reg,$(USEMODULE))) USEMODULE += saul endif ifneq (,$(filter saul_default,$(USEMODULE))) USEMODULE += saul USEMODULE += saul_reg USEMODULE += auto_init_saul endif ifneq (,$(filter saul,$(USEMODULE))) USEMODULE += phydat endif ifneq (,$(filter phydat,$(USEMODULE))) USEMODULE += fmt endif ifneq (,$(filter evtimer,$(USEMODULE))) USEMODULE += xtimer endif ifneq (,$(filter can_linux,$(USEMODULE))) LINKFLAGS += -lsocketcan endif ifneq (,$(filter can,$(USEMODULE))) USEMODULE += can_raw USEMODULE += auto_init_can ifneq (,$(filter can_mbox,$(USEMODULE))) USEMODULE += core_mbox endif USEMODULE += gnrc_pktbuf_static endif ifneq (,$(filter can_isotp,$(USEMODULE))) USEMODULE += xtimer endif ifneq (,$(filter conn_can,$(USEMODULE))) USEMODULE += can USEMODULE += can_mbox USEMODULE += xtimer endif ifneq (,$(filter random,$(USEMODULE))) USEMODULE += prng # select default prng ifeq (,$(filter prng_%,$(USEMODULE))) USEMODULE += prng_tinymt32 endif ifneq (,$(filter prng_tinymt32,$(USEMODULE))) USEMODULE += tinymt32 endif endif ifneq (,$(filter openthread_contrib,$(USEMODULE))) USEMODULE += openthread_contrib_netdev FEATURES_REQUIRED += cpp endif ifneq (,$(filter emcute,$(USEMODULE))) USEMODULE += core_thread_flags USEMODULE += sock_udp USEMODULE += xtimer endif ifneq (,$(filter constfs,$(USEMODULE))) USEMODULE += vfs endif ifneq (,$(filter devfs,$(USEMODULE))) USEMODULE += vfs endif ifneq (,$(filter vfs,$(USEMODULE))) ifeq (native, $(BOARD)) USEMODULE += native_vfs endif endif ifneq (,$(filter sock_dns,$(USEMODULE))) USEMODULE += sock_util endif ifneq (,$(filter spiffs,$(USEMODULE))) USEPKG += spiffs USEMODULE += vfs USEMODULE += spiffs_fs USEMODULE += mtd endif ifneq (,$(filter l2filter_%,$(USEMODULE))) USEMODULE += l2filter endif ifneq (,$(filter gcoap,$(USEMODULE))) USEPKG += nanocoap USEMODULE += gnrc_sock_udp endif # include package dependencies -include $(USEPKG:%=$(RIOTPKG)/%/Makefile.dep) # recursively catch transitive dependencies USEMODULE := $(sort $(USEMODULE)) USEPKG := $(sort $(USEPKG)) ifneq ($(OLD_USEMODULE) $(OLD_USEPKG),$(USEMODULE) $(USEPKG)) include $(RIOTBASE)/Makefile.dep endif