OLD | NEW |
---|---|
1 # The following variables will likely need to be modified, depending on where | 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 | 2 # and how you built LLVM & Clang. They can be overridden in a command-line |
3 # invocation of make, like: | 3 # invocation of make, like: |
4 # | 4 # |
5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> \ | 5 # make LLVM_SRC_PATH=<path> LLVM_BIN_PATH=<path> \ |
6 # LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> ... | 6 # LIBCXX_INSTALL_PATH=<path> CLANG_PATH=<path> ... |
7 # | 7 # |
8 | 8 |
9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This | 9 # LLVM_SRC_PATH is the path to the root of the checked out source code. This |
10 # directory should contain the configure script, the include/ and lib/ | 10 # directory should contain the configure script, the include/ and lib/ |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
109 IceTypeConverter.cpp \ | 109 IceTypeConverter.cpp \ |
110 IceTypes.cpp \ | 110 IceTypes.cpp \ |
111 llvm2ice.cpp \ | 111 llvm2ice.cpp \ |
112 PNaClTranslator.cpp | 112 PNaClTranslator.cpp |
113 | 113 |
114 OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS)) | 114 OBJS=$(patsubst %.cpp, $(OBJDIR)/%.o, $(SRCS)) |
115 | 115 |
116 # Keep all the first target so it's the default. | 116 # Keep all the first target so it's the default. |
117 all: $(OBJDIR)/llvm2ice make_symlink | 117 all: $(OBJDIR)/llvm2ice make_symlink |
118 | 118 |
119 make_symlink: $(OBJDIR)/llvm2ice $(OBJDIR)/llvm2ice.build_atts | 119 make_symlink: $(OBJDIR)/llvm2ice |
120 » rm -rf llvm2ice llvm2ice.build_atts | 120 » rm -rf llvm2ice |
121 ln -s $(OBJDIR)/llvm2ice | 121 ln -s $(OBJDIR)/llvm2ice |
122 » ln -s $(OBJDIR)/llvm2ice.build_atts | 122 » # Build Attributes: |
123 » @$(OBJDIR)/llvm2ice --build-atts | |
Jim Stichnoth
2014/10/29 21:29:36
This is done just to let the user know what the bu
Karl
2014/10/29 21:55:27
Actually, it also verifies that the define flags a
| |
123 | 124 |
124 .PHONY: all make_symlink | 125 .PHONY: all make_symlink |
125 | 126 |
126 # TODO(kschimpf): Fix python scripts to directly get build attributes | 127 # TODO(kschimpf): Fix python scripts to directly get build attributes |
127 # rather than generating $(OBJDIR)/llvm2ice.build_atts. | 128 # rather than generating $(OBJDIR)/llvm2ice.build_atts. |
128 $(OBJDIR)/llvm2ice: $(OBJS) | 129 $(OBJDIR)/llvm2ice: $(OBJS) |
129 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -ldl \ | 130 $(CXX) $(LDFLAGS) -o $@ $^ $(LLVM_LDFLAGS) -ldl \ |
130 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) | 131 -Wl,-rpath=$(abspath $(LIBCXX_INSTALL_PATH)/lib) |
131 $@ --build-atts > $@.build_atts | |
132 | 132 |
133 # TODO: Be more precise than "*.h" here and elsewhere. | 133 # TODO: Be more precise than "*.h" here and elsewhere. |
134 $(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def | 134 $(OBJS): $(OBJDIR)/%.o: src/%.cpp src/*.h src/*.def |
135 $(CXX) -c $(CXXFLAGS) $< -o $@ | 135 $(CXX) -c $(CXXFLAGS) $< -o $@ |
136 | 136 |
137 $(OBJS): | $(OBJDIR) | 137 $(OBJS): | $(OBJDIR) |
138 | 138 |
139 $(OBJDIR): | 139 $(OBJDIR): |
140 @mkdir -p $@ | 140 @mkdir -p $@ |
141 | 141 |
(...skipping 17 matching lines...) Expand all Loading... | |
159 ifeq (,$(wildcard /usr/lib/clang-format/clang-format-diff.py)) | 159 ifeq (,$(wildcard /usr/lib/clang-format/clang-format-diff.py)) |
160 CLANG_FORMAT_DIFF = clang-format-diff.py | 160 CLANG_FORMAT_DIFF = clang-format-diff.py |
161 else | 161 else |
162 CLANG_FORMAT_DIFF = /usr/lib/clang-format/clang-format-diff.py | 162 CLANG_FORMAT_DIFF = /usr/lib/clang-format/clang-format-diff.py |
163 endif | 163 endif |
164 format-diff: | 164 format-diff: |
165 git diff -U0 `git merge-base HEAD master` | \ | 165 git diff -U0 `git merge-base HEAD master` | \ |
166 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i | 166 $(CLANG_FORMAT_DIFF) -p1 -style=LLVM -i |
167 | 167 |
168 clean: | 168 clean: |
169 » rm -rf llvm2ice llvm2ice.build_atts *.o $(OBJDIR) | 169 » rm -rf llvm2ice *.o $(OBJDIR) |
170 | 170 |
171 clean-all: clean | 171 clean-all: clean |
172 rm -rf build/ | 172 rm -rf build/ |
OLD | NEW |