From 261cb7bddced2625b8668046942896ba844433c8 Mon Sep 17 00:00:00 2001 From: maxcodehack Date: Sun, 27 Dec 2020 16:01:26 +0000 Subject: [PATCH] Fix libmujs autobuild git-svn-id: svn://kolibrios.org@8486 a494cfbc-eb01-0410-851d-a64ba20cac60 --- programs/develop/kosjs/Tupfile.lua | 13 +++++++++++++ programs/develop/kosjs/Tupfile2.lua | 20 -------------------- programs/develop/kosjs/libmujs/Tupfile.lua | 10 ++++++++++ 3 files changed, 23 insertions(+), 20 deletions(-) create mode 100755 programs/develop/kosjs/Tupfile.lua delete mode 100755 programs/develop/kosjs/Tupfile2.lua create mode 100755 programs/develop/kosjs/libmujs/Tupfile.lua diff --git a/programs/develop/kosjs/Tupfile.lua b/programs/develop/kosjs/Tupfile.lua new file mode 100755 index 0000000000..eb5415e0ae --- /dev/null +++ b/programs/develop/kosjs/Tupfile.lua @@ -0,0 +1,13 @@ +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") + +LDFLAGS = LDFLAGS .. " -Llibmujs --subsystem native" +LIBS = "-lmujs " .. LIBS +table.insert(LIBDEPS, "libmujs/") +INCLUDES = INCLUDES .. " -Ilibmujs" + +compile_gcc{"kosjs.c", "import.c"} +link_gcc("kosjs") + diff --git a/programs/develop/kosjs/Tupfile2.lua b/programs/develop/kosjs/Tupfile2.lua deleted file mode 100755 index d62137fc48..0000000000 --- a/programs/develop/kosjs/Tupfile2.lua +++ /dev/null @@ -1,20 +0,0 @@ -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") - -CFLAGS = CFLAGS .. " -std=c99 -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32" -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, "kos32-ar rcs %o %f", {"libmujs.a", ""}) - -OBJS = "" - -LDFLAGS = LDFLAGS .. " -L. --subsystem native" -LIBS = LIBS .. " -lmujs" -table.insert(LIBDEPS, "") -INCLUDES = INCLUDES .. " -Ilibmujs" - -compile_gcc{"kosjs.c", "import.c"} -link_gcc("kosjs") diff --git a/programs/develop/kosjs/libmujs/Tupfile.lua b/programs/develop/kosjs/libmujs/Tupfile.lua new file mode 100755 index 0000000000..25aa4cba24 --- /dev/null +++ b/programs/develop/kosjs/libmujs/Tupfile.lua @@ -0,0 +1,10 @@ +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") + +CFLAGS = CFLAGS .. " -std=c99 -U__WIN32__ -U_Win32 -U_WIN32 -U__MINGW32__ -UWIN32" +INCLUDES = INCLUDES .. " -I ." + +compile_gcc{"utftype.c", "jsproperty.c", "jsobject.c", "jsdtoa.c", "jsbuiltin.c", "jsvalue.c", "jsnumber.c", "jsparse.c", "jsstate.c", "jsgc.c", "jsrepr.c", "pp.c", "utf.c", "jsfunction.c", "jsdump.c", "regexp.c", "jsstring.c", "jsarray.c", "jsrun.c", "jsdate.c", "jscompile.c", "jslex.c", "jsboolean.c", "jserror.c", "jsintern.c", "jsmath.c", "jsregexp.c", "json.c"} +tup.rule(OBJS, "kos32-ar rcs %o %f", {"libmujs.a", ""})