From ffdc85fc8afba0828bd1f300fdb4f68de99d7000 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 22 Nov 2013 15:47:47 +0000 Subject: [PATCH] Respect configure flags --- Makefile.config.in | 4 ++++ Makefile.lib | 4 ++-- Makefile.new | 4 +--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile.config.in b/Makefile.config.in index 25e537bcc..e5a6f4c68 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -1,3 +1,7 @@ +CC = @CC@ +CFLAGS = @CFLAGS@ +CXX = @CXX@ +CXXFLAGS = @CXXFLAGS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ bindir = @bindir@ diff --git a/Makefile.lib b/Makefile.lib index c7880ff11..449f19ad5 100644 --- a/Makefile.lib +++ b/Makefile.lib @@ -5,10 +5,10 @@ here = $(dir $(lastword $(MAKEFILE_LIST))) QUIET = @ %.o: %.cc - $(QUIET) g++ -o $@ -c $< -g -fPIC $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(basename $@).dep -MP + $(QUIET) $(CXX) -o $@ -c $< -g -fPIC $(CXXFLAGS) $($@_CXXFLAGS) -MMD -MF $(basename $@).dep -MP %.o: %.c - $(QUIET) gcc -o $@ -c $< -g -fPIC $(CFLAGS) $($@_CFLAGS) -MMD -MF $(basename $@).dep -MP + $(QUIET) $(CC) -o $@ -c $< -g -fPIC $(CFLAGS) $($@_CFLAGS) -MMD -MF $(basename $@).dep -MP # Generate Make rules for libraries. diff --git a/Makefile.new b/Makefile.new index 566f1f7be..8911d6d72 100644 --- a/Makefile.new +++ b/Makefile.new @@ -12,9 +12,7 @@ include src/nix-instantiate/Makefile.new include src/nix-env/Makefile.new include src/nix-daemon/Makefile.new -CXXFLAGS = -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr - -CFLAGS = +CXXFLAGS += -I . -I src -I src/libutil -I src/libstore -I src/libmain -I src/libexpr $(foreach lib, $(LIBS), $(eval $(call LIBS_template,$(lib)))) $(foreach prog, $(PROGRAMS), $(eval $(call PROGRAMS_template,$(prog))))