| 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 # Macros for TOOLS | 12 # Macros for TOOLS |
| 13 # | 13 # |
| 14 # We use the C++ compiler for everything and then use the -Wl,-as-needed flag | 14 # We use the C++ compiler for everything and then use the -Wl,-as-needed flag |
| 15 # in the linker to drop libc++ unless it's actually needed. | 15 # in the linker to drop libc++ unless it's actually needed. |
| 16 # | 16 # |
| 17 HOST_CC ?= cl.exe /nologo | 17 HOST_CC ?= cl.exe /nologo |
| 18 HOST_CXX ?= cl.exe /nologo /EHsc | 18 HOST_CXX ?= cl.exe /nologo /EHsc |
| 19 HOST_LINK ?= link.exe /nologo | 19 HOST_LINK ?= link.exe /nologo |
| 20 HOST_LIB ?= lib.exe /nologo | 20 HOST_LIB ?= lib.exe /nologo |
| 21 | 21 |
| 22 ifeq (,$(findstring cl.exe,$(shell $(WHICH) cl.exe))) | 22 ifeq (,$(findstring cl.exe,$(shell $(WHICH) cl.exe))) |
| 23 $(warning To skip the host build use:) | 23 $(warning To skip the host build use:) |
| 24 $(warning "make NO_HOST_BUILDS=1") | 24 $(warning "make NO_HOST_BUILDS=1") |
| 25 $(error Unable to find cl.exe in PATH while building Windows host build) | 25 $(error Unable to find cl.exe in PATH while building Windows host build) |
| 26 endif | 26 endif |
| 27 | 27 |
| 28 | 28 |
| 29 ifeq ($(CONFIG),Release) | 29 ifeq ($(CONFIG),Release) |
| 30 WIN_OPT_FLAGS ?= /O2 /MT /Z7 | 30 WIN_OPT_FLAGS ?= /O2 /MT /Z7 -DNDEBUG |
| 31 else | 31 else |
| 32 WIN_OPT_FLAGS ?= /Od /MTd /Z7 -DNACL_SDK_DEBUG | 32 WIN_OPT_FLAGS ?= /Od /MTd /Z7 -DNACL_SDK_DEBUG |
| 33 endif | 33 endif |
| 34 | 34 |
| 35 WIN_FLAGS ?= -DWIN32 -D_WIN32 -DPTW32_STATIC_LIB | 35 WIN_FLAGS ?= -DWIN32 -D_WIN32 -DPTW32_STATIC_LIB |
| 36 | 36 |
| 37 | 37 |
| 38 # | 38 # |
| 39 # Individual Macros | 39 # Individual Macros |
| 40 # | 40 # |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 123 # $1 = Target Name | 123 # $1 = Target Name |
| 124 # $2 = Input Name | 124 # $2 = Input Name |
| 125 # | 125 # |
| 126 define STRIP_RULE | 126 define STRIP_RULE |
| 127 all: $(OUTDIR)/$(1)$(HOST_EXT) | 127 all: $(OUTDIR)/$(1)$(HOST_EXT) |
| 128 $(OUTDIR)/$(1)$(HOST_EXT): $(OUTDIR)/$(2)$(HOST_EXT) | 128 $(OUTDIR)/$(1)$(HOST_EXT): $(OUTDIR)/$(2)$(HOST_EXT) |
| 129 $(call LOG,COPY,$$@,$(CP) $$^ $$@) | 129 $(call LOG,COPY,$$@,$(CP) $$^ $$@) |
| 130 endef | 130 endef |
| 131 | 131 |
| 132 all: $(LIB_LIST) $(DEPS_LIST) | 132 all: $(LIB_LIST) $(DEPS_LIST) |
| OLD | NEW |