KocsisV, I've been trying (again) passing variables to the Makefile.
It should be possible to declare them in the Environment (Under Properties... C/C++ Build).
Ex. Declare "BOARD_TYPE", with content "KSGER_V1_5", etc, for each build profile.
Then in the Makefile:
clean :ifeq ($(BOARD_TYPE), KSGER_V1_5)
clean_KSGER_V1_5
else ifeq ($(BOARD_TYPE), KSGER_V2)
clean_KSGER_V2
else ifeq ($(BOARD_TYPE), KSGER_V3)
clean_KSGER_V3
else ifeq ($(BOARD_TYPE), Quicko_STM32F103)
clean_Quicko_STM32F103
else ifeq ($(BOARD_TYPE), Quicko_STM32F072)
clean_Quicko_STM32F072
else
@echo "clean: BOARD_TYPE not defined"
endif
all : ifeq ($(BOARD_TYPE), KSGER_V1_5)
./boards/KSGER_V1_5/src/generated
else ifeq ($(BOARD_TYPE), KSGER_V2)
./boards/KSGER_V2/src/generated
else ifeq ($(BOARD_TYPE), KSGER_V3)
./boards/KSGER_V3/src/generated
else ifeq ($(BOARD_TYPE), Quicko_STM32F103)
./boards/Quicko_STM32F103/src/generated
else ifeq ($(BOARD_TYPE), Quicko_STM32F072)
./boards/Quicko_STM32F072/src/generated
else
@echo "all: BOARD_TYPE not defined"
endif
It should fix the unecessary code generation, but so far, everything I tried has failed, it's not getting the variable.
I'm always getting "BOARD_TYPE not defined".
I've seen a lot of examples in Eclipse, so I guess it's not a Makefile version problem?
Any ideas? I feel like we're getting close to make it work!
Ah, I forgot: Please use spaces instead tabs. Eclipse settings, Editor... I'm pretty sure you know all that!
I had very nasty viewing issues with some browsers or editors, they used different spacing and the code looked like crap.
Just to keep the formatting nice. I use 2 spaces for everything, viewing was perfect in any plattform!