# Copyright (c) 2012 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 Make based build file. For details on GNU Make see: # http://www.gnu.org/software/make/manual/make.html # # # Get pepper directory for toolchain and includes. # # If NACL_SDK_ROOT is not set, then assume it can be found a two directories up, # from the default example directory location. # THIS_MAKEFILE:=$(abspath $(lastword $(MAKEFILE_LIST))) NACL_SDK_ROOT?=$(abspath $(dir $(THIS_MAKEFILE))../..) CHROME_PATH?=Undefined # # Defaults # NACL_WARNINGS:=-Wno-long-long # # Compute path to requested NaCl Toolchain # OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain) # # Project Settings # __PROJECT_SETTINGS__ # # Project Targets # __PROJECT_TARGETS__ # # Alias for standard commands # CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp MKDIR:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir MV:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mv RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm # # Verify we selected a valid toolchain for this example # ifeq (,$(findstring $(TOOLCHAIN),$(VALID_TOOLCHAINS))) $(warning Availbile choices are: $(VALID_TOOLCHAINS)) $(error Can not use TOOLCHAIN=$(TOOLCHAIN) on this library.) endif # # Verify we have a valid NACL_SDK_ROOT by looking for the toolchain directory # ifeq (,$(wildcard $(TC_PATH))) $(warning No valid NACL_SDK_ROOT at $(NACL_SDK_ROOT)) ifeq ($(origin NACL_SDK_ROOT), 'file') $(error Override the default value via enviornment variable, or command-line.) else $(error Fix the NACL_SDK_ROOT specified in the environment or command-line.) endif endif # # Disable DOS PATH warning when using Cygwin based NaCl tools on Windows # CYGWIN ?= nodosfilewarning export CYGWIN # # Defaults for TOOLS # __PROJECT_TOOLS__ __PROJECT_RULES__