11e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)# Copyright (c) 2013 The Chromium Authors. All rights reserved. 21e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)# Use of this source code is governed by a BSD-style license that can be 31e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)# found in the LICENSE file. 41e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 51e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)# GNU Makefile based on shared rules provided by the Native Client SDK. 61e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)# See README.Makefiles for more details. 71e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 81e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)VALID_TOOLCHAINS := newlib glibc pnacl 91e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 101e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)NACL_SDK_ROOT ?= $(abspath $(CURDIR)/../../..) 111e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)include $(NACL_SDK_ROOT)/tools/common.mk 121e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 131e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)TARGET = life 141e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)LIBS = $(DEPS) ppapi_simple nacl_io sdk_util ppapi_cpp ppapi pthread 151e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 16f2477e01787aa58f445919b809d89e252beef54fTorne (Richard Coles)CFLAGS = -Wall -I.. 171e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)SOURCES = life.c 181e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 191e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)# Build rules generated by macros from common.mk: 201e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 211e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)$(foreach src,$(SOURCES),$(eval $(call COMPILE_RULE,$(src),$(CFLAGS)))) 221e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 231e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)ifeq ($(CONFIG),Release) 241e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)$(eval $(call LINK_RULE,$(TARGET)_unstripped,$(SOURCES),$(LIBS),$(DEPS))) 251e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)$(eval $(call STRIP_RULE,$(TARGET),$(TARGET)_unstripped)) 261e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)else 271e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)$(eval $(call LINK_RULE,$(TARGET),$(SOURCES),$(LIBS),$(DEPS))) 281e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)endif 291e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles) 301e9bf3e0803691d0a228da41fc608347b6db4340Torne (Richard Coles)$(eval $(call NMF_RULE,$(TARGET),)) 31