From d58da976c64414c6b2ae0e7dde174bb375bb60c4 Mon Sep 17 00:00:00 2001 From: Ludwig Ortmann Date: Mon, 3 Mar 2014 10:05:36 +0100 Subject: [PATCH] make: add Makefile.pseudomodules and use it BASELIBS now defines targets for anything in USEMODULE that is not in PSEUDOMODULES move defaulttransceiver to Makefile.pseudomodules --- Makefile.modules | 10 ++++------ Makefile.pseudomodules | 1 + 2 files changed, 5 insertions(+), 6 deletions(-) create mode 100644 Makefile.pseudomodules diff --git a/Makefile.modules b/Makefile.modules index a61df5f6bc..fa32697488 100644 --- a/Makefile.modules +++ b/Makefile.modules @@ -1,17 +1,15 @@ export MAKEBASE =$(RIOTBASE) UNDEF += $(BINDIR)startup.o +include $(RIOTBASE)/Makefile.pseudomodules + USEMODULE += cpu core sys INCLUDES += -I$(RIOTBASE)/core/include -I$(RIOTBASE)/drivers/include -I$(RIOTBASE)/sys/include ED = $(USEMODULE:%=-DMODULE_%) ED += $(USEPKG:%=-DMODULE_%) EXTDEFINES = $(shell echo $(ED)|tr 'a-z' 'A-Z') -BL=$(USEMODULE:%= $(BINDIR)%.a) - -# Exclude defaulttransceiver, it is only a pseudomodule that adds other -# modules depending on the current board. -export BASELIBS = $(shell echo $(BL)|sed \ - -e 's/[^ ]*defaulttransceiver.a//') +REALMODULES = $(filter-out $(PSEUDOMODULES), $(USEMODULE)) +export BASELIBS = $(REALMODULES:%= $(BINDIR)%.a) CFLAGS += $(EXTDEFINES) diff --git a/Makefile.pseudomodules b/Makefile.pseudomodules new file mode 100644 index 0000000000..b0414da39d --- /dev/null +++ b/Makefile.pseudomodules @@ -0,0 +1 @@ +PSEUDOMODULES += defaulttransceiver