1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/drivers/Makefile
René Kijewski 840c0f0a57 make: detect their module name automatically
For many modules the `Makefile` contains a line like
```
MODULE:=$(shell basename $(CURDIR))
```
This conclusively shows that we do not have to set the module name
manually.

This PR removes the need to set the module name manually, if it is the
same as the basename. E.g. for `…/sys/vtimer/Makefile` the variable
make `MODULE` will still be `vtimer`, because it is the basename of the
Makefile.
2014-06-17 15:49:32 +02:00

40 lines
826 B
Makefile

DIRS=
ifneq (,$(filter powermon,$(USEMODULE)))
DIRS += powermon
endif
ifneq (,$(filter cc2420,$(USEMODULE)))
DIRS += cc2420
endif
ifneq (,$(filter sht11,$(USEMODULE)))
DIRS += sht11
endif
ifneq (,$(filter ltc4150,$(USEMODULE)))
DIRS += ltc4150
endif
ifneq (,$(filter cc110x,$(USEMODULE)))
DIRS += cc110x
endif
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
DIRS += cc110x_ng
endif
ifneq (,$(filter at86rf231,$(USEMODULE)))
DIRS += at86rf231
endif
ifneq (,$(filter gps_ublox,$(USEMODULE)))
DIRS += gps_ublox
endif
ifneq (,$(filter srf02,$(USEMODULE)))
DIRS += srf02
endif
ifneq (,$(filter srf08,$(USEMODULE)))
DIRS += srf08
endif
ifneq (,$(filter lm75a,$(USEMODULE)))
DIRS += lm75a
endif
all:
@for i in $(DIRS) ; do "$(MAKE)" -C $$i || exit 1; done ;
include $(RIOTBASE)/Makefile.base