tests/driver_tmp006: simplified Makefile

This commit is contained in:
Hauke Petersen 2015-11-03 15:27:25 +01:00
parent c78fbe92ee
commit 770efad28a

View File

@ -6,20 +6,14 @@ FEATURES_REQUIRED = periph_i2c
USEMODULE += tmp006 USEMODULE += tmp006
USEMODULE += xtimer USEMODULE += xtimer
ifneq (,$(TEST_TMP006_I2C)) # set default device parameters in case they are undefined
CFLAGS += -DTEST_TMP006_I2C=$(TEST_TMP006_I2C) TEST_TMP006_I2C ?= I2C_0
else TEST_TMP006_ADDR ?= 0x41
CFLAGS += -DTEST_TMP006_I2C=I2C_0 TEST_TMP006_CONFIG_CR ?= TMP006_CONFIG_CR_DEF
endif
ifneq (,$(TEST_TMP006_ADDR)) # export parameters
CFLAGS += -DTEST_TMP006_ADDR=$(TEST_TMP006_ADDR) CFLAGS += -DTEST_TMP006_I2C=$(TEST_TMP006_I2C)
else CFLAGS += -DTEST_TMP006_ADDR=$(TEST_TMP006_ADDR)
CFLAGS += -DTEST_TMP006_ADDR=0x41 CFLAGS += -DTEST_TMP006_CONFIG_CR=$(TEST_TMP006_CONFIG_CR)
endif
ifneq (,$(TEST_TMP006_CONFIG_CR))
CFLAGS += -DTEST_TMP006_CONFIG_CR=$(TEST_TMP006_CONFIG_CR)
else
CFLAGS += -DTEST_TMP006_CONFIG_CR=TMP006_CONFIG_CR_DEF
endif
include $(RIOTBASE)/Makefile.include include $(RIOTBASE)/Makefile.include