OLD | NEW |
1 #===- ./Makefile -------------------------------------------*- Makefile -*--===# | 1 #===- ./Makefile -------------------------------------------*- Makefile -*--===# |
2 # | 2 # |
3 # The LLVM Compiler Infrastructure | 3 # The LLVM Compiler Infrastructure |
4 # | 4 # |
5 # This file is distributed under the University of Illinois Open Source | 5 # This file is distributed under the University of Illinois Open Source |
6 # License. See LICENSE.TXT for details. | 6 # License. See LICENSE.TXT for details. |
7 # | 7 # |
8 #===------------------------------------------------------------------------===# | 8 #===------------------------------------------------------------------------===# |
9 | 9 |
10 LEVEL := . | 10 LEVEL := . |
(...skipping 25 matching lines...) Expand all Loading... |
36 endif | 36 endif |
37 | 37 |
38 ifeq ($(BUILD_EXAMPLES),1) | 38 ifeq ($(BUILD_EXAMPLES),1) |
39 OPTIONAL_DIRS += examples | 39 OPTIONAL_DIRS += examples |
40 endif | 40 endif |
41 | 41 |
42 EXTRA_DIST := test unittests llvm.spec include win32 Xcode | 42 EXTRA_DIST := test unittests llvm.spec include win32 Xcode |
43 | 43 |
44 include $(LEVEL)/Makefile.config | 44 include $(LEVEL)/Makefile.config |
45 | 45 |
| 46 ifeq ($(PNACL_BROWSER_TRANSLATOR),1) |
| 47 DIRS := $(filter-out tools/llvm-shlib runtime docs unittests, $(DIRS)) |
| 48 OPTIONAL_DIRS := |
| 49 endif |
| 50 |
46 ifneq ($(ENABLE_SHARED),1) | 51 ifneq ($(ENABLE_SHARED),1) |
47 DIRS := $(filter-out tools/llvm-shlib, $(DIRS)) | 52 DIRS := $(filter-out tools/llvm-shlib, $(DIRS)) |
48 endif | 53 endif |
49 | 54 |
50 ifneq ($(ENABLE_DOCS),1) | 55 ifneq ($(ENABLE_DOCS),1) |
51 DIRS := $(filter-out docs, $(DIRS)) | 56 DIRS := $(filter-out docs, $(DIRS)) |
52 endif | 57 endif |
53 | 58 |
54 ifeq ($(MAKECMDGOALS),libs-only) | 59 ifeq ($(MAKECMDGOALS),libs-only) |
55 DIRS := $(filter-out tools docs, $(DIRS)) | 60 DIRS := $(filter-out tools docs, $(DIRS)) |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 DIRS := $(filter-out unittests, $(DIRS)) | 104 DIRS := $(filter-out unittests, $(DIRS)) |
100 endif | 105 endif |
101 | 106 |
102 # If we're cross-compiling, build the build-hosted tools first | 107 # If we're cross-compiling, build the build-hosted tools first |
103 ifeq ($(LLVM_CROSS_COMPILING),1) | 108 ifeq ($(LLVM_CROSS_COMPILING),1) |
104 all:: cross-compile-build-tools | 109 all:: cross-compile-build-tools |
105 | 110 |
106 clean:: | 111 clean:: |
107 $(Verb) rm -rf BuildTools | 112 $(Verb) rm -rf BuildTools |
108 | 113 |
| 114 # @LOCALMOD-START Pass BUILD_CFLAGS et al through for host libcxx; |
| 115 # Only required to build on Ubuntu Precise |
109 cross-compile-build-tools: | 116 cross-compile-build-tools: |
110 $(Verb) if [ ! -f BuildTools/Makefile ]; then \ | 117 $(Verb) if [ ! -f BuildTools/Makefile ]; then \ |
111 $(MKDIR) BuildTools; \ | 118 $(MKDIR) BuildTools; \ |
112 cd BuildTools ; \ | 119 cd BuildTools ; \ |
113 » unset CFLAGS ; \ | 120 » CFLAGS="$(BUILD_CFLAGS)" ; \ |
114 » unset CXXFLAGS ; \ | 121 » CXXFLAGS="$(BUILD_CXXFLAGS)" ; \ |
| 122 » LDFLAGS="$(BUILD_LDFLAGS)" ; \ |
115 AR=$(BUILD_AR) ; \ | 123 AR=$(BUILD_AR) ; \ |
116 AS=$(BUILD_AS) ; \ | 124 AS=$(BUILD_AS) ; \ |
117 LD=$(BUILD_LD) ; \ | 125 LD=$(BUILD_LD) ; \ |
118 CC=$(BUILD_CC) ; \ | 126 CC=$(BUILD_CC) ; \ |
119 CXX=$(BUILD_CXX) ; \ | 127 CXX=$(BUILD_CXX) ; \ |
120 unset SDKROOT ; \ | 128 unset SDKROOT ; \ |
121 unset UNIVERSAL_SDK_PATH ; \ | 129 unset UNIVERSAL_SDK_PATH ; \ |
122 configure_opts= ; \ | 130 configure_opts= ; \ |
123 if test "$(ENABLE_LIBCPP)" -ne 0 ; then \ | 131 if test "$(ENABLE_LIBCPP)" -ne 0 ; then \ |
124 configure_opts="$$configure_opts --enable-libcpp"; \ | 132 configure_opts="$$configure_opts --enable-libcpp"; \ |
125 fi; \ | 133 fi; \ |
126 $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \ | 134 $(PROJ_SRC_DIR)/configure --build=$(BUILD_TRIPLE) \ |
127 --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE) \ | 135 --host=$(BUILD_TRIPLE) --target=$(BUILD_TRIPLE) \ |
128 --disable-polly $$configure_opts; \ | 136 --disable-polly $$configure_opts; \ |
129 cd .. ; \ | 137 cd .. ; \ |
130 fi; \ | 138 fi; \ |
131 ($(MAKE) -C BuildTools \ | 139 ($(MAKE) -C BuildTools \ |
132 BUILD_DIRS_ONLY=1 \ | 140 BUILD_DIRS_ONLY=1 \ |
| 141 PNACL_BROWSER_TRANSLATOR=0 \ |
133 UNIVERSAL= \ | 142 UNIVERSAL= \ |
134 UNIVERSAL_SDK_PATH= \ | 143 UNIVERSAL_SDK_PATH= \ |
135 SDKROOT= \ | 144 SDKROOT= \ |
136 TARGET_NATIVE_ARCH="$(TARGET_NATIVE_ARCH)" \ | 145 TARGET_NATIVE_ARCH="$(TARGET_NATIVE_ARCH)" \ |
137 TARGETS_TO_BUILD="$(TARGETS_TO_BUILD)" \ | 146 TARGETS_TO_BUILD="$(TARGETS_TO_BUILD)" \ |
138 TARGET_LIBS="$(LIBS)" \ | 147 TARGET_LIBS="$(LIBS)" \ |
139 ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \ | 148 ENABLE_OPTIMIZED=$(ENABLE_OPTIMIZED) \ |
140 ENABLE_PROFILING=$(ENABLE_PROFILING) \ | 149 ENABLE_PROFILING=$(ENABLE_PROFILING) \ |
141 ENABLE_COVERAGE=$(ENABLE_COVERAGE) \ | 150 ENABLE_COVERAGE=$(ENABLE_COVERAGE) \ |
142 DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \ | 151 DISABLE_ASSERTIONS=$(DISABLE_ASSERTIONS) \ |
143 ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \ | 152 ENABLE_EXPENSIVE_CHECKS=$(ENABLE_EXPENSIVE_CHECKS) \ |
144 ENABLE_LIBCPP=$(ENABLE_LIBCPP) \ | 153 ENABLE_LIBCPP=$(ENABLE_LIBCPP) \ |
145 » CFLAGS= \ | 154 » CC=$(BUILD_CC) \ |
146 » CXXFLAGS= \ | 155 » CXX=$(BUILD_CXX) \ |
| 156 » CFLAGS="$(BUILD_CFLAGS)" \ |
| 157 » CXXFLAGS="$(BUILD_CXXFLAGS)" \ |
| 158 » LDFLAGS="$(BUILD_LDFLAGS)" \ |
147 ) || exit 1; | 159 ) || exit 1; |
148 endif | 160 endif |
| 161 # @LOCALMOD-END |
149 | 162 |
150 # Include the main makefile machinery. | 163 # Include the main makefile machinery. |
151 include $(LLVM_SRC_ROOT)/Makefile.rules | 164 include $(LLVM_SRC_ROOT)/Makefile.rules |
152 | 165 |
153 # Specify options to pass to configure script when we're | 166 # Specify options to pass to configure script when we're |
154 # running the dist-check target | 167 # running the dist-check target |
155 DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR) | 168 DIST_CHECK_CONFIG_OPTIONS = --with-llvmgccdir=$(LLVMGCCDIR) |
156 | 169 |
157 .PHONY: debug-opt-prof | 170 .PHONY: debug-opt-prof |
158 debug-opt-prof: | 171 debug-opt-prof: |
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 # declare all targets at this level to be serial: | 299 # declare all targets at this level to be serial: |
287 | 300 |
288 .NOTPARALLEL: | 301 .NOTPARALLEL: |
289 | 302 |
290 else # Building "Apple-style." | 303 else # Building "Apple-style." |
291 # In an Apple-style build, once configuration is done, lines marked | 304 # In an Apple-style build, once configuration is done, lines marked |
292 # "Apple-style" are removed with sed! Please don't remove these! | 305 # "Apple-style" are removed with sed! Please don't remove these! |
293 # Look for the string "Apple-style" in utils/buildit/build_llvm. | 306 # Look for the string "Apple-style" in utils/buildit/build_llvm. |
294 include $(shell find . -name GNUmakefile) # Building "Apple-style." | 307 include $(shell find . -name GNUmakefile) # Building "Apple-style." |
295 endif # Building "Apple-style." | 308 endif # Building "Apple-style." |
OLD | NEW |