summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@OARcorp.com>2002-11-18 00:42:53 +0000
committerJoel Sherrill <joel.sherrill@OARcorp.com>2002-11-18 00:42:53 +0000
commitc2646c880e607d8837ac0fd4b7b1b237c94d2e5e (patch)
tree065b2d5f7a66211727b14dcb54c77e9026509497
parent789a953dec3a473d9987e1df935a20752c9307c2 (diff)
downloadrtems-c2646c880e607d8837ac0fd4b7b1b237c94d2e5e.tar.bz2
2002-11-17 Joel Sherrill <joel@OARcorp.com>
* leaf.cfg, main.cfg, compilers/gcc-target-default.cfg: Make build variants work for user applications post install.
-rw-r--r--make/ChangeLog5
-rw-r--r--make/compilers/gcc-target-default.cfg13
-rw-r--r--make/leaf.cfg12
-rw-r--r--make/main.cfg2
4 files changed, 15 insertions, 17 deletions
diff --git a/make/ChangeLog b/make/ChangeLog
index b7c569f699..16ffdd9be8 100644
--- a/make/ChangeLog
+++ b/make/ChangeLog
@@ -1,3 +1,8 @@
+2002-11-17 Joel Sherrill <joel@OARcorp.com>
+
+ * leaf.cfg, main.cfg, compilers/gcc-target-default.cfg: Make
+ build variants work for user applications post install.
+
2002-11-15 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* custom/Cygwin-posix.cfg: Remove -DRTEMS_UNIXLIB -DRTEMS_UNIX.
diff --git a/make/compilers/gcc-target-default.cfg b/make/compilers/gcc-target-default.cfg
index 4d7a6c5b3c..f09f57515b 100644
--- a/make/compilers/gcc-target-default.cfg
+++ b/make/compilers/gcc-target-default.cfg
@@ -52,17 +52,16 @@ CXXFLAGS_DEBUG_V+=-qrtems_debug
# when debugging, optimize flag: typically empty
# some compilers do allow optimization with their "-g"
-CFLAGS_OPTIMIZE_V=-g
-CXXFLAGS_OPTIMIZE_V=-g
+CFLAGS_OPTIMIZE_V+=-g
+CXXFLAGS_OPTIMIZE_V+=-g
# profile flag; use gprof(1)
-CFLAGS_PROFILE_V=-pg
-CXXFLAGS_PROFILE_V=-pg
+CFLAGS_PROFILE_V+=-pg
+CXXFLAGS_PROFILE_V+=-pg
ifndef AUTOMAKE
-# default is to optimize
-CFLAGS_OPTIMIZE =$(CFLAGS_OPTIMIZE_V)
-CXXFLAGS_OPTIMIZE=$(CXXFLAGS_OPTIMIZE_V)
+CFLAGS_$(VARIANT) =$(CFLAGS_$(VARIANT)_V)
+CXXFLAGS_$(VARIANT)=$(CXXFLAGS_$(VARIANT)_V)
endif
ifndef AUTOMAKE
diff --git a/make/leaf.cfg b/make/leaf.cfg
index 8d92407050..4df4d09ace 100644
--- a/make/leaf.cfg
+++ b/make/leaf.cfg
@@ -60,18 +60,10 @@ ifndef AUTOMAKE
# Builtin targets for compilation variants
#
debug:
- $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) "ARCH=o-debug" \
- "CFLAGS_DEBUG=$(CFLAGS_DEBUG_V)" \
- "CXXFLAGS_DEBUG=$(CXXFLAGS_DEBUG_V)" \
- "CFLAGS_OPTIMIZE=$(CFLAGS_OPTIMIZE_V)" \
- "LDFLAGS_DEBUG=$(LDFLAGS_DEBUG_V)" $(TARGET_VA)
+ $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) VARIANT=DEBUG
profile:
- $(MAKE) -f $(MAKEFILE) \
- MAKEFILE=$(MAKEFILE) "ARCH=o-profile" \
- "CFLAGS_PROFILE=$(CFLAGS_PROFILE_V)" \
- "CXXFLAGS_PROFILE=$(CXXFLAGS_PROFILE_V)" \
- "LDFLAGS_PROFILE=$(LDFLAGS_PROFILE_V)" $(TARGET_VA)
+ $(MAKE) -f $(MAKEFILE) MAKEFILE=$(MAKEFILE) VARIANT=PROFILE
endif
#
diff --git a/make/main.cfg b/make/main.cfg
index 072b1360c3..86937fb91a 100644
--- a/make/main.cfg
+++ b/make/main.cfg
@@ -25,7 +25,9 @@ PROJECT_INCLUDE=$(PROJECT_RELEASE)/lib/include
PROJECT_TOOLS = $(PROJECT_RELEASE)/build-tools
## translate VARIANT into VARIANT_V
+ifeq ($(VARIANT),)
VARIANT = OPTIMIZE
+endif
VARIANT_OPTIMIZE_V = OPTIMIZE
VARIANT_DEBUG_V = DEBUG