| 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 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 56 # | 56 # |
| 57 # Get pepper directory for toolchain and includes. | 57 # Get pepper directory for toolchain and includes. |
| 58 # | 58 # |
| 59 # If NACL_SDK_ROOT is not set, then assume it can be found relative to | 59 # If NACL_SDK_ROOT is not set, then assume it can be found relative to |
| 60 # to this Makefile. | 60 # to this Makefile. |
| 61 # | 61 # |
| 62 ifndef NACL_SDK_ROOT | 62 ifndef NACL_SDK_ROOT |
| 63 $(error NACL_SDK_ROOT not set) | 63 $(error NACL_SDK_ROOT not set) |
| 64 endif | 64 endif |
| 65 | 65 |
| 66 NACL_SDK_VERSION_MIN := 27.184438 | 66 NACL_SDK_VERSION_MIN := 27.186236 |
| 67 include $(NACL_SDK_ROOT)/tools/common.mk | 67 include $(NACL_SDK_ROOT)/tools/common.mk |
| 68 | 68 |
| 69 # In recent SDK versions defining NACL_SDK_VERSION_MIN is enough to trigger and
error | 69 # In recent SDK versions defining NACL_SDK_VERSION_MIN is enough to trigger and
error |
| 70 # but older SDKs didn't know about this so we check for older versions that don'
t | 70 # but older SDKs didn't know about this so we check for older versions that don'
t |
| 71 # support --sdk-version | 71 # support --sdk-version |
| 72 SDK_VERSION := $(shell $(GETOS) --sdk-version) | 72 SDK_VERSION := $(shell $(GETOS) --sdk-version) |
| 73 ifndef SDK_VERSION | 73 ifndef SDK_VERSION |
| 74 $(error You need a more recent version of the NaCl SDK (>= $(NACL_SDK_VERSION_
MIN))) | 74 $(error You need a more recent version of the NaCl SDK (>= $(NACL_SDK_VERSION_
MIN))) |
| 75 endif | 75 endif |
| 76 | 76 |
| 77 ifdef NACL_MOUNTS | |
| 78 CFLAGS += -DOLD_NACL_MOUNTS | |
| 79 endif | |
| 80 CFLAGS += -DCOCOS2D_DEBUG -DCC_ENABLE_BOX2D_INTEGRATION | 77 CFLAGS += -DCOCOS2D_DEBUG -DCC_ENABLE_BOX2D_INTEGRATION |
| 81 CFLAGS += -Wall -Wno-unknown-pragmas | 78 CFLAGS += -Wall -Wno-unknown-pragmas |
| 82 | 79 |
| 83 COCOS2DX_PATH = $(OUTBASE)/cocos2dx | 80 COCOS2DX_PATH = $(OUTBASE)/cocos2dx |
| 84 | 81 |
| 85 # By default we pull naclports from the installed SDK, but we can | 82 # By default we pull naclports from the installed SDK, but we can |
| 86 # build and use them locally by defining LOCAL_PORTS | 83 # build and use them locally by defining LOCAL_PORTS |
| 87 ifdef LOCAL_PORTS | 84 ifdef LOCAL_PORTS |
| 88 NACLPORTS_ROOT = $(OUTBASE)/naclports | 85 NACLPORTS_ROOT = $(OUTBASE)/naclports |
| 89 else | 86 else |
| (...skipping 27 matching lines...) Expand all Loading... |
| 117 # Notice that libc is implied and come last through standard compiler/link | 114 # Notice that libc is implied and come last through standard compiler/link |
| 118 # switches. | 115 # switches. |
| 119 # | 116 # |
| 120 # We break this list down into two parts, the set we need to rebuild (DEPS) | 117 # We break this list down into two parts, the set we need to rebuild (DEPS) |
| 121 # and the set we do not. This example does not havea any additional library | 118 # and the set we do not. This example does not havea any additional library |
| 122 # dependencies. | 119 # dependencies. |
| 123 # | 120 # |
| 124 DEPS= | 121 DEPS= |
| 125 SOUNDLIBS=cocosdenshion alut openal vorbisfile vorbis ogg | 122 SOUNDLIBS=cocosdenshion alut openal vorbisfile vorbis ogg |
| 126 LIBS=$(DEPS) lua cocos2d $(SOUNDLIBS) freetype box2d xml2 png12 jpeg tiff webp | 123 LIBS=$(DEPS) lua cocos2d $(SOUNDLIBS) freetype box2d xml2 png12 jpeg tiff webp |
| 127 ifdef NACL_MOUNTS | 124 LIBS+=nacl_io ppapi_gles2 ppapi ppapi_cpp z nosys |
| 128 LIBS+=nacl-mounts | |
| 129 else | |
| 130 LIBS+=nacl_io | |
| 131 endif | |
| 132 LIBS+=ppapi_gles2 ppapi ppapi_cpp z nosys | |
| 133 | 125 |
| 134 | 126 |
| 135 # | 127 # |
| 136 # Use the library dependency macro for each dependency | 128 # Use the library dependency macro for each dependency |
| 137 # | 129 # |
| 138 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) | 130 $(foreach dep,$(DEPS),$(eval $(call DEPEND_RULE,$(dep)))) |
| 139 | 131 |
| 140 # | 132 # |
| 141 # Use the compile macro for each source. | 133 # Use the compile macro for each source. |
| 142 # | 134 # |
| (...skipping 20 matching lines...) Expand all Loading... |
| 163 | 155 |
| 164 $(OUTDIR)/$(TARGET)_arm.nexe: \ | 156 $(OUTDIR)/$(TARGET)_arm.nexe: \ |
| 165 $(COCOS2DX_PATH)/lib/newlib_arm/$(CONFIG)/libcocos2d.a \ | 157 $(COCOS2DX_PATH)/lib/newlib_arm/$(CONFIG)/libcocos2d.a \ |
| 166 $(COCOS2DX_PATH)/lib/newlib_arm/$(CONFIG)/liblua.a \ | 158 $(COCOS2DX_PATH)/lib/newlib_arm/$(CONFIG)/liblua.a \ |
| 167 $(COCOS2DX_PATH)/lib/newlib_arm/$(CONFIG)/libbox2d.a | 159 $(COCOS2DX_PATH)/lib/newlib_arm/$(CONFIG)/libbox2d.a |
| 168 | 160 |
| 169 $(OUTDIR)/$(TARGET)_x86_32.nexe: \ | 161 $(OUTDIR)/$(TARGET)_x86_32.nexe: \ |
| 170 $(COCOS2DX_PATH)/lib/newlib_x86_32/$(CONFIG)/libcocos2d.a \ | 162 $(COCOS2DX_PATH)/lib/newlib_x86_32/$(CONFIG)/libcocos2d.a \ |
| 171 $(COCOS2DX_PATH)/lib/newlib_x86_32/$(CONFIG)/liblua.a \ | 163 $(COCOS2DX_PATH)/lib/newlib_x86_32/$(CONFIG)/liblua.a \ |
| 172 $(COCOS2DX_PATH)/lib/newlib_x86_32/$(CONFIG)/libbox2d.a | 164 $(COCOS2DX_PATH)/lib/newlib_x86_32/$(CONFIG)/libbox2d.a |
| OLD | NEW |