I'm having an issue with my makefile. I'm new to building Makefiles, so forgive my ignorance. I have a project with several nested directories. The code in the directories are compiled into libraries, and then linked at the top level. Everything worked great when I output one executable.
Now I want to create two different executables with different compiler options. Here's a snippet of the makefile:
How can I define MW_TYPE_A = 1 only when I'm creating BUILD_A_EXECUTABLE and not when I'm building BUILD_B_EXECUTABLE?Code:BUILD_A_EXECUTABLE = mw_A_exec BUILD_B_EXECUTABLE = mw_B_exec all : $(MAKE) build_a build_b build_a : $(DIRS) $(MAKE) $(BUILD_A_EXECUTABLE) build_b : $(DIRS) $(MAKE) $(BUILD_B_EXECUTABLE) ... ############## BUILD A ############## ifeq ($(MW_TYPE_A),1) CPPFLAGS = -g -Wall $(INCLS) \ -DDtHLA=1 -DRTI_USES_STD_FSTREAM else ########## BUILD B ############## CPPFLAGS = -g -Wall $(INCLS) \ -DDtDIS=1 endif
Any help would be great! Thanks.
tjkrz



LinkBack URL
About LinkBacks


