a19a82ceae43201ac7412fa9aa183034e386726d
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / gonacl_appengine / src / bullet / Makefile
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
4
5 # GNU Makefile based on shared rules provided by the Native Client SDK.
6 # See README.Makefiles for more details.
7
8 VALID_TOOLCHAINS := pnacl
9
10 NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../../..)
11 include $(NACL_SDK_ROOT)/tools/common.mk
12
13 TARGET = NaClAMBullet
14 LIBS = BulletDynamics BulletCollision LinearMath ppapi pthread
15
16 USR_INCLUDE=$(NACL_SDK_ROOT)/toolchain/$(OSNAME)_pnacl/le32-nacl/local/include
17 BULLET_INCLUDE=$(USR_INCLUDE)/bullet
18
19 CFLAGS = -I$(CURDIR) -I$(BULLET_INCLUDE)
20 CFLAGS += -Wall -Wno-overloaded-virtual -Wno-unused-variable
21 SOURCES = \
22         NaClAMBase/NaClAMBase.cpp \
23         NaClAMBase/NaClAMMessageCollector.cpp \
24         NaClAMBase/jsoncpp.cpp \
25         NaClAMBullet/NaClAMBullet.cpp
26
27 # Build rules generated by macros from common.mk:
28
29 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
30
31 # The PNaCl workflow uses both an unstripped and finalized/stripped binary.
32 # On NaCl, only produce a stripped binary for Release configs (not Debug).
33 ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
34 $(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
35 $(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
36 else
37 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
38 endif
39
40 $(eval $(call NMF_RULE,$(TARGET),))