-
Notifications
You must be signed in to change notification settings - Fork 124
/
makefile
56 lines (50 loc) · 1.39 KB
/
makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
CXX := clang++
LLVMCOMPONENTS := cppbackend
RTTIFLAG := -fno-rtti
LLVMCONFIG := /Users/lawrenceolson/Code/build_llvm/Debug+Asserts/bin/llvm-config
CXXFLAGS := -I$(shell $(LLVMCONFIG) --src-root)/tools/clang/include -I$(shell $(LLVMCONFIG) --obj-root)/tools/clang/include $(shell $(LLVMCONFIG) --cxxflags) $(RTTIFLAG)
LLVMLDFLAGS := $(shell $(LLVMCONFIG) --ldflags --libs $(LLVMCOMPONENTS))
SOURCES = tutorial1.cpp \
tutorial2.cpp \
tutorial3.cpp \
tutorial4.cpp \
tutorial6.cpp \
CItutorial1.cpp \
CItutorial2.cpp \
CItutorial3.cpp \
CItutorial4.cpp \
CItutorial6.cpp \
CIBasicRecursiveASTVisitor.cpp \
CIrewriter.cpp \
ToolingTutorial.cpp \
CommentHandling.cpp
OBJECTS = $(SOURCES:.cpp=.o)
EXES = $(OBJECTS:.o=)
CLANGLIBS = \
-lclangTooling\
-lclangFrontendTool\
-lclangFrontend\
-lclangDriver\
-lclangSerialization\
-lclangCodeGen\
-lclangParse\
-lclangSema\
-lclangStaticAnalyzerFrontend\
-lclangStaticAnalyzerCheckers\
-lclangStaticAnalyzerCore\
-lclangAnalysis\
-lclangARCMigrate\
-lclangRewrite\
-lclangRewriteFrontend\
-lclangEdit\
-lclangAST\
-lclangLex\
-lclangBasic\
$(shell $(LLVMCONFIG) --libs)\
$(shell $(LLVMCONFIG) --system-libs)\
-lcurses
all: $(OBJECTS) $(EXES)
%: %.o
$(CXX) -o $@ $< $(CLANGLIBS) $(LLVMLDFLAGS)
clean:
-rm -f $(EXES) $(OBJECTS) *~