From: thequux Date: Tue, 8 Nov 2011 22:22:45 +0000 (+0000) Subject: Improved configuration system somewhat X-Git-Url: http://git.rot13.org/?p=goodfet;a=commitdiff_plain;h=f357e70c634e9b5221659c3b4e48d728ecbbc04f Improved configuration system somewhat git-svn-id: https://svn.code.sf.net/p/goodfet/code/trunk@1056 12e2690d-a6be-4b82-a7b7-67c4a43b65c8 --- diff --git a/firmware/Makefile b/firmware/Makefile index fbf5a33..124e36f 100644 --- a/firmware/Makefile +++ b/firmware/Makefile @@ -1,4 +1,4 @@ - +-include config.mk #platform?=goodfet #platform?=telosb diff --git a/firmware/config.mk b/firmware/config.mk new file mode 100644 index 0000000..3897ab3 --- /dev/null +++ b/firmware/config.mk @@ -0,0 +1,46 @@ +mcu = undef +ifneq (,$(findstring $(board),goodfet20)) +mcu := msp430x1612 +endif + +ifneq (,$(findstring $(board),goodfet40 goodfet41)) +mcu := msp430x2618 +endif + +ifneq (,$(findstring $(board),goodfet50 goodfet51)) +mcu := msp430x5510 +endif + +ifeq ($(mcu),undef) +$(error Please define board) +endif + +AVAILABLE_APPS = monitor spi jtag sbw jtag430 jtag430x2 i2c jtagarm7 ejtag jtagxscale openocd chipcon avr pic adc nrf ccspi glitch smartcard ps2 + +CONFIG_sbw = y + +# defaults +CONFIG_monitor ?= y +CONFIG_spi ?= y +CONFIG_jtag ?= n +CONFIG_sbw ?= n +CONFIG_jtag430 ?= y +CONFIG_jtag430x2 ?= y +CONFIG_i2c ?= n +CONFIG_jtagarm7 ?= n +CONFIG_ejtag ?= n +CONFIG_jtagxscale ?= n +CONFIG_openocd ?= y +CONFIG_chipcon ?= y +CONFIG_avr ?= y +CONFIG_pic ?= n +CONFIG_adc ?= n +CONFIG_nrf ?= n +CONFIG_ccspi ?= y +CONFIG_glitch ?= n +CONFIG_smartcard ?= n +CONFIG_ps2 ?= n + + +config := $(foreach app,$(AVAILABLE_APPS),$(if $(findstring $(CONFIG_$(app)),y yes t true Y YES T TRUE),$(app))) +