OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # | 5 # |
6 # GNU Make based build file. For details on GNU Make see: | 6 # GNU Make based build file. For details on GNU Make see: |
7 # http://www.gnu.org/software/make/manual/make.html | 7 # http://www.gnu.org/software/make/manual/make.html |
8 # | 8 # |
9 # | 9 # |
10 | 10 |
11 | 11 |
12 # | 12 # |
13 # Macros for TOOLS | 13 # Macros for TOOLS |
14 # | 14 # |
15 # We use the C++ compiler for everything and then use the -Wl,-as-needed flag | 15 # We use the C++ compiler for everything and then use the -Wl,-as-needed flag |
16 # in the linker to drop libc++ unless it's actually needed. | 16 # in the linker to drop libc++ unless it's actually needed. |
17 # | 17 # |
18 HOST_CC?=gcc | 18 HOST_CC?=gcc |
19 HOST_CXX?=g++ | 19 HOST_CXX?=g++ |
20 HOST_LINK?=g++ | 20 HOST_LINK?=g++ |
21 HOST_LIB?=ar r | 21 HOST_LIB?=ar r |
22 | 22 |
| 23 ifeq (,$(findstring gcc,$(shell $(WHICH) gcc))) |
| 24 $(warning To skip the host build use:) |
| 25 $(warning "make all_versions NO_HOST_BUILDS=1") |
| 26 $(error Unable to find gcc in PATH while building Host build) |
| 27 endif |
| 28 |
23 | 29 |
24 LINUX_WARNINGS?=-Wno-long-long | 30 LINUX_WARNINGS?=-Wno-long-long |
25 LINUX_CCFLAGS=-fPIC -pthread $(LINUX_WARNINGS) -I$(NACL_SDK_ROOT)/include -I$(NA
CL_SDK_ROOT)/include/linux | 31 LINUX_CCFLAGS=-fPIC -pthread $(LINUX_WARNINGS) -I$(NACL_SDK_ROOT)/include -I$(NA
CL_SDK_ROOT)/include/linux |
26 | 32 |
27 | 33 |
28 # | 34 # |
29 # Individual Macros | 35 # Individual Macros |
30 # | 36 # |
31 # $1 = Source Name | 37 # $1 = Source Name |
32 # $2 = Compile Flags | 38 # $2 = Compile Flags |
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
128 NMF:=python $(NACL_SDK_ROOT)/tools/create_nmf.py | 134 NMF:=python $(NACL_SDK_ROOT)/tools/create_nmf.py |
129 | 135 |
130 define NMF_RULE | 136 define NMF_RULE |
131 NMF_LIST+=$(OUTDIR)/$(1).nmf | 137 NMF_LIST+=$(OUTDIR)/$(1).nmf |
132 $(OUTDIR)/$(1).nmf : $(OUTDIR)/$(1)$(HOST_EXT) | 138 $(OUTDIR)/$(1).nmf : $(OUTDIR)/$(1)$(HOST_EXT) |
133 @echo "Host Toolchain" > $$@ | 139 @echo "Host Toolchain" > $$@ |
134 endef | 140 endef |
135 | 141 |
136 all : $(LIB_LIST) $(DEPS_LIST) $(NMF_LIST) | 142 all : $(LIB_LIST) $(DEPS_LIST) $(NMF_LIST) |
137 | 143 |
OLD | NEW |