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

Side by Side Diff: native_client_sdk/src/examples/tumbler/Makefile

Issue 10541180: Cleanup build system (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 6 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
(Empty)
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
3 # found in the LICENSE file.
4
5 #
6 # GNU Make based build file.  For details on GNU Make see:
7 #   http://www.gnu.org/software/make/manual/make.html
8 #
9
10 #
11 # Project information
12 #
13 # These variables store project specific settings for the project name
14 # build flags, files to copy or install.  In the examples it is typically
15 # only the list of sources and project name that will actually change and
16 # the rest of the makefile is boilerplate for defining build rules.
17 #
18 PROJECT:=tumbler
19 LDFLAGS:=-lppapi_gles2 -lppapi_cpp -lppapi
20 CXX_SOURCES:=$(PROJECT).cc
21 CXX_SOURCES+=transforms.cc shader_util.cc opengl_context.cc tumbler_module.cc
22 CXX_SOURCES+=scripting_bridge.cc cube.cc
23
24 #
25 # Get pepper directory for toolchain and includes.
26 #
27 # If PEPPER_ROOT is not set, then assume it can be found a two directories up,
28 # from the default example directory location.
29 #
30 THIS_MAKEFILE:=$(abspath $(lastword $(MAKEFILE_LIST)))
31 NACL_SDK_ROOT?=$(abspath $(dir $(THIS_MAKEFILE))../..)
32
33 # Project Build flags
34 WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror
35 CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS)
36
37 #
38 # Compute tool paths
39 #
40 #
41 OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py)
42 TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib)
43 CXX:=$(TC_PATH)/bin/i686-nacl-g++
44
45 #
46 # Disable DOS PATH warning when using Cygwin based tools Windows
47 #
48 CYGWIN ?= nodosfilewarning
49 export CYGWIN
50
51
52 # Declare the ALL target first, to make the 'all' target the default build
53 all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe
54
55 # Define 32 bit compile and link rules for C++ sources
56 x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES))
57 $(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE)
58 $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS)
59
60 $(PROJECT)_x86_32.nexe : $(x86_32_OBJS)
61 $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS)
62
63 # Define 64 bit compile and link rules for C++ sources
64 x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES))
65 $(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE)
66 $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS)
67
68 $(PROJECT)_x86_64.nexe : $(x86_64_OBJS)
69 $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS)
70
71
72 # Define a phony rule so it always runs, to build nexe and start up server.
73 .PHONY: RUN
74 RUN: all
75 python ../httpd.py
76
77
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698