mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
Eliminate findstring in more places
This commit is contained in:
parent
d86509db66
commit
102dc45382
@ -1,5 +1,5 @@
|
||||
ifneq (,$(findstring cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(findstring cc110x_spi,$(USEMODULE)))
|
||||
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_spi,$(USEMODULE)))
|
||||
USEMODULE += cc110x_spi
|
||||
endif
|
||||
endif
|
||||
|
@ -1,20 +1,20 @@
|
||||
ifneq (,$(findstring cc110x,$(USEMODULE)))
|
||||
ifeq (,$(findstring gpioint,$(USEMODULE)))
|
||||
ifneq (,$(filter cc110x,$(USEMODULE)))
|
||||
ifeq (,$(filter gpioint,$(USEMODULE)))
|
||||
USEMODULE += gpioint
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(findstring cc110x_spi,$(USEMODULE)))
|
||||
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_spi,$(USEMODULE)))
|
||||
USEMODULE += cc110x_spi
|
||||
endif
|
||||
ifeq (,$(findstring gpioint,$(USEMODULE)))
|
||||
ifeq (,$(filter gpioint,$(USEMODULE)))
|
||||
USEMODULE += gpioint
|
||||
endif
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring ltc4150,$(USEMODULE)))
|
||||
ifeq (,$(findstring gpioint,$(USEMODULE)))
|
||||
ifneq (,$(filter ltc4150,$(USEMODULE)))
|
||||
ifeq (,$(filter gpioint,$(USEMODULE)))
|
||||
USEMODULE += gpioint
|
||||
endif
|
||||
endif
|
||||
|
@ -1,5 +1,5 @@
|
||||
ifneq (,$(findstring ltc4150,$(USEMODULE)))
|
||||
ifeq (,$(findstring hwtimer,$(USEMODULE)))
|
||||
ifneq (,$(filter ltc4150,$(USEMODULE)))
|
||||
ifeq (,$(filter hwtimer,$(USEMODULE)))
|
||||
USEMODULE += hwtimer
|
||||
endif
|
||||
endif
|
||||
|
@ -43,7 +43,7 @@ endif
|
||||
endif
|
||||
|
||||
# set the tap interface for term/valgrind
|
||||
ifneq (,$(findstring nativenet,$(USEMODULE)))
|
||||
ifneq (,$(filter nativenet,$(USEMODULE)))
|
||||
export PORT ?= tap0
|
||||
else
|
||||
export PORT =
|
||||
|
@ -1,5 +1,5 @@
|
||||
ifneq (,$(findstring cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(findstring cc110x_spi,$(USEMODULE)))
|
||||
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
ifeq (,$(filter cc110x_spi,$(USEMODULE)))
|
||||
USEMODULE += cc110x_spi
|
||||
endif
|
||||
endif
|
||||
|
@ -1,10 +1,10 @@
|
||||
export INCLUDES += -I$(RIOTBOARD)/wsn430-v1_4/include -I$(RIOTBOARD)/wsn430-common/include
|
||||
|
||||
ifeq (,$(findstring cc2420,$(USEMODULE)))
|
||||
ifeq (,$(filter cc2420,$(USEMODULE)))
|
||||
USEMODULE += cc2420
|
||||
endif
|
||||
|
||||
ifneq (,$(findstring cc2420,$(USEMODULE)))
|
||||
ifneq (,$(filter cc2420,$(USEMODULE)))
|
||||
INCLUDES += -I$(RIOTBASE)/drivers/cc2420/include \
|
||||
-I$(RIOTBASE)/sys/net/include
|
||||
endif
|
||||
|
@ -3,16 +3,16 @@ MODULE =cpu
|
||||
include $(RIOTCPU)/$(CPU)/Makefile.include
|
||||
|
||||
DIRS = $(RIOTCPU)/arm_common $(RIOTCPU)/lpc_common
|
||||
ifneq (,$(findstring gpioint,$(USEMODULE)))
|
||||
ifneq (,$(filter gpioint,$(USEMODULE)))
|
||||
DIRS += gpioint
|
||||
endif
|
||||
ifneq (,$(findstring mci,$(USEMODULE)))
|
||||
ifneq (,$(filter mci,$(USEMODULE)))
|
||||
DIRS += mci
|
||||
endif
|
||||
ifneq (,$(findstring rtc,$(USEMODULE)))
|
||||
ifneq (,$(filter rtc,$(USEMODULE)))
|
||||
DIRS += rtc
|
||||
endif
|
||||
ifneq (,$(findstring i2c,$(USEMODULE)))
|
||||
ifneq (,$(filter i2c,$(USEMODULE)))
|
||||
DIRS += i2c
|
||||
endif
|
||||
|
||||
|
@ -1,10 +1,10 @@
|
||||
MODULE =cpu
|
||||
|
||||
DIRS = $(RIOTCPU)/arm_common
|
||||
ifneq (,$(findstring mc1322x_adc,$(USEMODULE)))
|
||||
DIRS += adc
|
||||
ifneq (,$(filter mc1322x_adc,$(USEMODULE)))
|
||||
DIRS += adc
|
||||
endif
|
||||
ifneq (,$(findstring mc1322x_asm,$(USEMODULE)))
|
||||
ifneq (,$(filter mc1322x_asm,$(USEMODULE)))
|
||||
DIRS += asm
|
||||
endif
|
||||
|
||||
|
@ -3,10 +3,10 @@ MODULE = cpu
|
||||
EXCLUDES := -I$(RIOTBASE)/sys/posix/%
|
||||
|
||||
DIRS =
|
||||
ifneq (,$(findstring rtc,$(USEMODULE)))
|
||||
ifneq (,$(filter rtc,$(USEMODULE)))
|
||||
DIRS += rtc
|
||||
endif
|
||||
ifneq (,$(findstring nativenet,$(USEMODULE)))
|
||||
ifneq (,$(filter nativenet,$(USEMODULE)))
|
||||
DIRS += net
|
||||
endif
|
||||
|
||||
|
@ -1,38 +1,38 @@
|
||||
MODULE = drivers
|
||||
|
||||
DIRS=
|
||||
ifneq (,$(findstring powermon,$(USEMODULE)))
|
||||
ifneq (,$(filter powermon,$(USEMODULE)))
|
||||
DIRS += powermon
|
||||
endif
|
||||
ifneq (,$(findstring cc2420,$(USEMODULE)))
|
||||
ifneq (,$(filter cc2420,$(USEMODULE)))
|
||||
DIRS += cc2420
|
||||
endif
|
||||
ifneq (,$(findstring sht11,$(USEMODULE)))
|
||||
ifneq (,$(filter sht11,$(USEMODULE)))
|
||||
DIRS += sht11
|
||||
endif
|
||||
ifneq (,$(findstring ltc4150,$(USEMODULE)))
|
||||
ifneq (,$(filter ltc4150,$(USEMODULE)))
|
||||
DIRS += ltc4150
|
||||
endif
|
||||
ifneq (,$(findstring cc110x,$(USEMODULE)))
|
||||
ifneq (,$(findstring cc110x_ng,$(USEMODULE)))
|
||||
ifneq (,$(filter cc110x,$(USEMODULE)))
|
||||
ifneq (,$(filter cc110x_ng,$(USEMODULE)))
|
||||
DIRS += cc110x_ng
|
||||
else
|
||||
DIRS += cc110x
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(findstring at86rf231,$(USEMODULE)))
|
||||
ifneq (,$(filter at86rf231,$(USEMODULE)))
|
||||
DIRS += at86rf231
|
||||
endif
|
||||
ifneq (,$(findstring gps_ublox,$(USEMODULE)))
|
||||
ifneq (,$(filter gps_ublox,$(USEMODULE)))
|
||||
DIRS += gps_ublox
|
||||
endif
|
||||
ifneq (,$(findstring srf02,$(USEMODULE)))
|
||||
ifneq (,$(filter srf02,$(USEMODULE)))
|
||||
DIRS += srf02
|
||||
endif
|
||||
ifneq (,$(findstring srf08,$(USEMODULE)))
|
||||
ifneq (,$(filter srf08,$(USEMODULE)))
|
||||
DIRS += srf08
|
||||
endif
|
||||
ifneq (,$(findstring lm75a,$(USEMODULE)))
|
||||
ifneq (,$(filter lm75a,$(USEMODULE)))
|
||||
DIRS += lm75a
|
||||
endif
|
||||
|
||||
|
@ -1,13 +1,13 @@
|
||||
MODULE =cc110x_ng
|
||||
|
||||
DIRS =
|
||||
ifneq (,$(findstring msb-430h,$(BOARD)))
|
||||
ifneq (,$(filter msb-430h,$(BOARD)))
|
||||
DIRS += spi
|
||||
endif
|
||||
ifneq (,$(findstring msba2,$(BOARD)))
|
||||
ifneq (,$(filter msba2,$(BOARD)))
|
||||
DIRS += spi
|
||||
endif
|
||||
ifneq (,$(findstring wsn430-v1_3b,$(BOARD)))
|
||||
ifneq (,$(filter wsn430-v1_3b,$(BOARD)))
|
||||
DIRS += spi
|
||||
endif
|
||||
|
||||
|
@ -35,19 +35,22 @@ USEMODULE += shell_commands
|
||||
USEMODULE += ps
|
||||
USEMODULE += vtimer
|
||||
USEMODULE += auto_init
|
||||
ifneq (,$(findstring msb-430,$(BOARD)))
|
||||
ifneq (,$(filter msb-430,$(BOARD)))
|
||||
USEMODULE += sht11
|
||||
endif
|
||||
ifneq (,$(findstring chronos,$(BOARD)))
|
||||
ifneq (,$(filter msb-430h,$(BOARD)))
|
||||
USEMODULE += sht11
|
||||
endif
|
||||
ifneq (,$(filter chronos,$(BOARD)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifneq (,$(findstring wsn430-v1_3b,$(BOARD)))
|
||||
ifneq (,$(filter wsn430-v1_3b,$(BOARD)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifneq (,$(findstring msb-430h,$(BOARD)))
|
||||
ifneq (,$(filter msb-430h,$(BOARD)))
|
||||
USEMODULE += cc110x_ng
|
||||
endif
|
||||
ifneq (,$(findstring msba2,$(BOARD)))
|
||||
ifneq (,$(filter msba2,$(BOARD)))
|
||||
USEMODULE += sht11
|
||||
USEMODULE += ltc4150
|
||||
USEMODULE += rtc
|
||||
@ -56,7 +59,7 @@ ifneq (,$(findstring msba2,$(BOARD)))
|
||||
USEMODULE += config
|
||||
USEMODULE += random
|
||||
endif
|
||||
ifneq (,$(findstring native,$(BOARD)))
|
||||
ifneq (,$(filter native,$(BOARD)))
|
||||
USEMODULE += ltc4150
|
||||
USEMODULE += rtc
|
||||
USEMODULE += nativenet
|
||||
|
@ -1,32 +1,32 @@
|
||||
SRC = shell_commands.c sc_id.c
|
||||
|
||||
ifneq (,$(findstring transceiver,$(USEMODULE)))
|
||||
ifneq (,$(filter transceiver,$(USEMODULE)))
|
||||
SRC += sc_transceiver.c
|
||||
endif
|
||||
ifneq (,$(findstring cc110x,$(USEMODULE)))
|
||||
ifeq (,$(findstring transceiver,$(USEMODULE)))
|
||||
ifneq (,$(filter cc110x,$(USEMODULE)))
|
||||
ifeq (,$(filter transceiver,$(USEMODULE)))
|
||||
SRC += sc_cc1100.c
|
||||
endif
|
||||
endif
|
||||
ifneq (,$(findstring mci,$(USEMODULE)))
|
||||
ifneq (,$(filter mci,$(USEMODULE)))
|
||||
SRC += sc_disk.c
|
||||
endif
|
||||
ifneq (,$(findstring ltc4150,$(USEMODULE)))
|
||||
ifneq (,$(filter ltc4150,$(USEMODULE)))
|
||||
SRC += sc_ltc4150.c
|
||||
endif
|
||||
ifneq (,$(findstring ps,$(USEMODULE)))
|
||||
ifneq (,$(filter ps,$(USEMODULE)))
|
||||
SRC += sc_ps.c
|
||||
endif
|
||||
ifneq (,$(findstring rtc,$(USEMODULE)))
|
||||
ifneq (,$(filter rtc,$(USEMODULE)))
|
||||
SRC += sc_rtc.c
|
||||
endif
|
||||
ifneq (,$(findstring sht11,$(USEMODULE)))
|
||||
ifneq (,$(filter sht11,$(USEMODULE)))
|
||||
SRC += sc_sht11.c
|
||||
endif
|
||||
ifneq (,$(findstring lpc_common,$(USEMODULE)))
|
||||
ifneq (,$(filter lpc_common,$(USEMODULE)))
|
||||
SRC += sc_heap.c
|
||||
endif
|
||||
ifneq (,$(findstring random,$(USEMODULE)))
|
||||
ifneq (,$(filter random,$(USEMODULE)))
|
||||
SRC += sc_mersenne.c
|
||||
endif
|
||||
|
||||
|
@ -7,8 +7,11 @@ export BOARD ?= native
|
||||
# this has to be the absolute path of the RIOT-base dir
|
||||
export RIOTBASE = $(CURDIR)/../..
|
||||
|
||||
ifneq (,$(findstring msb-430,$(BOARD)))
|
||||
include $(RIOTBASE)/Makefile.unsupported
|
||||
ifneq (,$(filter msb-430,$(BOARD)))
|
||||
include $(RIOTBASE)/Makefile.unsupported
|
||||
else
|
||||
ifneq (,$(filter msb-430h,$(BOARD)))
|
||||
include $(RIOTBASE)/Makefile.unsupported
|
||||
else
|
||||
|
||||
## Modules to include.
|
||||
|
@ -7,7 +7,7 @@ export BOARD ?= native
|
||||
# this has to be the absolute path of the RIOT-base dir
|
||||
export RIOTBASE = $(CURDIR)/../..
|
||||
|
||||
ifneq (,$(findstring msb-430,$(BOARD)))
|
||||
ifneq (,$(filter msb-430,$(BOARD)))
|
||||
include $(RIOTBASE)/Makefile.unsupported
|
||||
else
|
||||
|
||||
|
@ -7,7 +7,7 @@ export BOARD ?= native
|
||||
# this has to be the absolute path of the RIOT-base dir
|
||||
export RIOTBASE = $(CURDIR)/../..
|
||||
|
||||
ifeq (,$(findstring native,$(BOARD)))
|
||||
ifeq (,$(filter native,$(BOARD)))
|
||||
include $(RIOTBASE)/Makefile.unsupported
|
||||
else
|
||||
|
||||
|
@ -10,7 +10,7 @@ export BOARD = native
|
||||
# this has to be the absolute path of the RIOT-base dir
|
||||
export RIOTBASE = $(CURDIR)/../..
|
||||
|
||||
ifeq (,$(findstring native,$(BOARD)))
|
||||
ifeq (,$(filter native,$(BOARD)))
|
||||
include $(RIOTBASE)/Makefile.unsupported
|
||||
else
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user