1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

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.
This commit is contained in:
René Kijewski 2014-06-17 03:34:17 +02:00
parent 997dcd7e88
commit 840c0f0a57
48 changed files with 2 additions and 90 deletions

View File

@ -2,6 +2,8 @@ ifeq (, $(__RIOTBUILD_FLAG))
$(error You cannot build a module on its own. Use "make" in your application's directory instead.)
endif
MODULE ?= $(shell basename $(CURDIR))
ASMSRC = $(wildcard *.s)
ASSMSRC = $(wildcard *.S)
ASMOBJ = $(ASMSRC:%.s=$(BINDIR)$(MODULE)/%.o)

View File

@ -1,3 +1 @@
MODULE =core
include $(RIOTBASE)/Makefile.base

View File

@ -1,4 +1,2 @@
MODULE =arm_common
CFLAGS += $(CFLAGS_BASIC)
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +1 @@
# define the module that is build
MODULE = cortex-m3_common
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =gpioint
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =i2c
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =mci
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =rtc
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =lpc_common
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +1,3 @@
MODULE =rtc
include $(RIOTBASE)/Makefile.base
$(BINDIR)$(MODULE)/%.o: %.c

View File

@ -1,4 +1 @@
MODULE = periph
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +1,3 @@
MODULE = drivers
DIRS=
ifneq (,$(filter powermon,$(USEMODULE)))
DIRS += powermon

View File

@ -1,3 +1 @@
MODULE =at86rf231
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =cc110x
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +1,3 @@
MODULE =cc110x_ng
DIRS =
ifneq (,$(filter msb-430h,$(BOARD)))
DIRS += spi

View File

@ -1,3 +1 @@
MODULE =cc2420
include $(RIOTBASE)/Makefile.base

View File

@ -1,2 +1 @@
MODULE =lm75a
include $(RIOTBASE)/Makefile.base

View File

@ -1,2 +1 @@
MODULE =ltc4150
include $(RIOTBASE)/Makefile.base

View File

@ -1,2 +1 @@
MODULE =sht11
include $(RIOTBASE)/Makefile.base

View File

@ -1,2 +1 @@
MODULE =srf02
include $(RIOTBASE)/Makefile.base

View File

@ -1,2 +1 @@
MODULE =srf08
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +1,3 @@
MODULE = auto_init
ifneq (,$(filter net_if,$(USEMODULE)))
INCLUDES += -I$(RIOTBASE)/sys/net/include/
endif

View File

@ -1,3 +1 @@
MODULE = bloom
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =config
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = crypto
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = hashes
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =lib
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE := ccn_lite
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE:=$(shell basename $(CURDIR))
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE:=$(shell basename $(CURDIR))
include $(RIOTBASE)/Makefile.base

View File

@ -1,4 +1,3 @@
MODULE:=$(shell basename $(CURDIR))
INCLUDES += -I$(RIOTBASE)/drivers/include \
-I$(RIOTBASE)/drivers/cc110x_ng/include \
-I$(RIOTBASE)/sys/net/include

View File

@ -1,2 +1 @@
MODULE:=$(shell basename $(CURDIR))
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE:=$(shell basename $(CURDIR))
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE:=$(shell basename $(CURDIR))
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE:=$(shell basename $(CURDIR))
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =ping
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = posix
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =pnet
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = pthread
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =ps
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = quad_math
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = random
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = shell
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = timex
include $(RIOTBASE)/Makefile.base

View File

@ -1,5 +1,3 @@
MODULE =transceiver
ifneq (,$(filter cc2420,$(USEMODULE)))
INCLUDES += -I$(RIOTBASE)/sys/net/include
endif

View File

@ -1,3 +1 @@
MODULE = uart0
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE =vtimer
include $(RIOTBASE)/Makefile.base

View File

@ -1,3 +1 @@
MODULE = tests-core
include $(RIOTBASE)/Makefile.base