summaryrefslogtreecommitdiffstats
path: root/native_client_sdk/src/gonacl_appengine/src/bullet/Makefile
blob: 0d436fa4bb379d908202e356df7005793d7855ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

# GNU Makefile based on shared rules provided by the Native Client SDK.
# See README.Makefiles for more details.

VALID_TOOLCHAINS := pnacl

NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../../..)
include $(NACL_SDK_ROOT)/tools/common.mk

TARGET = NaClAMBullet
LIBS = BulletDynamics BulletCollision LinearMath ppapi pthread

USR_INCLUDE=$(NACL_SDK_ROOT)/toolchain/$(OSNAME)_pnacl/usr/local/include
BULLET_INCLUDE=$(USR_INCLUDE)/bullet

CFLAGS = -I$(CURDIR) -I$(BULLET_INCLUDE)
CFLAGS += -Wall -Wno-overloaded-virtual -Wno-unused-variable
SOURCES = \
	NaClAMBase/NaClAMBase.cpp \
	NaClAMBase/NaClAMMessageCollector.cpp \
	NaClAMBase/jsoncpp.cpp \
	NaClAMBullet/NaClAMBullet.cpp

# Build rules generated by macros from common.mk:

$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))

# The PNaCl workflow uses both an unstripped and finalized/stripped binary.
# On NaCl, only produce a stripped binary for Release configs (not Debug).
ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
else
$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
endif

$(eval $(call NMF_RULE,$(TARGET),))