From 17650f3e138840883f496e2475197e866f12207f Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Sat, 26 Dec 2020 13:10:38 +0000 Subject: [PATCH] Add KosJS to autobuild git-svn-id: svn://kolibrios.org@8478 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/kosjs/Tupfile.lua | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100755 programs/develop/kosjs/Tupfile.lua diff --git a/programs/develop/kosjs/Tupfile.lua b/programs/develop/kosjs/Tupfile.lua new file mode 100755 index 0000000000..eb80c57b14 --- /dev/null +++ b/programs/develop/kosjs/Tupfile.lua @@ -0,0 +1,17 @@ +if tup.getconfig("NO_GCC") ~= "" then return end +HELPERDIR = (tup.getconfig("HELPERDIR") == "") and "../.." or tup.getconfig("HELPERDIR") +tup.include(HELPERDIR .. "/use_gcc.lua") +tup.include(HELPERDIR .. "/use_newlib.lua") + +INCLUDES = INCLUDES .. " -I ." + +compile_gcc{"libmujs/utftype.c", "libmujs/jsproperty.c", "libmujs/jsobject.c", "libmujs/jsdtoa.c", "libmujs/jsbuiltin.c", "libmujs/jsvalue.c", "libmujs/jsnumber.c", "libmujs/jsparse.c", "libmujs/jsstate.c", "libmujs/jsgc.c", "libmujs/jsrepr.c", "libmujs/pp.c", "libmujs/utf.c", "libmujs/jsfunction.c", "libmujs/jsdump.c", "libmujs/regexp.c", "libmujs/jsstring.c", "libmujs/jsarray.c", "libmujs/jsrun.c", "libmujs/jsdate.c", "libmujs/jscompile.c", "libmujs/jslex.c", "libmujs/jsboolean.c", "libmujs/jserror.c", "libmujs/jsintern.c", "libmujs/jsmath.c", "libmujs/jsregexp.c", "libmujs/json.c"} +tup.rule(OBJS, "ar rcs %o %f", {"libmujs.a", ""}) + +LDFLAGS = LDFLAGS .. " -Llibmujs --subsystem native" +LIBS = LIBS .. " -lmujs" +table.insert(LIBDEPS, "") +INCLUDES = INCLUDES .. " -Ilibmujs" + +compile_gcc{"kosjs.c", "import.c"} +link_gcc("kosjs")