summaryrefslogtreecommitdiffstats
path: root/native_client_sdk
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-17 03:08:05 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-17 03:08:05 +0000
commit17ea96bd909fa43645538ead52695d4341534928 (patch)
treec4f831d170c6aee33c4cbf886a18a856db862983 /native_client_sdk
parentdb0dc8733a2aa89ad1afe7584be7dc97b03b10d2 (diff)
downloadchromium_src-17ea96bd909fa43645538ead52695d4341534928.zip
chromium_src-17ea96bd909fa43645538ead52695d4341534928.tar.gz
chromium_src-17ea96bd909fa43645538ead52695d4341534928.tar.bz2
Auto generate makefile
Additional cleanup, remove directories not in use Move generate_make templates to new file Clean up code, make generator more data driven in preparation for supporting host configurations. BUG=130618 TBR=binji@chromium.org Review URL: https://chromiumcodereview.appspot.com/10557028 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142629 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'native_client_sdk')
-rwxr-xr-xnative_client_sdk/src/build_tools/build_sdk.py2
-rwxr-xr-xnative_client_sdk/src/build_tools/generate_make.py269
-rwxr-xr-xnative_client_sdk/src/build_tools/make_rules.py186
-rw-r--r--native_client_sdk/src/build_tools/template.mk26
4 files changed, 297 insertions, 186 deletions
diff --git a/native_client_sdk/src/build_tools/build_sdk.py b/native_client_sdk/src/build_tools/build_sdk.py
index 089b0aa..26b70fa1 100755
--- a/native_client_sdk/src/build_tools/build_sdk.py
+++ b/native_client_sdk/src/build_tools/build_sdk.py
@@ -353,7 +353,7 @@ EXAMPLE_LIST = [
]
LIBRARY_LIST = [
- 'gles2',
+# 'gles2',
]
diff --git a/native_client_sdk/src/build_tools/generate_make.py b/native_client_sdk/src/build_tools/generate_make.py
index caa2242..847b459 100755
--- a/native_client_sdk/src/build_tools/generate_make.py
+++ b/native_client_sdk/src/build_tools/generate_make.py
@@ -4,10 +4,12 @@
# found in the LICENSE file.
import buildbot_common
+import make_rules
import optparse
import os
import sys
+from make_rules import BuildToolDict, BUILD_RULES
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
SDK_SRC_DIR = os.path.dirname(SCRIPT_DIR)
@@ -17,16 +19,6 @@ SRC_DIR = os.path.dirname(SDK_DIR)
OUT_DIR = os.path.join(SRC_DIR, 'out')
PPAPI_DIR = os.path.join(SRC_DIR, 'ppapi')
-ARCHITECTURES = ['32', '64']
-
-SRC_EXT = {
- 'c': 'CC',
- 'cc' : 'CXX',
- '.so' : '.so',
- '.nexe': '.nexe',
- '.a' : '.a'
-}
-
def ErrorExit(text):
sys.stderr.write(text + '\n')
@@ -45,20 +37,6 @@ def WriteMakefile(srcpath, dstpath, replacements):
open(dstpath, 'wb').write(text)
-def GetExtType(desc):
- if desc['TYPE'] in ['main', 'nexe']:
- ext = '.nexe'
- elif desc['TYPE'] == 'lib':
- ext = '.a'
- else:
- ext = '.so'
- return ext
-
-
-def GenPatsubst(arch, tool, macro, ext, EXT):
- return '$(patsubst %%.%s,%s/%%_%s.o,$(%s_%s))' % (ext, tool, arch, macro, EXT)
-
-
def SetVar(varname, values):
if not values:
return varname + ':=\n'
@@ -91,177 +69,140 @@ def GenerateCopyList(desc):
return sources
-def BuildToolDict(tc, proj, arch='', ext='.nexe', OBJS='', TARG='', REMAP=''):
- TC = tc.upper()
- PROJ = proj.upper()
- EXT= SRC_EXT[ext]
-
- if not OBJS:
- OBJS = '%s_%s_%s_%s_O' % (TC, PROJ, arch, EXT)
-
- if tc in ['newlib', 'glibc']:
- machine = '-m' + arch
- if not TARG:
- TARG = '%s_x86_%s%s' % (proj,arch,ext)
- else:
- machine = ''
- if not TARG:
- TARG = proj + '.pexe'
-
- replace = {
- '<arch>': arch,
- '<ARCH>': machine,
- '<CC>': '%s_%s' % (TC, SRC_EXT[ext]),
- '<DUMP>': '%s_DUMP' % TC,
- '<ext>' : ext,
- '<EXT>' : EXT,
- '<LINK>': '%s_LINK' % TC,
- '<OBJS>' : OBJS,
- '<proj>': proj,
- '<PROJ>': PROJ,
- '<REMAP>': REMAP,
- '<TARG>': TARG,
- '<TAB>': '\t',
- '<tc>' : tc,
- '<TC>' : TC
- }
- return replace
-
-
-def GenerateNEXE(toolchain, name, ext, cc_sources, cxx_sources):
- COMPILE_RULE = """
-<OBJS>:=$(patsubst %.<ext>, <tc>/%_<arch>.o,$(<PROJ>_<EXT>))
-$(<OBJS>) : <tc>/%_<arch>.o : %.<ext> $(THIS_MAKE) | <tc>
-<TAB>$(<CC>) -o $@ $< <ARCH> $(<PROJ>_<EXT>FLAGS) -DTCNAME=<tc>
-"""
- LINK_RULE = """
-<tc>/<TARG> : $(<OBJS>)
-<TAB>$(<LINK>) -o $@ $^ <ARCH> $(<PROJ>_LDFLAGS)
-"""
- rules = ''
- targs = []
- if toolchain in ['newlib', 'glibc']:
- archs = ['32', '64']
- else:
- archs = [ toolchain.upper() ]
-
- for arch in archs:
- object_sets = []
- remap = ''
- if cc_sources:
- replace = BuildToolDict(toolchain, name, arch, 'c')
- rules += Replace(COMPILE_RULE, replace)
- object_sets.append(replace['<OBJS>'])
-
- if cxx_sources:
- replace = BuildToolDict(toolchain, name, arch, 'cc')
- rules += Replace(COMPILE_RULE, replace)
- object_sets.append(replace['<OBJS>'])
-
- objs = ' '.join(object_sets)
- replace = BuildToolDict(toolchain, name, arch, ext, OBJS=objs)
- rules += Replace(LINK_RULE, replace)
- if ext == '.a':
- rules += '\n'
- continue
- if ext == '.so':
- remap = ' -n %s,%s.so' % (replace['<TARG>'], name)
- if toolchain in ['newlib', 'glibc']:
- rules += '%s_NMF+=%s/%s\n' % (replace['<TC>'], toolchain, replace['<TARG>'])
- if remap:
- rules += '%s_REMAP+=%s\n' % (replace['<TC>'], remap)
- return rules
-
+def GetSourcesDict(sources):
+ source_map = {}
+ for key in ['.c', '.cc']:
+ source_list = [fname for fname in sources if fname.endswith(key)]
+ if source_list:
+ source_map[key] = source_list
+ else:
+ source_map[key] = []
+ return source_map
+
-def GenerateReplacements(desc, toolchains):
- TRANSLATE_RULE = """
-<tc>/<proj>_x86_32.nexe : <tc>/<proj>.pexe
-<TAB>$(TRANSLATE) -arch x86-32 $< -o $@
+def GetPlatforms(plat_list, plat_filter):
+ platforms = []
+ for plat in plat_list:
+ if plat in plat_filter:
+ platforms.append(plat)
+ return platforms
-<tc>/<proj>_x86_64.nexe : <tc>/<proj>.pexe
-<TAB>$(TRANSLATE) -arch x86-64 $< -o $@
-<tc>/<proj>_arm.nexe : <tc>/<proj>.pexe
-<TAB>$(TRANSLATE) -arch arm $< -o $@
-PNACL_NMF:=<tc>/<proj>_x86_32.nexe <tc>/<proj>_x86_64.nexe <tc>/<proj>_arm.nexe
-"""
- NMF_RULE = """
-<tc>/<proj>.nmf : $(<TC>_NMF)
-<TAB>$(NMF) -D $(<DUMP>) -o $@ $(<TC>_PATHS) $^ -t <tc> -s <tc> $(<TC>_REMAP)
+def GenerateToolDefaults(desc, platforms):
+ defaults = ''
+ for platform in platforms:
+ defaults += BUILD_RULES[platform]['DEFS']
+ return defaults
-"""
- # Generate target settings
- tools = []
- for tool in desc['TOOLS']:
- if tool in toolchains:
- tools.append(tool)
-
- prerun = desc.get('PRE', '')
- postlaunch = desc.get('POST', '')
- prelaunch = desc.get('LAUNCH', '')
+def GenerateSettings(desc, tools):
settings = SetVar('VALID_TOOLCHAINS', tools)
settings+= 'TOOLCHAIN?=%s\n\n' % tools[0]
-
- rules = ''
- targets = []
- remaps = ''
for target in desc['TARGETS']:
name = target['NAME']
macro = name.upper()
- ext = GetExtType(target)
-
- sources = target['SOURCES']
- cc_sources = [fname for fname in sources if fname.endswith('.c')]
- cxx_sources = [fname for fname in sources if fname.endswith('.cc')]
+ srcs = GetSourcesDict(target['SOURCES'])
- if cc_sources:
+ if srcs['.c']:
flags = target.get('CCFLAGS', ['$(NACL_CCFLAGS)'])
- settings += SetVar(macro + '_CC', cc_sources)
+ settings += SetVar(macro + '_CC', srcs['.c'])
settings += SetVar(macro + '_CCFLAGS', flags)
- if cxx_sources:
+ if srcs['.cc']:
flags = target.get('CXXFLAGS', ['$(NACL_CXXFLAGS)'])
- settings += SetVar(macro + '_CXX', cxx_sources)
+ settings += SetVar(macro + '_CXX', srcs['.cc'])
settings += SetVar(macro + '_CXXFLAGS', flags)
flags = target.get('LDFLAGS', ['$(NACL_LDFLAGS)'])
settings += SetVar(macro + '_LDFLAGS', flags)
+ return settings
- for tc in tools:
- nexe = None
- rules += '#\n# Rules for %s toolchain\n#\n%s:\n\t$(MKDIR) %s\n' % (
- tc, tc, tc)
- for target in desc['TARGETS']:
- name = target['NAME']
- ext = GetExtType(target)
- sources = target['SOURCES']
- cc_sources = [fname for fname in sources if fname.endswith('.c')]
- cxx_sources = [fname for fname in sources if fname.endswith('.cc')]
- rules += GenerateNEXE(tc, name, ext, cc_sources, cxx_sources)
- if target['TYPE'] == 'main':
- nexe = name
- targets.append('%s/%s.nmf' % (tc, name))
- if nexe:
- if tc == 'pnacl':
- replace = BuildToolDict(tc, nexe)
- rules += Replace(TRANSLATE_RULE, replace)
- replace = BuildToolDict(tc, nexe)
- rules += Replace(NMF_RULE, replace)
+def GenerateTargets(desc, tools):
prereqs = desc.get('PREREQ', [])
target_def = ''
+
if prereqs:
target_def = '.PHONY : PREREQS\nPREREQS:\n'
for prereq in prereqs:
target_def += '\t+$(MAKE) -C %s all\n' % prereq
target_def+= '\nall : PREREQS ' + (' '.join(targets))
else:
- target_def += 'all : ' + ' '.join(targets)
+ target_def += 'all : ALL_TARGETS'
+
+
+def GenerateNEXE(target, tool):
+ rules = ''
+ name = target['NAME']
+ srcs = GetSourcesDict(target['SOURCES'])
+ for arch in BUILD_RULES[tool]['ARCHES']:
+ object_sets = []
+ if srcs['.c']:
+ replace = BuildToolDict(tool, name, arch, 'c')
+ compile_rule = BUILD_RULES[tool]['CC']
+ rules += Replace(compile_rule, replace)
+ object_sets.append('$(%s)' % replace['<OBJS>'])
+
+ if srcs['.cc']:
+ replace = BuildToolDict(tool, name, arch, 'cc')
+ compile_rule = BUILD_RULES[tool]['CXX']
+ rules += Replace(compile_rule, replace)
+ object_sets.append('$(%s)' % replace['<OBJS>'])
+
+ objs = ' '.join(object_sets)
+ link_rule = BUILD_RULES[tool]['nexe']
+ replace = BuildToolDict(tool, name, arch, 'nexe', OBJS=objs)
+ rules += Replace(link_rule, replace)
+ return rules
+
+
+def GenerateRules(desc, tools):
+ rules = ''
+ for tc in tools:
+ rules += '\n#\n# Rules for %s toolchain\n#\n%s:\n\t$(MKDIR) %s\n' % (
+ tc, tc, tc)
+ nexe = None
+ for target in desc['TARGETS']:
+ name = target['NAME']
+ srcs = target['SOURCES']
+ rules += GenerateNEXE(target, tc)
+ if target['TYPE'] == 'main':
+ main = target
+
+ if main:
+ rules += GenerateNMF(main, tc)
+ return rules
+
+
+def GenerateNMF(target, tool):
+ nmf_rule = BUILD_RULES[tool]['nmf']
+ replace = BuildToolDict(tool, target['NAME'])
+ return Replace(nmf_rule, replace)
+
+
+def GenerateReplacements(desc, tools):
+ # Generate target settings
+ plats = GetPlatforms(desc['TOOLS'], tools)
+
+ settings = GenerateSettings(desc, tools)
+ tool_def = GenerateToolDefaults(desc, tools)
+ rules = GenerateRules(desc, tools)
+ prelaunch = desc.get('LAUNCH', '')
+ prerun = desc.get('PRE', '')
+ postlaunch = desc.get('POST', '')
+
+ targets = []
+ target_def = ''
+ for tool in tools:
+ for target in desc['TARGETS']:
+ if target['TYPE'] == 'main':
+ targets.append('%s/%s.nmf' % (tool, target['NAME']))
+ target_def = 'all: ' + ' '.join(targets)
return {
'__PROJECT_SETTINGS__' : settings,
'__PROJECT_TARGETS__' : target_def,
+ '__PROJECT_TOOLS__' : tool_def,
'__PROJECT_RULES__' : rules,
'__PROJECT_PRELAUNCH__' : prelaunch,
'__PROJECT_PRERUN__' : prerun,
@@ -269,6 +210,7 @@ PNACL_NMF:=<tc>/<proj>_x86_32.nexe <tc>/<proj>_x86_64.nexe <tc>/<proj>_arm.nexe
}
+
# 'KEY' : ( <TYPE>, [Accepted Values], <Required?>)
DSC_FORMAT = {
'TOOLS' : (list, ['newlib', 'glibc', 'pnacl'], True),
@@ -279,7 +221,8 @@ DSC_FORMAT = {
'SOURCES': (list, '', True),
'CCFLAGS': (list, '', False),
'CXXFLAGS': (list, '', False),
- 'LDFLAGS': (list, '', False)
+ 'LDFLAGS': (list, '', False),
+ 'LIBS' : (list, '', False)
}, True),
'SEARCH': (list, '', False),
'POST': (str, '', False),
diff --git a/native_client_sdk/src/build_tools/make_rules.py b/native_client_sdk/src/build_tools/make_rules.py
new file mode 100755
index 0000000..7dc0bc3
--- /dev/null
+++ b/native_client_sdk/src/build_tools/make_rules.py
@@ -0,0 +1,186 @@
+#!/usr/bin/env python
+# 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.
+
+
+#
+# Default macros for various platforms.
+#
+NEWLIB_DEFAULTS = """
+NEWLIB_CC?=$(TC_PATH)/$(OSNAME)_x86_newlib/bin/i686-nacl-gcc -c
+NEWLIB_CXX?=$(TC_PATH)/$(OSNAME)_x86_newlib/bin/i686-nacl-g++ -c
+NEWLIB_LINK?=$(TC_PATH)/$(OSNAME)_x86_newlib/bin/i686-nacl-g++ -Wl,-as-needed
+NEWLIB_DUMP?=$(TC_PATH)/$(OSNAME)_x86_newlib/x86_64-nacl/bin/objdump
+"""
+
+GLIBC_DEFAULTS = """
+GLIBC_CC?=$(TC_PATH)/$(OSNAME)_x86_glibc/bin/i686-nacl-gcc -c
+GLIBC_CXX?=$(TC_PATH)/$(OSNAME)_x86_glibc/bin/i686-nacl-g++ -c
+GLIBC_LINK?=$(TC_PATH)/$(OSNAME)_x86_glibc/bin/i686-nacl-g++ -Wl,-as-needed
+GLIBC_DUMP?=$(TC_PATH)/$(OSNAME)_x86_glibc/x86_64-nacl/bin/objdump
+GLIBC_PATHS:=-L $(TC_PATH)/$(OSNAME)_x86_glibc/x86_64-nacl/lib32
+GLIBC_PATHS+=-L $(TC_PATH)/$(OSNAME)_x86_glibc/x86_64-nacl/lib
+"""
+
+PNACL_DEFAULTS = """
+PNACL_CC?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-clang -c
+PNACL_CXX?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-clang -c
+PNACL_LINK?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-clang
+PNACL_DUMP?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/objdump
+TRANSLATE:=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-translate
+"""
+
+
+#
+# Compile rules for various platforms.
+#
+NEXE_CC_RULE = """
+<OBJS>:=$(patsubst %.<ext>, <tc>/%_<ARCH>.o,$(<PROJ>_<EXT>))
+$(<OBJS>) : <tc>/%_<ARCH>.o : %.<ext> $(THIS_MAKE) | <tc>
+<TAB>$(<CC>) -o $@ $< <MACH> $(<PROJ>_<EXT>FLAGS) -DTCNAME=<tc>
+"""
+
+SO_CC_RULE = """
+<OBJS>:=$(patsubst %.<ext>, <tc>/%_<ARCH>.o,$(<PROJ>_<EXT>))
+$(<OBJS>) : <tc>/%_<ARCH>.o : %.<ext> $(THIS_MAKE) | <tc>
+<TAB>$(<CC>) -o $@ $< <MACH> -fPIC $(<PROJ>_<EXT>FLAGS) -DTCNAME=<tc>
+"""
+
+#
+# Link rules for various platforms.
+#
+NEXE_LINK_RULE = """
+<tc>/<proj>_<ARCH>.<ext> : <OBJS>
+<TAB>$(<LINK>) -o $@ $^ <MACH> $(<PROJ>_LDFLAGS)
+<TC>_NMF+=<tc>/<proj>_<ARCH>.<ext>
+"""
+
+PEXE_LINK_RULE = """
+<tc>/<proj>.pexe : <OBJS>
+<TAB>$(<LINK>) -o $@ $^ $(<PROJ>_LDFLAGS)
+
+<tc>/<proj>_x86_32.nexe : <tc>/<proj>.pexe
+<TAB>$(TRANSLATE) -arch x86-32 $< -o $@
+
+<tc>/<proj>_x86_64.nexe : <tc>/<proj>.pexe
+<TAB>$(TRANSLATE) -arch x86-64 $< -o $@
+
+<tc>/<proj>_arm.nexe : <tc>/<proj>.pexe
+<TAB>$(TRANSLATE) -arch arm $< -o $@
+PNACL_NMF:=<tc>/<proj>_x86_32.nexe <tc>/<proj>_x86_64.nexe <tc>/<proj>_arm.nexe
+"""
+
+SO_LINK_RULE = """
+<tc>/<proj>_<ARCH>.<ext> : <OBJS>
+<TAB>$(<LINK>) -o $@ $^ <MACH> -shared $(<PROJ>_LDFLAGS)
+"""
+
+
+NMF_RULE = """
+<tc>/<proj>.nmf : $(<TC>_NMF)
+<TAB>$(NMF) -D $(<DUMP>) -o $@ $^ -t <tc> -s <tc>
+
+"""
+
+GLIBC_NMF_RULE = """
+<tc>/<proj>.nmf : $(<TC>_NMF)
+<TAB>$(NMF) -D $(<DUMP>) -o $@ $(GLIBC_PATHS) $^ -t <tc> -s <tc> $(<TC>_REMAP)
+
+"""
+
+EXT_MAP = {
+ 'c': 'CC',
+ 'cc': 'CXX'
+}
+
+#
+# Various Architectures
+#
+NACL_X86_32 = {
+ '<arch>': '32',
+ '<ARCH>': 'x86_32',
+ '<MACH>': '-m32',
+}
+NACL_X86_64 = {
+ '<arch>': '64',
+ '<ARCH>': 'x86_64',
+ '<MACH>': '-m64',
+}
+NACL_PNACL = {
+ '<arch>': 'pnacl',
+ '<ARCH>': 'PNACL',
+ '<MACH>': '',
+}
+
+
+BUILD_RULES = {
+ 'newlib' : {
+ 'ARCHES': [NACL_X86_32, NACL_X86_64],
+ 'DEFS': NEWLIB_DEFAULTS,
+ 'CC' : NEXE_CC_RULE,
+ 'CXX' : NEXE_CC_RULE,
+ 'nexe' : NEXE_LINK_RULE,
+ 'nmf' : NMF_RULE,
+ 'so' : None,
+ },
+ 'glibc' : {
+ 'ARCHES': [NACL_X86_32, NACL_X86_64],
+ 'DEFS': GLIBC_DEFAULTS,
+ 'CC': NEXE_CC_RULE,
+ 'CXX': NEXE_CC_RULE,
+ 'nexe': NEXE_LINK_RULE,
+ 'nmf' : GLIBC_NMF_RULE,
+ 'so': SO_LINK_RULE,
+ },
+ 'pnacl' : {
+ 'ARCHES': [NACL_PNACL],
+ 'DEFS': PNACL_DEFAULTS,
+ 'CC': NEXE_CC_RULE,
+ 'CXX': NEXE_CC_RULE,
+ 'nexe': PEXE_LINK_RULE,
+ 'nmf' : NMF_RULE,
+ 'so': None,
+ },
+}
+
+
+def BuildToolDict(toolchain, project, arch = {}, ext='nexe', **kwargs):
+ tc = toolchain
+ TC = toolchain.upper()
+ proj = project
+ PROJ = proj.upper()
+ EXT = EXT_MAP.get(ext, ext.upper())
+
+ replace = {
+ '<CC>' : '%s_%s' % (TC, EXT),
+ '<DUMP>': '%s_DUMP' % TC,
+ '<ext>' : ext,
+ '<EXT>' : EXT,
+ '<LINK>': '%s_LINK' % TC,
+ '<proj>': proj,
+ '<PROJ>': PROJ,
+ '<TAB>': '\t',
+ '<tc>' : tc,
+ '<TC>' : TC
+ }
+
+ # Add replacements for this platform/architecture
+ for key in arch:
+ replace[key] = arch[key]
+
+ # Add other passed in replacements
+ for key in kwargs:
+ replace['<%s>' % key] = kwargs[key]
+
+ if '<OBJS>' not in replace:
+ if replace.get('<ARCH>', ''):
+ replace['<OBJS>'] = '%s_%s_%s_%s_O' % (TC, PROJ, replace['<ARCH>'], EXT)
+ else:
+ replace['<OBJS>'] = '%s_%s_%s_O' % (TC, PROJ, EXT)
+
+ return replace
+
+
+
+
diff --git a/native_client_sdk/src/build_tools/template.mk b/native_client_sdk/src/build_tools/template.mk
index c76eb17..67cfc1b 100644
--- a/native_client_sdk/src/build_tools/template.mk
+++ b/native_client_sdk/src/build_tools/template.mk
@@ -31,11 +31,10 @@ NACL_LDFLAGS:=-g -pthread -lppapi_cpp -lppapi
__PROJECT_SETTINGS__
#
-# Project Targets
+# Default target
#
__PROJECT_TARGETS__
-
#
# Alias for standard commands
#
@@ -81,27 +80,11 @@ export CYGWIN
#
-# NaCl Tools
+# Defaults for TOOLS
#
-NEWLIB_CC?=$(TC_PATH)/$(OSNAME)_x86_newlib/bin/i686-nacl-gcc -c
-NEWLIB_CXX?=$(TC_PATH)/$(OSNAME)_x86_newlib/bin/i686-nacl-g++ -c
-NEWLIB_LINK?=$(TC_PATH)/$(OSNAME)_x86_newlib/bin/i686-nacl-g++ -Wl,-as-needed
-NEWLIB_DUMP?=$(TC_PATH)/$(OSNAME)_x86_newlib/x86_64-nacl/bin/objdump
-NEWLIB_PATHS:=
+__PROJECT_TOOLS__
-GLIBC_CC?=$(TC_PATH)/$(OSNAME)_x86_glibc/bin/i686-nacl-gcc -c
-GLIBC_CXX?=$(TC_PATH)/$(OSNAME)_x86_glibc/bin/i686-nacl-g++ -c
-GLIBC_LINK?=$(TC_PATH)/$(OSNAME)_x86_glibc/bin/i686-nacl-g++ -Wl,-as-needed
-GLIBC_DUMP?=$(TC_PATH)/$(OSNAME)_x86_glibc/x86_64-nacl/bin/objdump
-GLIBC_PATHS:=-L $(TC_PATH)/$(OSNAME)_x86_glibc/x86_64-nacl/lib32
-GLIBC_PATHS+=-L $(TC_PATH)/$(OSNAME)_x86_glibc/x86_64-nacl/lib
-PNACL_CC?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-clang -c
-PNACL_CXX?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-clang -c
-PNACL_LINK?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-clang
-PNACL_DUMP?=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/objdump
-PNACL_PATHS:=
-TRANSLATE:=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-translate
#
# NMF Manifiest generation
#
@@ -110,7 +93,6 @@ TRANSLATE:=$(TC_PATH)/$(OSNAME)_x86_pnacl/newlib/bin/pnacl-translate
# can find those libraries and have it automatically copy the files (-s) to
# the target directory for us.
NMF:=python $(NACL_SDK_ROOT)/tools/create_nmf.py
-NMF_PATHS:=-L $(TC_PATH)/x86_64-nacl/lib32 -L $(TC_PATH)/x86_64-nacl/lib
#
@@ -125,8 +107,8 @@ else
$(warning Using chrome at: $(CHROME_PATH))
endif
-
__PROJECT_RULES__
+
__PROJECT_PRERUN__
RUN: all