Send a crash report when a hung process is detected.
[chromium-blink-merge.git] / native_client_sdk / src / getting_started / part1 / Makefile
blob2efe770efb108f5843440271a418e6d61615da4c
1 # Copyright (c) 2013 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.
6 # GNU Make based build file.  For details on GNU Make see:
7 # http://www.gnu.org/software/make/manual/make.html
11 # Get pepper directory for toolchain and includes.
13 # If NACL_SDK_ROOT is not set, then assume it can be found three directories up.
15 THIS_MAKEFILE := $(abspath $(lastword $(MAKEFILE_LIST)))
16 NACL_SDK_ROOT ?= $(abspath $(dir $(THIS_MAKEFILE))../..)
18 # Project Build flags
19 WARNINGS := -Wno-long-long -Wall -Wswitch-enum -pedantic -Werror
20 CXXFLAGS := -pthread -std=gnu++98 $(WARNINGS)
23 # Compute tool paths
25 GETOS := python $(NACL_SDK_ROOT)/tools/getos.py
26 OSHELPERS = python $(NACL_SDK_ROOT)/tools/oshelpers.py
27 OSNAME := $(shell $(GETOS))
28 RM := $(OSHELPERS) rm
30 PNACL_TC_PATH := $(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_pnacl)
31 PNACL_CXX := $(PNACL_TC_PATH)/bin/pnacl-clang++
32 PNACL_FINALIZE := $(PNACL_TC_PATH)/bin/pnacl-finalize
33 CXXFLAGS := -I$(NACL_SDK_ROOT)/include
34 LDFLAGS := -L$(NACL_SDK_ROOT)/lib/pnacl/Release -lppapi_cpp -lppapi
37 # Disable DOS PATH warning when using Cygwin based tools Windows
39 CYGWIN ?= nodosfilewarning
40 export CYGWIN
43 # Declare the ALL target first, to make the 'all' target the default build
44 all: hello_tutorial.pexe
46 clean:
47 $(RM) hello_tutorial.pexe hello_tutorial.bc
49 hello_tutorial.bc: hello_tutorial.cc
50 $(PNACL_CXX) -o $@ $< -O2 $(CXXFLAGS) $(LDFLAGS)
52 hello_tutorial.pexe: hello_tutorial.bc
53 $(PNACL_FINALIZE) -o $@ $<
57 # Makefile target to run the SDK's simple HTTP server and serve this example.
59 HTTPD_PY := python $(NACL_SDK_ROOT)/tools/httpd.py
61 .PHONY: serve
62 serve: all
63 $(HTTPD_PY) -C $(CURDIR)