summaryrefslogtreecommitdiff
path: root/src/third_party/js-1.7/SConscript
diff options
context:
space:
mode:
Diffstat (limited to 'src/third_party/js-1.7/SConscript')
-rw-r--r--src/third_party/js-1.7/SConscript74
1 files changed, 74 insertions, 0 deletions
diff --git a/src/third_party/js-1.7/SConscript b/src/third_party/js-1.7/SConscript
new file mode 100644
index 00000000000..95b7ea8e83d
--- /dev/null
+++ b/src/third_party/js-1.7/SConscript
@@ -0,0 +1,74 @@
+# -*- mode: python -*-
+
+Import("env windows linux darwin solaris")
+
+def removeIfPresent(lst, item):
+ try:
+ lst.remove(item)
+ except ValueError:
+ pass
+
+env = env.Clone()
+
+env.Append(CPPDEFINES=["JSFILE", "EXPORT_JS_API", "JS_C_STRINGS_ARE_UTF8"])
+
+for to_remove in ['-Werror', '/TP', '/O2', '/Gy']:
+ removeIfPresent(env['CCFLAGS'], to_remove)
+
+if windows:
+ env.Append(CCFLAGS=['/wd4748'])
+
+removeIfPresent(env['CPPDEFINES'], 'NDEBUG')
+
+if linux or darwin:
+ env.Append(CPPDEFINES=['HAVE_VA_COPY', 'VA_COPY=va_copy'])
+elif solaris:
+ env.Append(CPPDEFINES=['SOLARIS', 'HAVE_VA_LIST_AS_ARRAY', 'SVR4', 'SYSV', 'HAVE_LOCALTIME_R'])
+
+env.Program('jskwgen', 'jskwgen.c')
+env.Program('jscpucfg', 'jscpucfg.c')
+
+env.Command('jsautokw.h', ['${PROGREFIX}jskwgen${PROGSUFFIX}'],
+ '$SOURCE >$TARGET')
+
+env.Command('jsautocfg.h', ['${PROGREFIX}jscpucfg${PROGSUFFIX}'],
+ '$SOURCE >$TARGET')
+
+env.StaticLibrary(
+ "js",
+ [ "jsapi.c",
+ "jsarena.c",
+ "jsarray.c",
+ "jsatom.c",
+ "jsbool.c",
+ "jscntxt.c",
+ "jsdate.c",
+ "jsdbgapi.c",
+ "jsdhash.c",
+ "jsdtoa.c",
+ "jsemit.c",
+ "jsexn.c",
+ "jsfun.c",
+ "jsgc.c",
+ "jshash.c",
+ "jsiter.c",
+ "jsinterp.c",
+ "jslock.c",
+ "jslog2.c",
+ "jslong.c",
+ "jsmath.c",
+ "jsnum.c",
+ "jsobj.c",
+ "jsopcode.c",
+ "jsparse.c",
+ "jsprf.c",
+ "jsregexp.c",
+ "jsscan.c",
+ "jsscope.c",
+ "jsscript.c",
+ "jsstr.c",
+ "jsutil.c",
+ "jsxdrapi.c",
+ "jsxml.c",
+ "prmjtime.c",
+ ])