Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / native_client_sdk / src / gonacl_appengine / src / cube / 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 := newlib glibc pnacl
9
10 NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../../..)
11 include $(NACL_SDK_ROOT)/tools/common.mk
12
13 TARGET = cube
14 LIBS = $(DEPS) ppapi_gles2 ppapi_cpp ppapi pthread
15
16 CFLAGS = -Wall -I..
17 SOURCES = \
18         cube.cc \
19         texture.cc \
20         matrix.cc
21
22 # Build rules generated by macros from common.mk:
23
24 $(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS))))
25
26 # The PNaCl workflow uses both an unstripped and finalized/stripped binary.
27 # On NaCl, only produce a stripped binary for Release configs (not Debug).
28 ifneq (,$(or $(findstring pnacl,$(TOOLCHAIN)),$(findstring Release,$(CONFIG))))
29 $(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS)))
30 $(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped))
31 else
32 $(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS)))
33 endif
34
35 $(eval $(call NMF_RULE,$(TARGET),))