Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(102)

Side by Side Diff: native_client_sdk/src/build_tools/library.mk

Issue 10829027: [NaCl SDK] Add nacl_mounts to NaCl SDK build. Experimental for now. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix for windows Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Native Client Authors. All rights reserved. 1 # Copyright (c) 2012 The Native Client Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # 5 #
6 # GNU Make based build file. For details on GNU Make see: 6 # GNU Make based build file. For details on GNU Make see:
7 # http://www.gnu.org/software/make/manual/make.html 7 # http://www.gnu.org/software/make/manual/make.html
8 # 8 #
9 9
10 # 10 #
11 # Get pepper directory for toolchain and includes. 11 # Get pepper directory for toolchain and includes.
12 # 12 #
13 # If NACL_SDK_ROOT is not set, then assume it can be found a two directories up, 13 # If NACL_SDK_ROOT is not set, then assume it can be found a two directories up,
14 # from the default example directory location. 14 # from the default example directory location.
15 # 15 #
16 THIS_MAKEFILE:=$(abspath $(lastword $(MAKEFILE_LIST))) 16 THIS_MAKEFILE:=$(abspath $(lastword $(MAKEFILE_LIST)))
17 NACL_SDK_ROOT?=$(abspath $(dir $(THIS_MAKEFILE))../..) 17 NACL_SDK_ROOT?=$(abspath $(dir $(THIS_MAKEFILE))../..)
18 CHROME_PATH?=Undefined 18 CHROME_PATH?=Undefined
19 19
20 # 20 #
21 # Defaults 21 # Defaults
22 # 22 #
23 NACL_WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -Werror -pedantic 23 NACL_WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -Werror -pedantic
24 NACL_CCFLAGS:=-O0 -g -pthread $(NACL_WARNINGS) 24 NACL_CCFLAGS:=-O0 -g -pthread $(NACL_WARNINGS)
25 NACL_CXXFLAGS:= -O0 -g -pthread -std=gnu++98 $(NACL_WARNINGS) 25 NACL_CXXFLAGS:= -O0 -g -pthread -std=gnu++98 $(NACL_WARNINGS)
26 NACL_LDFLAGS:=-Wl,-as-needed -g -pthread -lppapi_cpp -lppapi 26 NACL_LDFLAGS:=-Wl,-as-needed -g -pthread -lppapi_cpp -lppapi
27 27
28
29 #
30 # Compute path to requested NaCl Toolchain
31 #
32 OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py)
33 TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain)
34
35
28 # 36 #
29 # Project Settings 37 # Project Settings
30 # 38 #
31 __PROJECT_SETTINGS__ 39 __PROJECT_SETTINGS__
32 40
33 # 41 #
34 # Project Targets 42 # Project Targets
35 # 43 #
36 __PROJECT_TARGETS__ 44 __PROJECT_TARGETS__
37 45
38 46
39 # 47 #
40 # Alias for standard commands 48 # Alias for standard commands
41 # 49 #
42 CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp 50 CP:=python $(NACL_SDK_ROOT)/tools/oshelpers.py cp
43 MKDIR:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir 51 MKDIR:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir
44 MV:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mv 52 MV:=python $(NACL_SDK_ROOT)/tools/oshelpers.py mv
45 RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm 53 RM:=python $(NACL_SDK_ROOT)/tools/oshelpers.py rm
46 54
47 55
48 # 56 #
49 # Verify we selected a valid toolchain for this example 57 # Verify we selected a valid toolchain for this example
50 # 58 #
51 ifeq (,$(findstring $(TOOLCHAIN),$(VALID_TOOLCHAINS))) 59 ifeq (,$(findstring $(TOOLCHAIN),$(VALID_TOOLCHAINS)))
52 $(warning Availbile choices are: $(VALID_TOOLCHAINS)) 60 $(warning Availbile choices are: $(VALID_TOOLCHAINS))
53 $(error Can not use TOOLCHAIN=$(TOOLCHAIN) on this example.) 61 $(error Can not use TOOLCHAIN=$(TOOLCHAIN) on this library.)
54 endif 62 endif
55 63
56 64
57 # 65 #
58 # Compute path to requested NaCl Toolchain
59 #
60 OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py)
61 TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain)
62
63
64 #
65 # Verify we have a valid NACL_SDK_ROOT by looking for the toolchain directory 66 # Verify we have a valid NACL_SDK_ROOT by looking for the toolchain directory
66 # 67 #
67 ifeq (,$(wildcard $(TC_PATH))) 68 ifeq (,$(wildcard $(TC_PATH)))
68 $(warning No valid NACL_SDK_ROOT at $(NACL_SDK_ROOT)) 69 $(warning No valid NACL_SDK_ROOT at $(NACL_SDK_ROOT))
69 ifeq ($(origin NACL_SDK_ROOT), 'file') 70 ifeq ($(origin NACL_SDK_ROOT), 'file')
70 $(error Override the default value via enviornment variable, or command-line.) 71 $(error Override the default value via enviornment variable, or command-line.)
71 else 72 else
72 $(error Fix the NACL_SDK_ROOT specified in the environment or command-line.) 73 $(error Fix the NACL_SDK_ROOT specified in the environment or command-line.)
73 endif 74 endif
74 endif 75 endif
75 76
76 77
77 # 78 #
78 # Disable DOS PATH warning when using Cygwin based NaCl tools on Windows 79 # Disable DOS PATH warning when using Cygwin based NaCl tools on Windows
79 # 80 #
80 CYGWIN ?= nodosfilewarning 81 CYGWIN ?= nodosfilewarning
81 export CYGWIN 82 export CYGWIN
82 83
83 84
84 # 85 #
85 # Defaults for TOOLS 86 # Defaults for TOOLS
86 # 87 #
87 __PROJECT_TOOLS__ 88 __PROJECT_TOOLS__
88 89
89 __PROJECT_RULES__ 90 __PROJECT_RULES__
90 91
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698