From: Jeffrey Yasskin Date: Fri, 12 Mar 2010 22:55:16 +0000 (+0000) Subject: Allow users to set CPPFLAGS and CXXFLAGS on the make command line. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3352406820d133c78161e8d710f95b8ac152a1e7;p=clang Allow users to set CPPFLAGS and CXXFLAGS on the make command line. Tested: make CPPFLAGS=-m64 CXXFLAGS=-m64 -j8 && (cd tools/clang;make test) git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@98399 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/AST/Makefile b/lib/AST/Makefile index 8afc629d6b..ede25777c9 100644 --- a/lib/AST/Makefile +++ b/lib/AST/Makefile @@ -15,7 +15,7 @@ LEVEL = ../../../.. LIBRARYNAME := clangAST BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/Analysis/Makefile b/lib/Analysis/Makefile index d6411122e3..9b473803fa 100644 --- a/lib/Analysis/Makefile +++ b/lib/Analysis/Makefile @@ -15,7 +15,7 @@ LEVEL = ../../../.. LIBRARYNAME := clangAnalysis BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/Checker/Makefile b/lib/Checker/Makefile index 673d152270..c45ab294de 100644 --- a/lib/Checker/Makefile +++ b/lib/Checker/Makefile @@ -15,7 +15,7 @@ LEVEL = ../../../.. LIBRARYNAME := clangChecker BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/CodeGen/Makefile b/lib/CodeGen/Makefile index 83cb367387..3cea6bbd9f 100644 --- a/lib/CodeGen/Makefile +++ b/lib/CodeGen/Makefile @@ -16,9 +16,9 @@ LEVEL = ../../../.. LIBRARYNAME := clangCodeGen BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include ifdef CLANG_VENDOR -CPPFLAGS += -DCLANG_VENDOR='"$(CLANG_VENDOR) "' +CPP.Flags += -DCLANG_VENDOR='"$(CLANG_VENDOR) "' endif include $(LEVEL)/Makefile.common diff --git a/lib/Frontend/Makefile b/lib/Frontend/Makefile index a630b01336..9e1a864d96 100644 --- a/lib/Frontend/Makefile +++ b/lib/Frontend/Makefile @@ -11,7 +11,7 @@ LEVEL = ../../../.. LIBRARYNAME := clangFrontend BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/Index/Makefile b/lib/Index/Makefile index 9d33a2d175..4d8671361c 100644 --- a/lib/Index/Makefile +++ b/lib/Index/Makefile @@ -18,10 +18,10 @@ LIBRARYNAME := clangIndex BUILD_ARCHIVE = 1 ifeq ($(ARCH),PowerPC) -CXXFLAGS += -maltivec +CXX.Flags += -maltivec endif -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/Lex/Makefile b/lib/Lex/Makefile index 509077017c..bd3c7a872d 100644 --- a/lib/Lex/Makefile +++ b/lib/Lex/Makefile @@ -18,10 +18,10 @@ LIBRARYNAME := clangLex BUILD_ARCHIVE = 1 ifeq ($(ARCH),PowerPC) -CXXFLAGS += -maltivec +CXX.Flags += -maltivec endif -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/Parse/Makefile b/lib/Parse/Makefile index de16e3ea66..6a5540f733 100644 --- a/lib/Parse/Makefile +++ b/lib/Parse/Makefile @@ -15,7 +15,7 @@ LEVEL = ../../../.. LIBRARYNAME := clangParse BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/Rewrite/Makefile b/lib/Rewrite/Makefile index a6d3f77256..04c353090d 100644 --- a/lib/Rewrite/Makefile +++ b/lib/Rewrite/Makefile @@ -15,7 +15,7 @@ LEVEL = ../../../.. LIBRARYNAME := clangRewrite BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/lib/Sema/Makefile b/lib/Sema/Makefile index 158f1af213..3a5a99ad57 100644 --- a/lib/Sema/Makefile +++ b/lib/Sema/Makefile @@ -16,7 +16,7 @@ LEVEL = ../../../.. LIBRARYNAME := clangSema BUILD_ARCHIVE = 1 -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include include $(LEVEL)/Makefile.common diff --git a/tools/CIndex/Makefile b/tools/CIndex/Makefile index 3e288623e5..650bcd3645 100644 --- a/tools/CIndex/Makefile +++ b/tools/CIndex/Makefile @@ -10,7 +10,7 @@ LEVEL = ../../../.. LIBRARYNAME = CIndex -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include # Include this here so we can get the configuration of the targets # that have been configured for construction. We have to do this diff --git a/tools/driver/Makefile b/tools/driver/Makefile index e5a9280a0c..6434cb4ef5 100644 --- a/tools/driver/Makefile +++ b/tools/driver/Makefile @@ -12,7 +12,7 @@ TOOLNAME = clang ifndef CLANG_IS_PRODUCTION TOOLALIAS = clang++ endif -CPPFLAGS += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include +CPP.Flags += -I$(PROJ_SRC_DIR)/../../include -I$(PROJ_OBJ_DIR)/../../include # Clang tool has no plugins, optimize startup time. TOOL_NO_EXPORTS = 1