Hi,
I am kind of stuck here. We have two makefiles (A requirement that I can't change)
defs.mk : It contains the source file names & their extra compile flags (apart from the standard flags) e.g: C_FILES = c/src/main/rule_main.c rule_main_OPTIONAL_FLAG = +w127 rule_main_DEBUG = TRUE
Makefile : It contains all the rules.
Now I want to add a facility so that I can define file specific flags (and optional file specific debug flag) as in :
CUSTOM_DEBUG_FLAG = $($(basename $(notdir $@))_DEBUG) ## rule_main_DEBUG macro from defs.mk
ifeq ($(CUSTOM_DEBUG_FLAG),TRUE)
do something
endif
But this is not working since expansion of automatic variables is not supported within conditionals. Is there any other way to do it ?
TIA, Saurabh