diff options
27 files changed, 3 insertions, 1836 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py index 4519e89..06c25f5 100755 --- a/native_client_sdk/src/build_tools/build_sdk.py +++ b/native_client_sdk/src/build_tools/build_sdk.py @@ -340,7 +340,7 @@ EXAMPLE_MAP = { 'gamepad', 'geturl', 'hello_world_interactive', - 'hello_world_newlib', + 'hello_world', # 'hello_world_gles', 'input_events', 'load_progress', diff --git a/native_client_sdk/src/examples/debugging/Makefile b/native_client_sdk/src/examples/debugging/Makefile deleted file mode 100644 index 91200cb..0000000 --- a/native_client_sdk/src/examples/debugging/Makefile +++ /dev/null @@ -1,120 +0,0 @@ -# Copyright (c) 2012 The Native Client 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 - -# -# Project Build flags -# -# Turns on warnings (-Wxxx), builds with zero optimization (-O0) and adds debug -# information (-g) for correctness and ease of debugging. -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -Werror -pedantic -CFLAGS:=-pthread -O0 -g $(WARNINGS) -fno-omit-frame-pointer -LDFLAGS:=-pthread -lppapi -CC_SOURCES:=hello_world.c untrusted_crash_dump.c string_stream.c -PROJECT:=hello_world - -# -# Compute path to compiler -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) - -# -# Verify we have a valid NACL_SDK_ROOT -# -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 - -# Alias for C compiler -CC:=$(TC_PATH)/bin/i686-nacl-gcc - - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Default target is everything -all : hello_world_x86_32.nexe hello_world_x86_64.nexe - -# Define 32 bit compile and link rules for C sources -x86_32_OBJS:=$(patsubst %.c,%_32.o,$(CC_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.c $(THIS_MAKE) - $(CC) -o $@ -c $< -m32 -O0 -g $(CCFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CC) -o $@ $^ -m32 -O0 -g $(CCFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C sources -x86_64_OBJS:=$(patsubst %.c,%_64.o,$(CC_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.c $(THIS_MAKE) - $(CC) -o $@ -c $< -m64 -O0 -g $(CCFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CC) -o $@ $^ -m64 -O0 -g $(CCFLAGS) $(LDFLAGS) - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - -# -# Setup environment to use SDK's version of the NaCl plugin, instead of the -# one built into Chrome. This requries launching Chrome which means we must -# be able to find it. It also means that we must determine which versions -# of the plugin, loader, irt, and any other helpers we must use. -# -HELPER_PATH:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py --helper) -IRTBIN_PATH:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py --irtbin) -LOADER_PATH:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py --loader) -PLUGIN_PATH:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py --plugin) -CHROME_ARGS:=--incognito --no-sandbox -CHROME_ARGS+="--register-pepper-plugins=$(PLUGIN_PATH);application/x-nacl" -CHROME_ARGS+="localhost:5103/debugging.html" - - -.PHONY: SETUP_FOR_CHROME -SETUP_FOR_CHROME: -ifeq (,$(wildcard $(CHROME_PATH))) - $(warning No valid Chrome found at CHROME_PATH=$(CHROME_PATH)) - $(error Set CHROME_PATH via an environment variable, or command-line.) -endif - - -ifneq (,$(wildcard $(CHROME_PATH))) -export NACL_DANGEROUS_ENABLE_FILE_ACCESS=1 -export NACL_SECURITY_DISABLE=1 -export NACL_UNTRUSTED_EXCEPTION_HANDLING=1 -export NACL_SEL_LDR=$(LOADER_PATH) -export NACL_IRT_LIBRARY=$(IRTBIN_PATH) -export NACL_SEL_LDR_BOOTSTRAP=$(HELPER_PATH) -endif - - -TRACE: SETUP_FOR_CHROME all - $(CHROME_PATH) $(CHROME_ARGS) diff --git a/native_client_sdk/src/examples/dlopen/Makefile b/native_client_sdk/src/examples/dlopen/Makefile deleted file mode 100644 index c19fa49..0000000 --- a/native_client_sdk/src/examples/dlopen/Makefile +++ /dev/null @@ -1,134 +0,0 @@ -# Copyright (c) 2012 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=dlopen -WARNINGS:=-Wno-long-long -Wall -CXXFLAGS:=-g -O0 -pthread -std=gnu++98 $(WARNINGS) -LDFLAGS:=-g -ldl -lppapi_cpp -lppapi - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_glibc) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ -NMF:=python $(NACL_SDK_ROOT)/tools/create_nmf.py - -# -# Create shell aliases -# -# Create Python based aliases for common shell commands like copy or move. -# -COPY:= python $(NACL_SDK_ROOT)/tools/oshelpers.py cp -MKDIR:= python $(NACL_SDK_ROOT)/tools/oshelpers.py mkdir -RM:= python $(NACL_SDK_ROOT)/tools/oshelpers.py rm -MV:= python $(NACL_SDK_ROOT)/tools/oshelpers.py mv - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# -# NMF Manifiest generation -# -NMF:=python $(NACL_SDK_ROOT)/tools/create_nmf.py -NMF+=-D $(TC_PATH)/x86_64-nacl/bin/objdump -NMF_PATHS:=-L $(TC_PATH)/x86_64-nacl/lib32 -L $(TC_PATH)/x86_64-nacl/lib -NMF_PATHS+=-L lib32 -L lib64 - - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build. -# Since the NMF file requires all the binaires for generation we use that as -# the dependency. -all : $(PROJECT).nmf - -# Rules to create subdirectories for libraries -lib32: - $(MKDIR) -p $@ - -lib64: - $(MKDIR) -p $@ - -# Copy all files to that config -$(foreach src,$(COPY_FILES),$(eval $(call FILE_COPY,$(src),DBG))) - -# Build debug version dlopen nexe and eightball.so for 32 and 64 bit. -dlopen_x86_32.o: dlopen.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 $(CXXFLAGS) - -dlopen_x86_32.nexe: dlopen_x86_32.o - $(CXX) -o $@ $< -m32 $(LDFLAGS) - -dlopen_x86_64.o: dlopen.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 $(CXXFLAGS) - -dlopen_x86_64.nexe: dlopen_x86_64.o - $(CXX) -o $@ $< -m64 $(LDFLAGS) - -eightball_x86_32.o: eightball.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 $(CXXFLAGS) -fPIC - -lib32/libeightball.so: eightball_x86_32.o | lib32 - $(CXX) -o $@ $< -m32 $(LDFLAGS) -shared - -eightball_x86_64.o: eightball.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 $(CXXFLAGS) -fPIC - -lib64/libeightball.so: eightball_x86_64.o | lib64 - $(CXX) -o $@ $< -m64 $(LDFLAGS) -shared - -# -# NMF Manifiest generation -# -# Use the python script create_nmf to scan the binaries for dependencies using -# objdump. Pass in the (-L) paths to the default library toolchains so that we -# can find those libraries and have it automatically copy the files (-s) to -# the target directory for us. -NEXES:=dlopen_x86_32.nexe dlopen_x86_64.nexe -NEXES+=lib32/libeightball.so lib64/libeightball.so -NMF_ARGS:=-D $(TC_PATH)/x86_64-nacl/bin/objdump -NMF_PATHS:=-L $(TC_PATH)/x86_64-nacl/lib32 -L $(TC_PATH)/x86_64-nacl/lib64 - -$(PROJECT).nmf : $(NEXES) - $(NMF) -o $@ -s . $^ $(NMF_PATHS) - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - diff --git a/native_client_sdk/src/examples/file_histogram/Makefile b/native_client_sdk/src/examples/file_histogram/Makefile deleted file mode 100644 index da2464b..0000000 --- a/native_client_sdk/src/examples/file_histogram/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=file_histogram -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/file_io/Makefile b/native_client_sdk/src/examples/file_io/Makefile deleted file mode 100644 index 4c665c7..0000000 --- a/native_client_sdk/src/examples/file_io/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=file_io -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/fullscreen_tumbler/Makefile b/native_client_sdk/src/examples/fullscreen_tumbler/Makefile deleted file mode 100644 index 7b28db9..0000000 --- a/native_client_sdk/src/examples/fullscreen_tumbler/Makefile +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright (c) 2012 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=fullscreen_tumbler -LDFLAGS:=-lppapi_gles2 -lppapi_cpp -lppapi -CXX_SOURCES:=tumbler.cc -CXX_SOURCES+=transforms.cc shader_util.cc opengl_context.cc tumbler_module.cc -CXX_SOURCES+=scripting_bridge.cc cube.cc - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - - diff --git a/native_client_sdk/src/examples/gamepad/Makefile b/native_client_sdk/src/examples/gamepad/Makefile deleted file mode 100644 index b533d29..0000000 --- a/native_client_sdk/src/examples/gamepad/Makefile +++ /dev/null @@ -1,90 +0,0 @@ -# Copyright (c) 2012 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=gamepad -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc gamepad_module.cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for main application -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 32 bit compile and link rules for loadable library -eightball_x86_32.o: eightball.cc $(THIS_MAKE) | DBG - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) -fPIC - -lib32/libeightball.so: eightball_x86_32.o $(THIS_MAKE) | lib32 - $(CXX) -o $@ $< -m32 $(CXXFLAGS) $(LDFLAGS) -shared - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for loadable library -eightball_x86_64.o: eightball.cc $(THIS_MAKE) | DBG - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) -fPIC - -lib64/libeightball.so: eightball_x86_64.o $(THIS_MAKE) | lib64 - $(CXX) -o $@ $< -m64 $(CXXFLAGS) $(LDFLAGS) -shared - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - - diff --git a/native_client_sdk/src/examples/geturl/Makefile b/native_client_sdk/src/examples/geturl/Makefile deleted file mode 100644 index 806932f..0000000 --- a/native_client_sdk/src/examples/geturl/Makefile +++ /dev/null @@ -1,73 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# -PROJECT:=geturl -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc geturl_handler.cc - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - diff --git a/native_client_sdk/src/examples/hello_world_newlib/example.dsc b/native_client_sdk/src/examples/hello_world/example.dsc index fbc1a01..fbc1a01 100644 --- a/native_client_sdk/src/examples/hello_world_newlib/example.dsc +++ b/native_client_sdk/src/examples/hello_world/example.dsc diff --git a/native_client_sdk/src/examples/hello_world_pnacl/hello_world.c b/native_client_sdk/src/examples/hello_world/hello_world.c index ec59896..79ecc75 100644 --- a/native_client_sdk/src/examples/hello_world_pnacl/hello_world.c +++ b/native_client_sdk/src/examples/hello_world/hello_world.c @@ -22,6 +22,7 @@ #include "ppapi/c/ppp_instance.h" #include "ppapi/c/ppp_messaging.h" + static PPB_Messaging* ppb_messaging_interface = NULL; static PPB_Var* ppb_var_interface = NULL; @@ -68,7 +69,7 @@ static PP_Bool Instance_DidCreate(PP_Instance instance, const char* argn[], const char* argv[]) { ppb_messaging_interface->PostMessage(instance, - CStrToVar("Hello a World (PNACL)")); + CStrToVar("Hello World: " TCNAME)); return PP_TRUE; } diff --git a/native_client_sdk/src/examples/hello_world_newlib/hello_world.html b/native_client_sdk/src/examples/hello_world/hello_world.html index 982fe7a..982fe7a 100644 --- a/native_client_sdk/src/examples/hello_world_newlib/hello_world.html +++ b/native_client_sdk/src/examples/hello_world/hello_world.html diff --git a/native_client_sdk/src/examples/hello_world_newlib/hello_world.nmf b/native_client_sdk/src/examples/hello_world/hello_world.nmf index 78df8e1..78df8e1 100644 --- a/native_client_sdk/src/examples/hello_world_newlib/hello_world.nmf +++ b/native_client_sdk/src/examples/hello_world/hello_world.nmf diff --git a/native_client_sdk/src/examples/hello_world_interactive/Makefile b/native_client_sdk/src/examples/hello_world_interactive/Makefile deleted file mode 100644 index 6641177..0000000 --- a/native_client_sdk/src/examples/hello_world_interactive/Makefile +++ /dev/null @@ -1,70 +0,0 @@ -# Copyright (c) 2012 The Native Client 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))../..) - - -# -# Project Build flags -# -# Turns on warnings (-Wxxx), builds with zero optimization (-O0) and adds debug -# information (-g) for correctness and ease of debugging. -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -Werror -pedantic -CXXFLAGS:=-pthread -O0 $(WARNINGS) -LDFLAGS:=-lppapi_cpp -lppapi - -# -# Compute path to compiler -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) - - -# Alias for C compiler -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - -# Default target is everything -all : hello_world_x86_32.nexe hello_world_x86_64.nexe - -# Define 32 bit compile rule for C++ sources -hello_world_32.o helper_functions_32.o : %_32.o : %.cc - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -# Define 64 bit compile rule for C++ sources -hello_world_64.o helper_functions_64.o : %_64.o : %.cc - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -# Define link rule for 32 bit (-m32) nexe -hello_world_x86_32.nexe : hello_world_32.o helper_functions_32.o - $(CXX) -o $@ $^ -m32 -O0 -g $(LDFLAGS) - -# Define link rule for 64 bit (-m64) nexe -hello_world_x86_64.nexe : hello_world_64.o helper_functions_64.o - $(CXX) -o $@ $^ -m64 -O0 -g $(LDFLAGS) - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - diff --git a/native_client_sdk/src/examples/hello_world_newlib/Makefile b/native_client_sdk/src/examples/hello_world_newlib/Makefile deleted file mode 100644 index 71f29cb..0000000 --- a/native_client_sdk/src/examples/hello_world_newlib/Makefile +++ /dev/null @@ -1,61 +0,0 @@ -# Copyright (c) 2012 The Native Client 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))../..) - - -# -# Project Build flags -# -# Turns on warnings (-Wxxx), builds with zero optimization (-O0) and adds debug -# information (-g) for correctness and ease of debugging. -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -Werror -pedantic -CFLAGS:=-pthread -O0 -g $(WARNINGS) - - -# -# Compute path to compiler -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) - - -# Alias for C compiler -CC:=$(TC_PATH)/bin/i686-nacl-gcc - - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - -# Default target is everything -all : hello_world_x86_32.nexe hello_world_x86_64.nexe - -# Define compile and link rule for 32 bit (-m32) nexe -hello_world_x86_32.nexe : hello_world.c $(THIS_MAKE) - $(CC) -o $@ $< -m32 -O0 -g $(CFLAGS) -lppapi - -# Define compile and link rule for 64 bit (-m64) nexe -hello_world_x86_64.nexe : hello_world.c $(THIS_MAKE) - $(CC) -o $@ $< -m64 -O0 -g $(CFLAGS) -lppapi - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py diff --git a/native_client_sdk/src/examples/hello_world_newlib/hello_world.c b/native_client_sdk/src/examples/hello_world_newlib/hello_world.c deleted file mode 100644 index fb90e40..0000000 --- a/native_client_sdk/src/examples/hello_world_newlib/hello_world.c +++ /dev/null @@ -1,197 +0,0 @@ -/* 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. - */ - -/** @file hello_world.c - * This example demonstrates loading, running and scripting a very simple - * NaCl module. - */ -#include <stdio.h> -#include <stdlib.h> -#include <string.h> - -#include "ppapi/c/pp_errors.h" -#include "ppapi/c/pp_module.h" -#include "ppapi/c/pp_var.h" -#include "ppapi/c/ppb.h" -#include "ppapi/c/ppb_instance.h" -#include "ppapi/c/ppb_messaging.h" -#include "ppapi/c/ppb_var.h" -#include "ppapi/c/ppp.h" -#include "ppapi/c/ppp_instance.h" -#include "ppapi/c/ppp_messaging.h" - -/** - * The toolchain name macro will be once of these three values, so we will use - * it to select which string we print. - */ -enum { - newlib = 0, - glibc = 1, - pnacl = 2 -}; - -static const char* s_HelloMsg[3] = { - "Hello World (newlib)", - "Hello World (glibc)", - "Hello World (pnacl)" -}; - -static PPB_Messaging* ppb_messaging_interface = NULL; -static PPB_Var* ppb_var_interface = NULL; - - -/** - * Creates new string PP_Var from C string. The resulting object will be a - * refcounted string object. It will be AddRef()ed for the caller. When the - * caller is done with it, it should be Release()d. - * @param[in] str C string to be converted to PP_Var - * @return PP_Var containing string. - */ -static struct PP_Var CStrToVar(const char* str) { - if (ppb_var_interface != NULL) { - return ppb_var_interface->VarFromUtf8(str, strlen(str)); - } - return PP_MakeUndefined(); -} - - -/** - * Called when the NaCl module is instantiated on the web page. The identifier - * of the new instance will be passed in as the first argument (this value is - * generated by the browser and is an opaque handle). This is called for each - * instantiation of the NaCl module, which is each time the <embed> tag for - * this module is encountered. - * - * If this function reports a failure (by returning @a PP_FALSE), the NaCl - * module will be deleted and DidDestroy will be called. - * @param[in] instance The identifier of the new instance representing this - * NaCl module. - * @param[in] argc The number of arguments contained in @a argn and @a argv. - * @param[in] argn An array of argument names. These argument names are - * supplied in the <embed> tag, for example: - * <embed id="nacl_module" dimensions="2"> - * will produce two arguments, one named "id" and one named "dimensions". - * @param[in] argv An array of argument values. These are the values of the - * arguments listed in the <embed> tag. In the above example, there will - * be two elements in this array, "nacl_module" and "2". The indices of - * these values match the indices of the corresponding names in @a argn. - * @return @a PP_TRUE on success. - */ -static PP_Bool Instance_DidCreate(PP_Instance instance, - uint32_t argc, - const char* argn[], - const char* argv[]) { - ppb_messaging_interface->PostMessage(instance, CStrToVar(s_HelloMsg[TCNAME])); - return PP_TRUE; -} - - -/** - * Called when the NaCl module is destroyed. This will always be called, - * even if DidCreate returned failure. This routine should deallocate any data - * associated with the instance. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - */ -static void Instance_DidDestroy(PP_Instance instance) { -} - -/** - * Called when the position, the size, or the clip rect of the element in the - * browser that corresponds to this NaCl module has changed. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - * @param[in] position The location on the page of this NaCl module. This is - * relative to the top left corner of the viewport, which changes as the - * page is scrolled. - * @param[in] clip The visible region of the NaCl module. This is relative to - * the top left of the plugin's coordinate system (not the page). If the - * plugin is invisible, @a clip will be (0, 0, 0, 0). - */ -static void Instance_DidChangeView(PP_Instance instance, - PP_Resource view_resource) { -} - -/** - * Notification that the given NaCl module has gained or lost focus. - * Having focus means that keyboard events will be sent to the NaCl module - * represented by @a instance. A NaCl module's default condition is that it - * will not have focus. - * - * Note: clicks on NaCl modules will give focus only if you handle the - * click event. You signal if you handled it by returning @a true from - * HandleInputEvent. Otherwise the browser will bubble the event and give - * focus to the element on the page that actually did end up consuming it. - * If you're not getting focus, check to make sure you're returning true from - * the mouse click in HandleInputEvent. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - * @param[in] has_focus Indicates whether this NaCl module gained or lost - * event focus. - */ -static void Instance_DidChangeFocus(PP_Instance instance, - PP_Bool has_focus) { -} - -/** - * Handler that gets called after a full-frame module is instantiated based on - * registered MIME types. This function is not called on NaCl modules. This - * function is essentially a place-holder for the required function pointer in - * the PPP_Instance structure. - * @param[in] instance The identifier of the instance representing this NaCl - * module. - * @param[in] url_loader A PP_Resource an open PPB_URLLoader instance. - * @return PP_FALSE. - */ -static PP_Bool Instance_HandleDocumentLoad(PP_Instance instance, - PP_Resource url_loader) { - /* NaCl modules do not need to handle the document load function. */ - return PP_FALSE; -} - - - -/** - * Entry points for the module. - * Initialize needed interfaces: PPB_Core, PPB_Messaging and PPB_Var. - * @param[in] a_module_id module ID - * @param[in] get_browser pointer to PPB_GetInterface - * @return PP_OK on success, any other value on failure. - */ -PP_EXPORT int32_t PPP_InitializeModule(PP_Module a_module_id, - PPB_GetInterface get_browser) { - ppb_messaging_interface = - (PPB_Messaging*)(get_browser(PPB_MESSAGING_INTERFACE)); - ppb_var_interface = (PPB_Var*)(get_browser(PPB_VAR_INTERFACE)); - return PP_OK; -} - - -/** - * Returns an interface pointer for the interface of the given name, or NULL - * if the interface is not supported. - * @param[in] interface_name name of the interface - * @return pointer to the interface - */ -PP_EXPORT const void* PPP_GetInterface(const char* interface_name) { - if (strcmp(interface_name, PPP_INSTANCE_INTERFACE) == 0) { - static PPP_Instance instance_interface = { - &Instance_DidCreate, - &Instance_DidDestroy, - &Instance_DidChangeView, - &Instance_DidChangeFocus, - &Instance_HandleDocumentLoad, - }; - return &instance_interface; - } - return NULL; -} - - -/** - * Called before the plugin module is unloaded. - */ -PP_EXPORT void PPP_ShutdownModule() { -} diff --git a/native_client_sdk/src/examples/hello_world_pnacl/Makefile b/native_client_sdk/src/examples/hello_world_pnacl/Makefile deleted file mode 100644 index 9ba09a6..0000000 --- a/native_client_sdk/src/examples/hello_world_pnacl/Makefile +++ /dev/null @@ -1,67 +0,0 @@ -# Copyright (c) 2012 The Native Client 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))../..) - - -# -# Project Build flags -# -# Turns on warnings (-Wxxx), builds with zero optimization (-O0) and adds debug -# information (-g) for correctness and ease of debugging. -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -Werror -pedantic -CFLAGS:=-pthread -O0 -g $(WARNINGS) - - -# -# Compute path to compiler -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_pnacl) - - -# Alias for C/C++ compiler and translater -CC:=$(TC_PATH)/newlib/bin/pnacl-clang -TRANSLATE:=$(TC_PATH)/newlib/bin/pnacl-translate - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - -# Default target is everything -all : hello_world_x86_32.nexe hello_world_x86_64.nexe hello_world_arm.nexe - -# Define compile and link rule for portable NEXE format -hello_world.pexe : hello_world.c $(THIS_MAKE) - $(CC) -o $@ $< -O0 -g $(CFLAGS) -lppapi - -# Define translation rules -hello_world_x86_32.nexe : hello_world.pexe - $(TRANSLATE) -arch x86-32 $< -o $@ - -hello_world_x86_64.nexe : hello_world.pexe - $(TRANSLATE) -arch x86-64 $< -o $@ - -hello_world_arm.nexe : hello_world.pexe - $(TRANSLATE) -arch arm $< -o $@ - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py diff --git a/native_client_sdk/src/examples/hello_world_pnacl/hello_world.html b/native_client_sdk/src/examples/hello_world_pnacl/hello_world.html deleted file mode 100644 index 60f3722..0000000 --- a/native_client_sdk/src/examples/hello_world_pnacl/hello_world.html +++ /dev/null @@ -1,87 +0,0 @@ -<!DOCTYPE html> -<html> - <!-- - 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. - --> -<head> - <title>Hello, World!</title> - <script type="text/javascript"> - helloWorldModule = null; // Global application object. - statusText = 'NO-STATUS'; - - // Indicate success when the NaCl module has loaded. - function moduleDidLoad() { - helloWorldModule = document.getElementById('hello_world'); - updateStatus('SUCCESS'); - } - - // Handle a message coming from the NaCl module. - function handleMessage(message_event) { - alert(message_event.data); - } - - // If the page loads before the Native Client module loads, then set the - // status message indicating that the module is still loading. Otherwise, - // do not change the status message. - function pageDidLoad() { - if (helloWorldModule == null) { - updateStatus('LOADING...'); - } else { - // It's possible that the Native Client module onload event fired - // before the page's onload event. In this case, the status message - // will reflect 'SUCCESS', but won't be displayed. This call will - // display the current message. - updateStatus(); - } - } - - // Set the global status message. If the element with id 'statusField' - // exists, then set its HTML to the status message as well. - // opt_message The message test. If this is null or undefined, then - // attempt to set the element with id 'statusField' to the value of - // |statusText|. - function updateStatus(opt_message) { - if (opt_message) - statusText = opt_message; - var statusField = document.getElementById('statusField'); - if (statusField) { - statusField.innerHTML = statusText; - } - } - </script> -</head> -<body onload="pageDidLoad()"> - -<h1>Native Client Simple Module</h1> -<h2>Status: <code id="statusField">NO-STATUS</code></h2> - <!-- The <EMBED> element is wrapped inside a <DIV>, which has both a 'load' - and a 'message' event listener attached. This wrapping method is used - instead of attaching the event listeners directly to the <EMBED> element to - ensure that the listeners are active before the NaCl module 'load' event - fires. This also allows you to use PPB_Messaging.PostMessage() (in C) or - pp::Instance.PostMessage() (in C++) from within the initialization code in - your NaCl module. - - The src points to a manifest file, which provides the Native Client plug-in - a mapping between architecture and NaCl Executable (NEXE). - - We use a non-zero sized embed to give Chrome space to place the bad plug-in - graphic, if there is a problem. - --> - <div id="listener"> - <script type="text/javascript"> - var listener = document.getElementById('listener') - listener.addEventListener('load', moduleDidLoad, true); - listener.addEventListener('message', handleMessage, true); - </script> - - <embed name="nacl_module" - id="hello_world" - width=200 height=200 - src="hello_world.nmf" - type="application/x-nacl" /> - </div> -</body> -</html> diff --git a/native_client_sdk/src/examples/hello_world_pnacl/hello_world.nmf b/native_client_sdk/src/examples/hello_world_pnacl/hello_world.nmf deleted file mode 100644 index a8bf313..0000000 --- a/native_client_sdk/src/examples/hello_world_pnacl/hello_world.nmf +++ /dev/null @@ -1,7 +0,0 @@ -{ - "program": { - "arm": {"url": "hello_world_arm.nexe"}, - "x86-32": {"url": "hello_world_x86_32.nexe"}, - "x86-64": {"url": "hello_world_x86_64.nexe"} - } -} diff --git a/native_client_sdk/src/examples/input_events/Makefile b/native_client_sdk/src/examples/input_events/Makefile deleted file mode 100644 index 668aebd..0000000 --- a/native_client_sdk/src/examples/input_events/Makefile +++ /dev/null @@ -1,89 +0,0 @@ -# Copyright (c) 2012 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=input_events -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for main application -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 32 bit compile and link rules for loadable library -eightball_x86_32.o: eightball.cc $(THIS_MAKE) | DBG - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) -fPIC - -lib32/libeightball.so: eightball_x86_32.o $(THIS_MAKE) | lib32 - $(CXX) -o $@ $< -m32 $(CXXFLAGS) $(LDFLAGS) -shared - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for loadable library -eightball_x86_64.o: eightball.cc $(THIS_MAKE) | DBG - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) -fPIC - -lib64/libeightball.so: eightball_x86_64.o $(THIS_MAKE) | lib64 - $(CXX) -o $@ $< -m64 $(CXXFLAGS) $(LDFLAGS) -shared - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/load_progress/Makefile b/native_client_sdk/src/examples/load_progress/Makefile deleted file mode 100644 index 2b3e58e..0000000 --- a/native_client_sdk/src/examples/load_progress/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=load_progress -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/mouselock/Makefile b/native_client_sdk/src/examples/mouselock/Makefile deleted file mode 100644 index 1ac8e4d..0000000 --- a/native_client_sdk/src/examples/mouselock/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=mouselock -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/multithreaded_input_events/Makefile b/native_client_sdk/src/examples/multithreaded_input_events/Makefile deleted file mode 100644 index 4222dfb..0000000 --- a/native_client_sdk/src/examples/multithreaded_input_events/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=mt_input_events -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc custom_events.cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/pi_generator/Makefile b/native_client_sdk/src/examples/pi_generator/Makefile deleted file mode 100644 index f80667f..0000000 --- a/native_client_sdk/src/examples/pi_generator/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=pi_generator -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc pi_generator_module.cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/pong/Makefile b/native_client_sdk/src/examples/pong/Makefile deleted file mode 100644 index a6e8a79..0000000 --- a/native_client_sdk/src/examples/pong/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=pong -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc pong_module.cc view.cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/sine_synth/Makefile b/native_client_sdk/src/examples/sine_synth/Makefile deleted file mode 100644 index 17ca8d9..0000000 --- a/native_client_sdk/src/examples/sine_synth/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=sine_synth -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/tumbler/Makefile b/native_client_sdk/src/examples/tumbler/Makefile deleted file mode 100644 index ca4b5ac..0000000 --- a/native_client_sdk/src/examples/tumbler/Makefile +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright (c) 2012 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=tumbler -LDFLAGS:=-lppapi_gles2 -lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc -CXX_SOURCES+=transforms.cc shader_util.cc opengl_context.cc tumbler_module.cc -CXX_SOURCES+=scripting_bridge.cc cube.cc - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - diff --git a/native_client_sdk/src/examples/websocket/Makefile b/native_client_sdk/src/examples/websocket/Makefile deleted file mode 100644 index 50692d7..0000000 --- a/native_client_sdk/src/examples/websocket/Makefile +++ /dev/null @@ -1,76 +0,0 @@ -# Copyright (c) 2011 The Native Client 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 -# - -# -# Project information -# -# These variables store project specific settings for the project name -# build flags, files to copy or install. In the examples it is typically -# only the list of sources and project name that will actually change and -# the rest of the makefile is boilerplate for defining build rules. -# -PROJECT:=websocket -LDFLAGS:=-lppapi_cpp -lppapi -CXX_SOURCES:=$(PROJECT).cc - - -# -# Get pepper directory for toolchain and includes. -# -# If PEPPER_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))../..) - -# Project Build flags -WARNINGS:=-Wno-long-long -Wall -Wswitch-enum -pedantic -Werror -CXXFLAGS:=-pthread -std=gnu++98 $(WARNINGS) - -# -# Compute tool paths -# -# -OSNAME:=$(shell python $(NACL_SDK_ROOT)/tools/getos.py) -TC_PATH:=$(abspath $(NACL_SDK_ROOT)/toolchain/$(OSNAME)_x86_newlib) -CXX:=$(TC_PATH)/bin/i686-nacl-g++ - -# -# Disable DOS PATH warning when using Cygwin based tools Windows -# -CYGWIN ?= nodosfilewarning -export CYGWIN - - -# Declare the ALL target first, to make the 'all' target the default build -all: $(PROJECT)_x86_32.nexe $(PROJECT)_x86_64.nexe - -# Define 32 bit compile and link rules for C++ sources -x86_32_OBJS:=$(patsubst %.cc,%_32.o,$(CXX_SOURCES)) -$(x86_32_OBJS) : %_32.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m32 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_32.nexe : $(x86_32_OBJS) - $(CXX) -o $@ $^ -m32 -O0 -g $(CXXFLAGS) $(LDFLAGS) - -# Define 64 bit compile and link rules for C++ sources -x86_64_OBJS:=$(patsubst %.cc,%_64.o,$(CXX_SOURCES)) -$(x86_64_OBJS) : %_64.o : %.cc $(THIS_MAKE) - $(CXX) -o $@ -c $< -m64 -O0 -g $(CXXFLAGS) - -$(PROJECT)_x86_64.nexe : $(x86_64_OBJS) - $(CXX) -o $@ $^ -m64 -O0 -g $(CXXFLAGS) $(LDFLAGS) - - -# Define a phony rule so it always runs, to build nexe and start up server. -.PHONY: RUN -RUN: all - python ../httpd.py - - |