mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
710c7e6cf6
Currently, the tcp and udp implementations are bound to each other in a module called *destiny*. Thus, when using only one of them then the other one gets also compiled into the binary and initialized, which results in unnecessary RAM usage and workload for the CPU. The approach in this PR defines a common module named *socket_base*, which contains functions used by the posix layer. Compiled by it's own, those functions return negative error codes, to symbolize upper layers that they are not supported. When also including the modules *udp* or *tcp* respectively, functions from *socket_base* get overwritten with the correct functionality. Defining *udp* or *tcp* in a Makefile also includes *socket_base*. Defining *pnet* in a Makefile also includes *socket_base*.
109 lines
1.9 KiB
Makefile
109 lines
1.9 KiB
Makefile
ifneq (,$(filter libcoap,$(USEPKG)))
|
|
USEMODULE += pnet
|
|
endif
|
|
|
|
ifneq (,$(filter pnet,$(USEMODULE)))
|
|
USEMODULE += posix
|
|
USEMODULE += socket_base
|
|
USEMODULE += net_help
|
|
endif
|
|
|
|
ifneq (,$(filter transport_layer,$(USEMODULE)))
|
|
USEMODULE += tcp
|
|
USEMODULE += udp
|
|
endif
|
|
|
|
ifneq (,$(filter udp,$(USEMODULE)))
|
|
USEMODULE += socket_base
|
|
endif
|
|
|
|
ifneq (,$(filter tcp,$(USEMODULE)))
|
|
USEMODULE += socket_base
|
|
endif
|
|
|
|
ifneq (,$(filter socket_base,$(USEMODULE)))
|
|
USEMODULE += sixlowpan
|
|
USEMODULE += net_help
|
|
USEMODULE += vtimer
|
|
endif
|
|
|
|
ifneq (,$(filter sixlowborder,$(USEMODULE)))
|
|
USEMODULE += sixlowpan
|
|
endif
|
|
|
|
ifneq (,$(filter rpl,$(USEMODULE)))
|
|
USEMODULE += routing
|
|
endif
|
|
|
|
ifneq (,$(filter routing,$(USEMODULE)))
|
|
USEMODULE += sixlowpan
|
|
endif
|
|
|
|
ifneq (,$(filter sixlowpan,$(USEMODULE)))
|
|
USEMODULE += ieee802154
|
|
USEMODULE += net_help
|
|
USEMODULE += net_if
|
|
USEMODULE += posix
|
|
USEMODULE += vtimer
|
|
endif
|
|
|
|
ifneq (,$(filter posix,$(USEMODULE)))
|
|
USEMODULE += uart0
|
|
USEMODULE += timex
|
|
USEMODULE += vtimer
|
|
endif
|
|
|
|
ifneq (,$(filter uart0,$(USEMODULE)))
|
|
USEMODULE += lib
|
|
USEMODULE += posix
|
|
endif
|
|
|
|
ifneq (,$(filter cbor,$(USEMODULE)))
|
|
USEMODULE += net_help
|
|
endif
|
|
|
|
ifneq (,$(filter cc110x%,$(USEMODULE)))
|
|
USEMODULE += protocol_multiplex
|
|
USEMODULE += vtimer
|
|
endif
|
|
|
|
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
|
USEMODULE += transceiver
|
|
endif
|
|
|
|
ifneq (,$(filter cc2420,$(USEMODULE)))
|
|
USEMODULE += transceiver
|
|
USEMODULE += ieee802154
|
|
endif
|
|
|
|
ifneq (,$(filter at86rf231,$(USEMODULE)))
|
|
USEMODULE += transceiver
|
|
USEMODULE += ieee802154
|
|
USEMODULE += vtimer
|
|
endif
|
|
|
|
ifneq (,$(filter vtimer,$(USEMODULE)))
|
|
USEMODULE += timex
|
|
endif
|
|
|
|
ifneq (,$(filter net_if,$(USEMODULE)))
|
|
USEMODULE += transceiver
|
|
USEMODULE += net_help
|
|
endif
|
|
|
|
ifneq (,$(filter ccn_lite,$(USEMODULE)))
|
|
USEMODULE += crypto
|
|
endif
|
|
|
|
ifneq (,$(filter rgbled,$(USEMODULE)))
|
|
USEMODULE += color
|
|
endif
|
|
|
|
ifneq (,$(filter pipe,$(USEMODULE)))
|
|
USEMODULE += lib
|
|
endif
|
|
|
|
ifneq (,$(filter libfixmath-unittests,$(USEMODULE)))
|
|
USEPKG += libfixmath
|
|
endif
|