Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Side by Side Diff: Makefile

Issue 205613002: Initial skeleton of Subzero. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Address Jan's latest comments Created 6 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LICENSE.TXT ('k') | README.rst » ('j') | src/IceCfg.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # The following variables will likely need to be modified, depending on where
2 # and how you built LLVM & Clang. They can be overridden in a command-line
3 # invocation of make, like:
4 #
5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> ...
6 #
7
8 # LLVM_SRC_PATH is the path to the root of the checked out source code. This
9 # directory should contain the configure script, the include/ and lib/
10 # directories of LLVM, Clang in tools/clang/, etc.
11 # Alternatively, if you're building vs. a binary download of LLVM, then
12 # LLVM_SRC_PATH can point to the main untarred directory.
13 LLVM_SRC_PATH ?= ../llvm
14
15 # LLVM_BIN_PATH is the directory where binaries are placed by the LLVM build
16 # process. It should contain the tools like opt, llc and clang. The default
17 # reflects a debug build with autotools (configure & make).
18 LLVM_BIN_PATH ?= $(shell readlink -e \
19 ../../out/llvm_i686_linux_work/Release+Asserts/bin)
20
21 $(info -----------------------------------------------)
22 $(info Using LLVM_SRC_PATH = $(LLVM_SRC_PATH))
23 $(info Using LLVM_BIN_PATH = $(LLVM_BIN_PATH))
24 $(info -----------------------------------------------)
25
26 LLVM_CXXFLAGS := `$(LLVM_BIN_PATH)/llvm-config --cxxflags`
27 LLVM_LDFLAGS := `$(LLVM_BIN_PATH)/llvm-config --ldflags --libs`
28
29 # It's recommended that CXX matches the compiler you used to build LLVM itself.
30 OPTLEVEL := -O0
31 CXX := g++
32 CXXFLAGS := -Wall -Werror -fno-rtti -fno-exceptions \
33 $(OPTLEVEL) -g $(LLVM_CXXFLAGS) -m32
34 LDFLAGS := -m32
35
36 SRCS= \
37 IceCfg.cpp \
38 IceCfgNode.cpp \
39 IceInst.cpp \
40 IceOperand.cpp \
41 IceTypes.cpp \
42 llvm2ice.cpp
43
44 OBJS=$(patsubst %.cpp, build/%.o, $(SRCS))
45
46 # Keep all the first target so it's the default.
47 all: llvm2ice
48
49 .PHONY: all
50
51 llvm2ice: $(OBJS)
52 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -ldl
53
54 # TODO: Be more precise than "*.h" here and elsewhere.
55 $(OBJS): build/%.o: src/%.cpp src/*.h
56 $(CXX) -c $(CXXFLAGS) $< -o $@
57
58 $(OBJS): | build
59
60 build:
61 @mkdir -p $@
62
63 check: llvm2ice
64 LLVM_BIN_PATH=$(LLVM_BIN_PATH) \
65 $(LLVM_SRC_PATH)/utils/lit/lit.py -sv tests_lit
66
67 # TODO: Fix the use of wildcards.
68 format:
69 $(LLVM_BIN_PATH)/clang-format -style=LLVM -i \
70 src/Ice*.h src/Ice*.cpp src/llvm2ice.cpp
71
72 clean:
73 rm -rf llvm2ice *.o build/
OLDNEW
« no previous file with comments | « LICENSE.TXT ('k') | README.rst » ('j') | src/IceCfg.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698