1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/Makefile.dep
René Kijewski f49bd3e660 make: add Makefile.features telling the BOARDs' features
Please see #1715.
Closes #1715.

This PR implements the new Makefile variables "FEATURES_PROVIDED" and
"FEATURES_REQUIRED". A board *can* have a new file `Makefile.features`
which looks like:

```make
FEATURES_PROVIDED = transceiver
```

An application can have a corresponding line

```make
FEATURES_REQUIRED = transceiver
```

If the selected BOARD does not fulfil the requirements of the
application, then a *warning* is issued at compile time.

This change only includes the feature "transceiver", further features
are expected to be listed in further PRs. The requirement "transceiver"
is automatically added if the application uses the module
"defaulttransceiver".

`make buildtest` understands the new feature listing, so the user won't
need to add boards to `BOARD_BLACKLIST` manually.

Part of the change are the added Make targets
* `info-features-missing`, which prints the required features
  `\setminus` the provided features. The output is empty if there are no
  features missing.
* `info-boards-features-missing`, the same as `info-features-missing`
  but as a table for all boards, but heeded `BOARD_WHITELIST` and
  `BOARD_BLACKLIST`.

Applications don't have to use this new feature. This change does not
break existing Makefile.
2014-10-06 17:42:11 +02:00

114 lines
2.0 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
USEMODULE += hashes
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
ifneq (,$(filter defaulttransceiver,$(USEMODULE)))
FEATURES_REQUIRED += transceiver
endif