forked from lanl/c2dwave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
55 lines (45 loc) · 1.12 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
#####################################
# Build the C-to-Verilog translator #
#####################################
LLVM_CXXFLAGS = $(shell llvm-config --cxxflags)
LLVM_LDFLAGS = $(shell llvm-config --ldflags --libs --system-libs)
CLANG_LIBS = \
-Wl,--start-group \
-lclangAST \
-lclangASTMatchers \
-lclangAnalysis \
-lclangBasic \
-lclangDriver \
-lclangEdit \
-lclangFrontend \
-lclangFrontendTool \
-lclangLex \
-lclangParse \
-lclangSema \
-lclangEdit \
-lclangRewrite \
-lclangRewriteFrontend \
-lclangStaticAnalyzerFrontend \
-lclangStaticAnalyzerCheckers \
-lclangStaticAnalyzerCore \
-lclangCrossTU \
-lclangIndex \
-lclangSerialization \
-lclangToolingCore \
-lclangTooling \
-lclangFormat \
-Wl,--end-group
SRCDIR = src
BUILDDIR = build
.PHONY: all
all: $(BUILDDIR)/rewritersample
.PHONY: make_builddir
make_builddir:
@test -d $(BUILDDIR) || mkdir $(BUILDDIR)
$(BUILDDIR)/rewritersample: make_builddir $(SRCDIR)/rewritersample.cpp
$(CXX) $(CXXFLAGS) $(LLVM_CXXFLAGS) $(CLANG_INCLUDES) \
$(SRCDIR)/rewritersample.cpp \
$(CLANG_LIBS) $(LLVM_LDFLAGS) -o $@
.PHONY: clean
clean:
$(RM) -r $(BUILDDIR)