1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/examples/default/Makefile
René Kijewski 162850b332 make: Implement optional features
Fixes #1876

This PR introduces `FEATURES_OPTIONAL` which can be used to tell the
Make system, that the application would like to use some feature, but
the build should proceed even if the selected board cannot provide the
optional feature.

`make buildtest` and `make info-supported-boards` heed this variable
when examining the list of supported boards.

If a word is present in `FEATURES_REQUIRED` and `FEATURES_OPTIONAL`,
then `FEATURES_OPTIONAL` takes precedence.
2014-10-26 23:18:58 +01:00

60 lines
1.4 KiB
Makefile

# name of your application
APPLICATION = default
# If no BOARD is found in the environment, use this default:
BOARD ?= native
# This has to be the absolute path to the RIOT base directory:
RIOTBASE ?= $(CURDIR)/../..
# Uncomment these lines if you want to use platform support from external
# repositories:
#RIOTCPU ?= $(CURDIR)/../../RIOT/thirdparty_cpu
#RIOTBOARD ?= $(CURDIR)/../../RIOT/thirdparty_boards
# Uncomment this to enable scheduler statistics for ps:
#CFLAGS += -DSCHEDSTATISTICS
# If you want to use native with valgrind, you should recompile native
# with the target all-valgrind instead of all:
# make -B clean all-valgrind
# Comment this out to disable code in RIOT that does safety checking
# which is not needed in a production environment but helps in the
# development process:
CFLAGS += -DDEVELHELP
# Change this to 0 show compiler invocation lines by default:
QUIET ?= 1
# Modules to include:
USEMODULE += uart0
USEMODULE += shell
USEMODULE += shell_commands
USEMODULE += ps
USEMODULE += vtimer
USEMODULE += defaulttransceiver
FEATURES_OPTIONAL += transceiver
ifneq (,$(filter msb-430,$(BOARD)))
USEMODULE += sht11
endif
ifneq (,$(filter msba2,$(BOARD)))
USEMODULE += sht11
USEMODULE += ltc4150
USEMODULE += rtc
USEMODULE += mci
USEMODULE += config
USEMODULE += random
endif
ifneq (,$(filter native,$(BOARD)))
USEMODULE += ltc4150
USEMODULE += rtc
USEMODULE += config
USEMODULE += random
endif
include $(RIOTBASE)/Makefile.include