diff options
author | bloodstalker <thabogre@gmail.com> | 2016-12-26 19:28:59 +0000 |
---|---|---|
committer | bloodstalker <thabogre@gmail.com> | 2016-12-26 19:28:59 +0000 |
commit | 1c342ea589f48fb384905fda1bcf368e0054fec6 (patch) | |
tree | 4a9f6b88e49ee3446e2f38875db89d9a2494bb8c /tinyxml2/makefile | |
parent | now calls the tinyxml2 makefile the same way as it is called, also uses tinyx... (diff) | |
download | mutator-1c342ea589f48fb384905fda1bcf368e0054fec6.tar.gz mutator-1c342ea589f48fb384905fda1bcf368e0054fec6.zip |
now works just like the main makefile
Diffstat (limited to 'tinyxml2/makefile')
-rw-r--r-- | tinyxml2/makefile | 66 |
1 files changed, 60 insertions, 6 deletions
diff --git a/tinyxml2/makefile b/tinyxml2/makefile index df6dac6..003f64c 100644 --- a/tinyxml2/makefile +++ b/tinyxml2/makefile @@ -1,9 +1,63 @@ -#CXX=g++ -CXX=/home/bloodstalker/llvm/llvm/build/bin/clang++ -CXX_FLAGS=$(shell /home/bloodstalker/llvm/llvm/build/bin/llvm-config --cxxflags) -EXTRA_CXX_FALGS=-I/home/bloodstalker/llvm/llvm/llvm/tools/clang/include -I/home/bloodstalker/llvm/llvm/build/tools/clang/include -CXX_FLAGS+=$(EXTRA_CXX_FALGS) +#############################################################VARS############################################################# +CXX?=clang++ +LLVM_CONF?=llvm-config +BUILD_MODE?=COV_NO_CLANG +CXX_FLAGS=$(shell $(LLVM_CONF) --cxxflags) + +ifeq ($(BUILD_MODE), COV_USE) +ifneq ($(CXX), clang++) +$(error This build mode is only useable with clang++.) +endif +EXTRA_CXX_FALGS=-I$(shell $(LLVM_CONF) --src-root)/tools/clang/include -I$(shell $(LLVM_CONF) --obj-root)/tools/clang/include\ + -std=c++11 -stdlib=libstdc++ -UNDEBUG -fprofile-instr-use=code.profdata +EXTRA_LD_FLAGS=-v tinyxml2/tinyxml2.o -fprofile-instr-use=code.profdata +endif + +ifeq ($(BUILD_MODE), COV_GEN) +ifneq ($(CXX), clang++) +$(error This build mode is only useable with clang++.) +endif +EXTRA_CXX_FALGS=-I$(shell $(LLVM_CONF) --src-root)/tools/clang/include -I$(shell $(LLVM_CONF) --obj-root)/tools/clang/include\ + -std=c++11 -stdlib=libstdc++ -UNDEBUG -fprofile-instr-generate +EXTRA_LD_FLAGS=-v tinyxml2/tinyxml2.o -fprofile-instr-generate +endif + +#for gcov compatibility +ifeq ($(BUILD_MODE), COV_GNU) +ifneq ($(CXX), clang++) +$(error This build mode is only useable with clang++.) +endif +EXTRA_CXX_FALGS=-I$(shell $(LLVM_CONF) --src-root)/tools/clang/include -I$(shell $(LLVM_CONF) --obj-root)/tools/clang/include\ + -std=c++11 -stdlib=libstdc++ -UNDEBUG -fprofile-arcs -ftest-coverage +EXTRA_LD_FLAGS=-v tinyxml2/tinyxml2.o -fprofile-arcs -ftest-coverage +endif + +ifeq ($(BUILD_MODE), COV_NO_CLANG) +EXTRA_CXX_FALGS=-I$(shell $(LLVM_CONF) --src-root)/tools/clang/include -I$(shell $(LLVM_CONF) --obj-root)/tools/clang/include\ + -std=c++11 -stdlib=libstdc++ -UNDEBUG +EXTRA_LD_FLAGS=-v tinyxml2/tinyxml2.o +endif + +ifeq ($(BUILD_MODE), COV_NO_CLANG_1Z) +ifeq ($(CXX), g++) +$(error This build mode is only useable with clang++.) +endif +EXTRA_CXX_FALGS=-I$(shell $(LLVM_CONF) --src-root)/tools/clang/include -I$(shell $(LLVM_CONF) --obj-root)/tools/clang/include\ + -std=c++1z -stdlib=libstdc++ -UNDEBUG +EXTRA_LD_FLAGS=-v tinyxml2/tinyxml2.o +endif + +ifeq ($(BUILD_MODE), GNU_MODE) +ifneq ($(CXX), g++) +$(error This build mode is only useable with g++.) +endif +EXTRA_CXX_FALGS=-I$(shell $(LLVM_CONF) --src-root)/tools/clang/include -I$(shell $(LLVM_CONF) --obj-root)/tools/clang/include\ + -std=c++11 -stdlib=libstdc++ -UNDEBUG +EXTRA_LD_FLAGS=-v tinyxml2/tinyxml2.o +endif + +###########################################################RULES############################################################## .DEFAULT: tinyxml2 .PHONY: tinyxml2 @@ -12,4 +66,4 @@ tinyxml2.o: tinyxml2.cpp $(CXX) $(CXX_FLAGS) -c $< -o $@ clean: - rm -f *.o
\ No newline at end of file + rm -f *.o |