[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Two executables
From: |
tjkrzemi |
Subject: |
Two executables |
Date: |
Mon, 16 May 2005 23:28:03 -0400 |
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:
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
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?
Any help would be great! Let me know if you need more info. Thanks.
Todd Krzeminski
- Two executables,
tjkrzemi <=