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*.
115 lines
2.6 KiB
Makefile
115 lines
2.6 KiB
Makefile
ifneq (,$(filter auto_init,$(USEMODULE)))
|
|
DIRS += auto_init
|
|
endif
|
|
ifneq (,$(filter cbor,$(USEMODULE)))
|
|
DIRS += cbor
|
|
endif
|
|
ifneq (,$(filter config,$(USEMODULE)))
|
|
DIRS += config
|
|
endif
|
|
ifneq (,$(filter lib,$(USEMODULE)))
|
|
DIRS += lib
|
|
endif
|
|
ifneq (,$(filter ping,$(USEMODULE)))
|
|
DIRS += ping
|
|
endif
|
|
ifneq (,$(filter ps,$(USEMODULE)))
|
|
DIRS += ps
|
|
endif
|
|
ifneq (,$(filter posix,$(USEMODULE)))
|
|
DIRS += posix
|
|
endif
|
|
ifneq (,$(filter pnet,$(USEMODULE)))
|
|
DIRS += posix/pnet
|
|
endif
|
|
ifneq (,$(filter pthread,$(USEMODULE)))
|
|
DIRS += posix/pthread
|
|
endif
|
|
ifneq (,$(filter shell,$(USEMODULE)))
|
|
DIRS += shell
|
|
endif
|
|
ifneq (,$(filter shell_commands,$(USEMODULE)))
|
|
DIRS += shell/commands
|
|
endif
|
|
ifneq (,$(filter timex,$(USEMODULE)))
|
|
DIRS += timex
|
|
endif
|
|
ifneq (,$(filter transceiver,$(USEMODULE)))
|
|
DIRS += transceiver
|
|
endif
|
|
ifneq (,$(filter uart0,$(USEMODULE)))
|
|
DIRS += uart0
|
|
endif
|
|
ifneq (,$(filter vtimer,$(USEMODULE)))
|
|
DIRS += vtimer
|
|
endif
|
|
ifneq (,$(filter net_if,$(USEMODULE)))
|
|
DIRS += net/link_layer/net_if
|
|
endif
|
|
ifneq (,$(filter transport_layer,$(USEMODULE)))
|
|
USEMODULE += udp
|
|
USEMODULE += tcp
|
|
endif
|
|
ifneq (,$(filter socket_base,$(USEMODULE)))
|
|
DIRS += net/transport_layer/socket_base
|
|
endif
|
|
ifneq (,$(filter udp,$(USEMODULE)))
|
|
DIRS += net/transport_layer/udp
|
|
endif
|
|
ifneq (,$(filter tcp,$(USEMODULE)))
|
|
DIRS += net/transport_layer/tcp
|
|
endif
|
|
ifneq (,$(filter net_help,$(USEMODULE)))
|
|
DIRS += net/crosslayer/net_help
|
|
endif
|
|
ifneq (,$(filter protocol_multiplex,$(USEMODULE)))
|
|
DIRS += net/link_layer/protocol-multiplex
|
|
endif
|
|
ifneq (,$(filter sixlowpan,$(USEMODULE)))
|
|
DIRS += net/network_layer/sixlowpan
|
|
endif
|
|
ifneq (,$(filter sixlowborder,$(USEMODULE)))
|
|
DIRS += net/network_layer/sixlowpan/border
|
|
endif
|
|
ifneq (,$(filter rpl,$(USEMODULE)))
|
|
DIRS += net/routing/rpl
|
|
endif
|
|
ifneq (,$(filter routing,$(USEMODULE)))
|
|
DIRS += net/routing
|
|
endif
|
|
ifneq (,$(filter ieee802154,$(USEMODULE)))
|
|
DIRS += net/link_layer/ieee802154
|
|
endif
|
|
ifneq (,$(filter bloom,$(USEMODULE)))
|
|
DIRS += bloom
|
|
endif
|
|
ifneq (,$(filter crypto,$(USEMODULE)))
|
|
DIRS += crypto
|
|
endif
|
|
ifneq (,$(filter random,$(USEMODULE)))
|
|
DIRS += random
|
|
endif
|
|
ifneq (,$(filter hashes,$(USEMODULE)))
|
|
DIRS += hashes
|
|
endif
|
|
ifneq (,$(filter ccn_lite,$(USEMODULE)))
|
|
DIRS += net/ccn_lite
|
|
endif
|
|
ifneq (,$(filter ccn_lite_client,$(USEMODULE)))
|
|
DIRS += net/ccn_lite/util
|
|
endif
|
|
ifneq (,$(filter quad_math,$(USEMODULE)))
|
|
DIRS += quad_math
|
|
endif
|
|
ifneq (,$(filter oneway_malloc,$(USEMODULE)))
|
|
DIRS += oneway-malloc
|
|
endif
|
|
ifneq (,$(filter color,$(USEMODULE)))
|
|
DIRS += color
|
|
endif
|
|
ifneq (,$(filter pipe,$(USEMODULE)))
|
|
DIRS += pipe
|
|
endif
|
|
|
|
include $(RIOTBASE)/Makefile.base
|