From 96f6866afd164879d251c0cee45ff58471dcd1ac Mon Sep 17 00:00:00 2001 From: Andreas Huggel Date: Sun, 10 Jul 2005 04:41:46 +0000 Subject: [PATCH] Minor tweaks to the build environment: use values from the configure script rather than hardcoding them --- config/config.mk.in | 12 +++++------- config/configure.ac | 1 + src/Makefile | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/config/config.mk.in b/config/config.mk.in index 32f77e81..a911c9d1 100644 --- a/config/config.mk.in +++ b/config/config.mk.in @@ -48,14 +48,13 @@ CXX = @CXX@ GXX = @GXX@ # Common compiler flags (warnings, symbols [-ggdb], optimization [-O2], etc) +CXXFLAGS = @CXXFLAGS@ ifeq ($(GXX),yes) - CXXFLAGS = -Wall -O2 -else - CXXFLAGS = @CXXFLAGS@ + CXXFLAGS += -Wall endif # Command to run only the preprocessor -CPP = $(CXX) -E -dD +CXXCPP = @CXXCPP@ # Preprocessor flags CPPFLAGS = @CPPFLAGS@ @@ -71,10 +70,9 @@ EXEEXT := @EXEEXT@ CC = @CC@ GCC = @GCC@ +CFLAGS = @CFLAGS@ ifeq ($(GCC),yes) - CFLAGS := -Wall -O2 -else - CFLAGS := @CFLAGS@ + CFLAGS += -Wall endif # ********************************************************************** diff --git a/config/configure.ac b/config/configure.ac index ff082be0..5e79ad00 100644 --- a/config/configure.ac +++ b/config/configure.ac @@ -9,6 +9,7 @@ AC_CONFIG_AUX_DIR([./config]) # Checks for programs. AC_PROG_CXX +AC_PROG_CXXCPP AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL diff --git a/src/Makefile b/src/Makefile index 577e0930..6f752137 100644 --- a/src/Makefile +++ b/src/Makefile @@ -161,7 +161,7 @@ $(sort $(BINOBJ) $(EXIV2OBJ) $(MCOBJ) path-test.o): %.o: %.cpp %.ii: %.cpp set -e; \ - $(CPP) $(CPPFLAGS) $(CXXDEFS) $(CXXINCS) $< | sed '/^[ ]*$$/d' > $@ + $(CXXCPP) $(CPPFLAGS) $(CXXDEFS) $(CXXINCS) $< | sed '/^[ ]*$$/d' > $@ # ****************************************************************************** # Targets