--include ../config.local
+-include ../Makefile.config
-# Use our version of clang (even without installing)
-LLVM_BIN= $(CURDIR)/../_install/bin
+LLVM_CONFIG ?= llvm-config
-LLVM_CONFIG := $(shell $(LLVM_BIN)/llvm-config --cxxflags --ldflags --libs jit core)
+LLVM_FLAGS := $(shell $(LLVM_CONFIG) --cxxflags --ldflags --libs jit core)
-visualizer: visualizer.cpp commandlineopt.h stringoper.h
- g++ $< -o $@ -g -lclangParse -lclangFrontend -lclangSerialization \
- -lclangDriver -lclangCodeGen -lclangSema -lclangChecker \
+visualizer: visualizer.cpp stringoper.h iooper.h
+ $(CXX) $< -o $@ -g -Wall -lclangParse -lclangFrontend -lclangSerialization \
+ -lclangDriver -lclangCodeGen -lclangSema \
-lclangAnalysis -lclangRewrite -lclangAST -lclangLex -lclangBasic \
- $(LLVM_CONFIG)
-
-.PHONY: test
-test: test.pdf
-
-%.dot: %.cpp visualizer
- ./visualizer $< -o $@
-
-%.pdf: %.dot
- dot -Tps $< | epstopdf --filter > $@
+ $(LLVM_FLAGS)