aboutsummaryrefslogtreecommitdiffstats
path: root/makefile
diff options
context:
space:
mode:
authorbloodstalker <thabogre@gmail.com>2016-08-31 00:01:33 +0000
committerbloodstalker <thabogre@gmail.com>2016-08-31 00:01:33 +0000
commitb267569e302cb4d921835a557608ce8a61b4f933 (patch)
tree98d6fb9e8822fe04157d6c275aa3171ee4309a1a /makefile
downloadmutator-b267569e302cb4d921835a557608ce8a61b4f933.tar.gz
mutator-b267569e302cb4d921835a557608ce8a61b4f933.zip
a simple c mutator.
Diffstat (limited to 'makefile')
-rw-r--r--makefile45
1 files changed, 45 insertions, 0 deletions
diff --git a/makefile b/makefile
new file mode 100644
index 0000000..1df41ac
--- /dev/null
+++ b/makefile
@@ -0,0 +1,45 @@
+
+#######################################VARS####################################
+#CXX=g++
+CXX=/home/bloodstalker/llvm/llvm/build/bin/clang++
+
+CXX_FLAGS=$(shell /home/bloodstalker/llvm/llvm/build/bin/llvm-config --cxxflags)
+#CXX_FLAGS=$(shell llvm-config --cxxflags)
+
+EXTRA_CXX_FALGS=-I/home/bloodstalker/llvm/llvm/llvm/tools/clang/include -I/home/bloodstalker/llvm/llvm/build/tools/clang/include
+EXTRA_LD_FLAGS=
+
+LD_FLAGS=-Wl,--start-group -lclangAST -lclangAnalysis -lclangBasic\
+-lclangDriver -lclangEdit -lclangFrontend -lclangFrontendTool\
+-lclangLex -lclangParse -lclangSema -lclangEdit -lclangASTMatchers\
+-lclangRewrite -lclangRewriteFrontend -lclangStaticAnalyzerFrontend\
+-lclangStaticAnalyzerCheckers -lclangStaticAnalyzerCore\
+-lclangSerialization -lclangToolingCore -lclangTooling -Wl,--end-group
+LD_FLAGS+=$(shell /home/bloodstalker/llvm/llvm/build/bin/llvm-config --ldflags --libs --system-libs)
+#LD_FLAGS+=$(shell llvm-config --ldflags --libs --system-libs)
+
+CXX_FLAGS+=$(EXTRA_CXX_FALGS)
+LD_FLAGS+=$(EXTRA_LD_FLAGS)
+
+TARGET=mutator
+
+######################################RULES####################################
+.DEFAULT: all
+
+.PHONY:all clean help
+
+all: $(TARGET)
+
+.cpp.o:
+ $(CXX) $(CXX_FLAGS) -c $< -o $@
+
+$(TARGET): $(TARGET).o
+ $(CXX) $< $(LD_FLAGS) -o $@
+
+clean:
+ rm -f *.o *~ $(TARGET)
+
+help:
+ @echo 'there is help.'
+ @echo 'all is the default.'
+ @echo 'clean.'