[autobuild] Fix asm-only and no-gcc build

git-svn-id: svn://kolibrios.org@9797 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Ivan Baravy 2022-04-26 22:06:46 +00:00
parent df15574e00
commit f8e67e0dd1
10 changed files with 26 additions and 23 deletions

View File

@ -1,7 +1,7 @@
if tup.getconfig("NO_GCC") ~= "" then return end if tup.getconfig("NO_GCC") ~= "" then return end
if tup.getconfig("HELPERDIR") == "" if tup.getconfig("HELPERDIR") == ""
then then
if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation if tup.getconfig("NO_NASM") == "full" then return end -- required for SDL compilation
HELPERDIR = "../../../programs" HELPERDIR = "../../../programs"
end end
tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_gcc.lua")

View File

@ -1,7 +1,7 @@
if tup.getconfig("NO_GCC") ~= "" then return end if tup.getconfig("NO_GCC") ~= "" then return end
if tup.getconfig("HELPERDIR") == "" if tup.getconfig("HELPERDIR") == ""
then then
if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation if tup.getconfig("NO_NASM") == "full" then return end -- required for SDL compilation
HELPERDIR = "../../../programs" HELPERDIR = "../../../programs"
end end
tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_gcc.lua")

View File

@ -1,7 +1,7 @@
if tup.getconfig("NO_GCC") ~= "" then return end if tup.getconfig("NO_GCC") ~= "" then return end
if tup.getconfig("HELPERDIR") == "" if tup.getconfig("HELPERDIR") == ""
then then
if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation if tup.getconfig("NO_NASM") == "full" then return end -- required for SDL compilation
HELPERDIR = "../../../programs" HELPERDIR = "../../../programs"
end end
tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_gcc.lua")

View File

@ -192,7 +192,6 @@ extra_files = {
{"kolibrios/develop/tcc/samples/", PROGS .. "/develop/ktcc/trunk/libc.obj/samples/*.sh"}, {"kolibrios/develop/tcc/samples/", PROGS .. "/develop/ktcc/trunk/libc.obj/samples/*.sh"},
{"kolibrios/develop/tcc/samples/clayer/", PROGS .. "/develop/ktcc/trunk/libc.obj/samples/clayer/*"}, {"kolibrios/develop/tcc/samples/clayer/", PROGS .. "/develop/ktcc/trunk/libc.obj/samples/clayer/*"},
{"kolibrios/develop/utils/SPEDump", PROGS .. "/develop/SPEDump/SPEDump.kex"}, {"kolibrios/develop/utils/SPEDump", PROGS .. "/develop/SPEDump/SPEDump.kex"},
{"kolibrios/develop/utils/objconv", PROGS .. "/develop/objconv/objconv"},
{"kolibrios/emul/", "common/emul/*"}, {"kolibrios/emul/", "common/emul/*"},
{"kolibrios/emul/dosbox/", "common/emul/DosBox/*"}, {"kolibrios/emul/dosbox/", "common/emul/DosBox/*"},
{"kolibrios/emul/e80/readme.txt", PROGS .. "/emulator/e80/trunk/readme.txt"}, {"kolibrios/emul/e80/readme.txt", PROGS .. "/emulator/e80/trunk/readme.txt"},
@ -642,9 +641,13 @@ end -- tup.getconfig('NO_NASM') ~= 'full'
-- Programs that require JWASM to compile. -- Programs that require JWASM to compile.
if tup.getconfig('NO_JWASM') ~= 'full' then if tup.getconfig('NO_JWASM') ~= 'full' then
tup.append_table(img_files, { tup.append_table(img_files, {
{"RUN", PROGS .. "/system/RunOD/1/RUN"},
{"LIB/INPUTBOX.OBJ", PROGS .. "/develop/libraries/InputBox/INPUTBOX.OBJ"}, {"LIB/INPUTBOX.OBJ", PROGS .. "/develop/libraries/InputBox/INPUTBOX.OBJ"},
}) })
if tup.getconfig('NO_GCC') ~= 'full' then
tup.append_table(img_files, {
{"RUN", PROGS .. "/system/RunOD/1/RUN"},
})
end
end -- tup.getconfig('NO_JWASM') ~= 'full' end -- tup.getconfig('NO_JWASM') ~= 'full'
-- Programs that require C-- to compile. -- Programs that require C-- to compile.
@ -746,13 +749,7 @@ tup.append_table(extra_files, {
{"kolibrios/games/heliothryx", PROGS .. "/games/heliothryx/heliothryx"}, {"kolibrios/games/heliothryx", PROGS .. "/games/heliothryx/heliothryx"},
{"kolibrios/games/marblematch3", PROGS .. "/games/marblematch3/marblematch3"}, {"kolibrios/games/marblematch3", PROGS .. "/games/marblematch3/marblematch3"},
{"kolibrios/games/nsider", PROGS .. "/games/nsider/nsider"}, {"kolibrios/games/nsider", PROGS .. "/games/nsider/nsider"},
{"kolibrios/games/quake/", "common/games/quake/*"}, -- not really gcc, but no sense without sdlquake
{"kolibrios/games/quake/", "../contrib/other/sdlquake-1.0.9/sdlquake"},
{"kolibrios/games/fridge/", PROGS .. "/games/fridge/fridge"}, {"kolibrios/games/fridge/", PROGS .. "/games/fridge/fridge"},
{"kolibrios/games/tyrian/", "../contrib/games/opentyrian/opentyrian"},
{"kolibrios/games/tyrian/data/", "common/games/tyrian/data/*"},
{"kolibrios/games/wolf3d/", "../contrib/games/wolf3d/wolf3d"},
{"kolibrios/games/wolf3d/", "common/games/wolf3d/*"},
{"kolibrios/develop/lua/lua", "../contrib/other/lua-5.2.0/lua"}, {"kolibrios/develop/lua/lua", "../contrib/other/lua-5.2.0/lua"},
{"kolibrios/develop/lua/calc.lua", "../contrib/other/lua-5.2.0/calc.lua"}, {"kolibrios/develop/lua/calc.lua", "../contrib/other/lua-5.2.0/calc.lua"},
{"kolibrios/develop/lua/console.lua", "../contrib/other/lua-5.2.0/console.lua"}, {"kolibrios/develop/lua/console.lua", "../contrib/other/lua-5.2.0/console.lua"},
@ -766,12 +763,23 @@ tup.append_table(extra_files, {
{"kolibrios/develop/c--/c--", PROGS .. "/develop/cmm/cmm"}, {"kolibrios/develop/c--/c--", PROGS .. "/develop/cmm/cmm"},
{"kolibrios/develop/tcc/tcc", PROGS .. "/develop/ktcc/trunk/source/tcc"}, {"kolibrios/develop/tcc/tcc", PROGS .. "/develop/ktcc/trunk/source/tcc"},
{"kolibrios/develop/sqlite3/sqlite3", "../contrib/sdk/sources/sqlite3/shell/sqlite3"}, {"kolibrios/develop/sqlite3/sqlite3", "../contrib/sdk/sources/sqlite3/shell/sqlite3"},
{"kolibrios/develop/utils/objconv", PROGS .. "/develop/objconv/objconv"},
{"kolibrios/drivers/sensors/k10temp.sys", "../drivers/sensors/k10temp/k10temp.sys"}, {"kolibrios/drivers/sensors/k10temp.sys", "../drivers/sensors/k10temp/k10temp.sys"},
{"kolibrios/drivers/acpi/acpi.sys", "../drivers/devman/acpi.sys"}, {"kolibrios/drivers/acpi/acpi.sys", "../drivers/devman/acpi.sys"},
{"kolibrios/drivers/acpi/acpi", "../drivers/devman/acpi"}, {"kolibrios/drivers/acpi/acpi", "../drivers/devman/acpi"},
{"kolibrios/drivers/geode/geode.sys", "common/drivers/geode/geode.sys"}, -- there is also an autobuid version that is not working {"kolibrios/drivers/geode/geode.sys", "common/drivers/geode/geode.sys"}, -- there is also an autobuid version that is not working
{"kolibrios/drivers/geode/geode", "../drivers/audio/a5536/geode"}, {"kolibrios/drivers/geode/geode", "../drivers/audio/a5536/geode"},
}) })
if tup.getconfig('NO_NASM') ~= 'full' then
tup.append_table(extra_files, {
{"kolibrios/games/tyrian/", "../contrib/games/opentyrian/opentyrian"},
{"kolibrios/games/tyrian/data/", "common/games/tyrian/data/*"},
{"kolibrios/games/quake/", "common/games/quake/*"}, -- not really gcc, but no sense without sdlquake
{"kolibrios/games/quake/", "../contrib/other/sdlquake-1.0.9/sdlquake"},
{"kolibrios/games/wolf3d/", "../contrib/games/wolf3d/wolf3d"},
{"kolibrios/games/wolf3d/", "common/games/wolf3d/*"},
})
end
-- For russian build, add russian-only programs. -- For russian build, add russian-only programs.
if build_type == "rus" then tup.append_table(extra_files, { if build_type == "rus" then tup.append_table(extra_files, {
{"kolibrios/games/21days", PROGS .. "/games/21days/21days"}, {"kolibrios/games/21days", PROGS .. "/games/21days/21days"},

View File

@ -12,7 +12,7 @@ LDFLAGS = " -nostdlib -shared -s --image-base 0 --file-alignment 512 --section-a
NAME = "geode.sys" NAME = "geode.sys"
compile_gcc{ "geode.c" } compile_gcc{ "geode.c" }
OBJS.extra_inputs = {"../../ddk/libcore.a", "../../ddk/libddk.a"} OBJS.extra_inputs = {"../../ddk/<libddk>", "../../ddk/<libcore>"}
LIBS = " -lddk -lcore " LIBS = " -lddk -lcore "
tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), NAME); tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), NAME);

View File

@ -1,7 +1,6 @@
if tup.getconfig("NO_GCC") ~= "" then return end if tup.getconfig("NO_GCC") ~= "" then return end
if tup.getconfig("HELPERDIR") == "" if tup.getconfig("HELPERDIR") == ""
then then
if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation
HELPERDIR = "../../programs" HELPERDIR = "../../programs"
end end
tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_gcc.lua")
@ -73,9 +72,6 @@ DDK_SRC = {
} }
compile_gcc(DDK_SRC) compile_gcc(DDK_SRC)
tup.rule(OBJS, "kos32-ar -crs %o %f", "libddk.a"); tup.rule(OBJS, "kos32-ar -crs %o %f", {"libddk.a", extra_outputs={"<libddk>"}});
tup.rule("core.S", "kos32-as %f -o %o", "core.o"); tup.rule("core.S", "kos32-as %f -o %o", "core.o");
tup.rule("core.o", "kos32-ld -shared -s --out-implib %o --output-def core.def -o core.dll %f", {"libcore.a", extra_outputs={"core.def", "core.dll"}}); tup.rule("core.o", "kos32-ld -shared -s --out-implib %o --output-def core.def -o core.dll %f", {"libcore.a", extra_outputs={"core.def", "core.dll", "<libcore>"}});

View File

@ -14,7 +14,7 @@ LDFLAGS = " -nostdlib -T acpi.lds -shared -s --image-base 0 --file-alignment 512
NAME = "acpi.sys" NAME = "acpi.sys"
compile_gcc{ "acpi.c", "scan.c", "pci_root.c", "pci_bind.c", "pci_irq.c", "pci/probe.c", "pci/pci.c", "pci/access.c" } compile_gcc{ "acpi.c", "scan.c", "pci_root.c", "pci_bind.c", "pci_irq.c", "pci/probe.c", "pci/pci.c", "pci/access.c" }
OBJS.extra_inputs = {"../ddk/libcore.a", "../ddk/libddk.a", "./acpica/libacpica.a"} OBJS.extra_inputs = {"../ddk/<libcore>", "../ddk/<libddk>", "./acpica/libacpica.a"}
LIBS = " -lacpica -lgcc -lddk -lcore " LIBS = " -lacpica -lgcc -lddk -lcore "
tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), NAME); tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), NAME);

View File

@ -1,4 +1,4 @@
if tup.getconfig("NO_GCC") ~= "" or tup.getconfig("NO_NASM") ~= "" then return end if tup.getconfig("NO_GCC") ~= "" then return end
tup.include("../../../programs/use_gcc.lua") tup.include("../../../programs/use_gcc.lua")

View File

@ -1,7 +1,6 @@
if tup.getconfig("NO_GCC") ~= "" then return end if tup.getconfig("NO_GCC") ~= "" then return end
if tup.getconfig("HELPERDIR") == "" if tup.getconfig("HELPERDIR") == ""
then then
if tup.getconfig("NO_NASM") ~= "" then return end -- required for SDL compilation
HELPERDIR = "../../../programs" HELPERDIR = "../../../programs"
end end
tup.include(HELPERDIR .. "/use_gcc.lua") tup.include(HELPERDIR .. "/use_gcc.lua")
@ -16,6 +15,6 @@ compile_gcc{
"k10temp.c", "../pci.c", "../amd_nb.c", "../cpu_detect.c", "../e_msr.c" "k10temp.c", "../pci.c", "../amd_nb.c", "../cpu_detect.c", "../e_msr.c"
} }
OBJS.extra_inputs = {"../../ddk/libcore.a", "../../ddk/libddk.a"} OBJS.extra_inputs = {"../../ddk/<libcore>", "../../ddk/<libddk>"}
tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), "k10temp.sys"); tup.rule(OBJS, "kos32-ld" .. LDFLAGS .. "%f -o %o " .. LIBS .. tup.getconfig("KPACK_CMD"), "k10temp.sys");

View File

@ -12,4 +12,4 @@ else
tup.definerule{command = "echo LANG_EN = 1 > lang.inc", outputs = {"lang.inc"}} tup.definerule{command = "echo LANG_EN = 1 > lang.inc", outputs = {"lang.inc"}}
end end
tup.rule({"InputBox.asm", extra_inputs = {"lang.inc"}}, "jwasm -zt0 -coff -Fi lang.inc -Fo %o %f " .. tup.getconfig("KPACK_CMD"), "INPUTBOX.OBJ") tup.rule({"InputBox.asm", extra_inputs = {"lang.inc"}}, "jwasm -zt0 -coff -Fi lang.inc -Fo %o %f " .. tup.getconfig("KPACK_CMD"), "INPUTBOX.OBJ")