Improved configuration system somewhat
[goodfet] / firmware / config.mk
1 mcu = undef
2 ifneq (,$(findstring $(board),goodfet20))
3 mcu := msp430x1612
4 endif
5
6 ifneq (,$(findstring $(board),goodfet40 goodfet41))
7 mcu := msp430x2618
8 endif
9
10 ifneq (,$(findstring $(board),goodfet50 goodfet51))
11 mcu := msp430x5510
12 endif
13
14 ifeq ($(mcu),undef)
15 $(error Please define board)
16 endif
17
18 AVAILABLE_APPS = monitor spi jtag sbw jtag430 jtag430x2 i2c jtagarm7 ejtag jtagxscale openocd chipcon avr pic adc nrf ccspi glitch smartcard ps2 
19
20 CONFIG_sbw         = y
21
22 # defaults
23 CONFIG_monitor    ?= y
24 CONFIG_spi        ?= y
25 CONFIG_jtag       ?= n
26 CONFIG_sbw        ?= n
27 CONFIG_jtag430    ?= y
28 CONFIG_jtag430x2  ?= y
29 CONFIG_i2c        ?= n
30 CONFIG_jtagarm7   ?= n
31 CONFIG_ejtag      ?= n
32 CONFIG_jtagxscale ?= n
33 CONFIG_openocd    ?= y
34 CONFIG_chipcon    ?= y
35 CONFIG_avr        ?= y
36 CONFIG_pic        ?= n
37 CONFIG_adc        ?= n
38 CONFIG_nrf        ?= n
39 CONFIG_ccspi      ?= y
40 CONFIG_glitch     ?= n
41 CONFIG_smartcard  ?= n
42 CONFIG_ps2        ?= n
43
44
45 config := $(foreach app,$(AVAILABLE_APPS),$(if $(findstring $(CONFIG_$(app)),y yes t true Y YES T TRUE),$(app)))
46