-
Notifications
You must be signed in to change notification settings - Fork 7
/
common.mk
43 lines (40 loc) · 1.06 KB
/
common.mk
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
HERE := $(dir $(lastword $(MAKEFILE_LIST)))
BUILD := $(HERE)/build
BUILT := $(BUILD)/built
LLVM_CONFIG := $(BUILT)/bin/llvm-config
# Get LLVM build parameters from its llvm-config program.
LLVM_CXXFLAGS := $(shell $(LLVM_CONFIG) --cxxflags) -fno-rtti
LLVM_LDFLAGS := $(shell $(LLVM_CONFIG) --ldflags)
LLVM_LIBS := $(shell $(LLVM_CONFIG) --libs --system-libs)
CLANG_LIBS := \
-lclangAST \
-lclangAnalysis \
-lclangBasic \
-lclangDriver \
-lclangEdit \
-lclangFrontend \
-lclangFrontendTool \
-lclangLex \
-lclangParse \
-lclangSema \
-lclangEdit \
-lclangASTMatchers \
-lclangRewriteCore \
-lclangRewriteFrontend \
-lclangStaticAnalyzerFrontend \
-lclangStaticAnalyzerCheckers \
-lclangStaticAnalyzerCore \
-lclangSerialization \
-lclangTooling
# On OS X, you need to tell the linker that undefined symbols will be looked
# up at runtime.
PLUGIN_LDFLAGS := -shared
ifeq ($(shell uname -s),Darwin)
PLUGIN_LDFLAGS += -Wl,-undefined,dynamic_lookup
endif
# Platform-specific library suffix.
ifeq ($(shell uname -s),Darwin)
LIBEXT := dylib
else
LIBEXT := so
endif