diff --git a/build.lua b/build.lua index 98b381dc2..4b9bd2886 100644 --- a/build.lua +++ b/build.lua @@ -7,6 +7,7 @@ vars.ackcflags = { vars.plats = { "cpm", "linux386", + "linux68k", "pc86", } @@ -19,6 +20,7 @@ installable { "lang/pc/comp+pkg", "plat/cpm+pkg", "plat/linux386+pkg", + "plat/linux68k+pkg", "plat/pc86+pkg", "util/ack+pkg", "util/amisc+pkg", diff --git a/mach/m68020/libem/build.lua b/mach/m68020/libem/build.lua new file mode 100644 index 000000000..ca5a13c65 --- /dev/null +++ b/mach/m68020/libem/build.lua @@ -0,0 +1,8 @@ +for _, plat in ipairs(vars.plats) do + acklibrary { + name = "lib_"..plat, + srcs = { "./*.s" }, + vars = { plat = plat }, + } +end + diff --git a/mach/m68020/libend/build.lua b/mach/m68020/libend/build.lua new file mode 100644 index 000000000..ca5a13c65 --- /dev/null +++ b/mach/m68020/libend/build.lua @@ -0,0 +1,8 @@ +for _, plat in ipairs(vars.plats) do + acklibrary { + name = "lib_"..plat, + srcs = { "./*.s" }, + vars = { plat = plat }, + } +end + diff --git a/mach/m68020/ncg/table b/mach/m68020/ncg/table index e771b3de8..9aede9929 100644 --- a/mach/m68020/ncg/table +++ b/mach/m68020/ncg/table @@ -12,7 +12,7 @@ rscid = "$Id$" * * ********************************/ -#include +#include "whichone.h" #if TBL68881 && ! TBL68020 Something very wrong here! diff --git a/mach/proto/ncg/build.lua b/mach/proto/ncg/build.lua index 5245fd2a7..09b3b7385 100644 --- a/mach/proto/ncg/build.lua +++ b/mach/proto/ncg/build.lua @@ -12,7 +12,8 @@ definerule("build_ncg", srcs = {}, hdrs = { "mach/proto/ncg/*.h", - "mach/"..e.arch.."/ncg/mach*" + "mach/"..e.arch.."/ncg/mach.c", + "mach/"..e.arch.."/ncg/*.h", } } @@ -25,7 +26,6 @@ definerule("build_ncg", name = e.name, srcs = { "mach/proto/ncg/*.c", - "mach/"..e.arch.."/ncg/mach.h", matching(filenamesof(tables), "%.c$") }, deps = { diff --git a/plat/linux68k/build-pkg.lua b/plat/linux68k/build-pkg.lua new file mode 100644 index 000000000..34925f15c --- /dev/null +++ b/plat/linux68k/build-pkg.lua @@ -0,0 +1,25 @@ +include("plat/build.lua") + +ackfile { + name = "boot", + srcs = { "./boot.s" }, + vars = { plat = "linux68k" } +} + +build_plat_libs { + name = "libs", + arch = "m68020", + plat = "linux68k", +} + +installable { + name = "pkg", + map = { + "+tools", + "+libs", + "./include+pkg", + ["$(PLATIND)/linux68k/boot.o"] = "+boot", + ["$(PLATIND)/linux68k/libsys.a"] = "./libsys+lib", + } +} + diff --git a/plat/linux68k/build-tools.lua b/plat/linux68k/build-tools.lua new file mode 100644 index 000000000..944e57f47 --- /dev/null +++ b/plat/linux68k/build-tools.lua @@ -0,0 +1,21 @@ +include("plat/build.lua") + +build_as { + name = "as", + arch = "m68020", +} + +build_ncg { + name = "ncg", + arch = "m68020", +} + +return installable { + name = "tools", + map = { + ["$(PLATDEP)/linux68k/as"] = "+as", + ["$(PLATDEP)/linux68k/ncg"] = "+ncg", + ["$(PLATIND)/descr/linux68k"] = "./descr", + "util/opt+pkg", + } +} diff --git a/plat/linux68k/include/build.lua b/plat/linux68k/include/build.lua new file mode 100644 index 000000000..291fa0c36 --- /dev/null +++ b/plat/linux68k/include/build.lua @@ -0,0 +1,24 @@ +include("plat/build.lua") + +headermap = {} +packagemap = {} + +local function addheader(h) + headermap[h] = "./"..h + packagemap["$(PLATIND)/linux68k/include/"..h] = "./"..h +end + +addheader("ack/config.h") +addheader("sys/ioctl.h") +addheader("unistd.h") + +acklibrary { + name = "headers", + hdrs = headermap +} + +installable { + name = "pkg", + map = packagemap +} + diff --git a/plat/linux68k/libsys/build.lua b/plat/linux68k/libsys/build.lua new file mode 100644 index 000000000..4a8729977 --- /dev/null +++ b/plat/linux68k/libsys/build.lua @@ -0,0 +1,12 @@ +acklibrary { + name = "lib", + srcs = { + "./*.s", + "plat/linux/libsys/*.c", + "plat/linux/libsys/*.s", + }, + vars = { + plat = "linux68k" + } +} +