From d805052205296062a04f4e899a11b73be3008baf Mon Sep 17 00:00:00 2001 From: David Given Date: Sun, 19 Jun 2016 09:32:45 +0200 Subject: [PATCH] All the amisc binaries now build. --- build.lua | 2 +- first/build.lua | 2 +- h/build.lua | 2 ++ modules/build.lua | 12 +++++++++++- util/amisc/build.lua | 40 +++++++++++++++++++++++++++++++--------- 5 files changed, 46 insertions(+), 12 deletions(-) diff --git a/build.lua b/build.lua index 45bd06717..c01435a83 100644 --- a/build.lua +++ b/build.lua @@ -2,7 +2,7 @@ installable { name = "ack", map = { "util/ack+ack-pkg", - "util/amisc+aelflod-pkg", + "util/amisc+pkg", } } diff --git a/first/build.lua b/first/build.lua index 354848704..2c820da47 100644 --- a/first/build.lua +++ b/first/build.lua @@ -162,7 +162,7 @@ definerule("cprogram", commands = { type="strings", default={ - "$(CC) -o %{outs[1]} %{ins}" + "$(CC) -o %{outs[1]} %{ins} %{ins}" }, } }, diff --git a/h/build.lua b/h/build.lua index 2c9c3886a..d1900ac5f 100644 --- a/h/build.lua +++ b/h/build.lua @@ -13,7 +13,9 @@ bundle { name = "emheaders", srcs = { "./em_*.h", + "./arch.h", "./out.h", + "./ranlib.h", "+em_path", } } diff --git a/modules/build.lua b/modules/build.lua index e3fb471df..40a9d1737 100644 --- a/modules/build.lua +++ b/modules/build.lua @@ -6,6 +6,16 @@ bundle { clibrary { name = "string", srcs = { "./src/string/*.c" }, - deps = { "#headers" }, + deps = { "+headers" }, +} + +clibrary { + name = "object", + srcs = { "./src/object/*.c" }, + deps = { + "+headers", + "h+local", + "h+emheaders", + }, } diff --git a/util/amisc/build.lua b/util/amisc/build.lua index 9e9fad4cc..099e51a82 100644 --- a/util/amisc/build.lua +++ b/util/amisc/build.lua @@ -1,16 +1,38 @@ -cprogram { - name = "aelflod", - srcs = { "./aelflod.c" }, - deps = { - "h+emheaders" +local function simpleprogram(name) + cprogram { + name = name, + srcs = { "./"..name..".c" }, + deps = { + "h+emheaders", + "modules+object", + } } -} + + installable { + name = name.."-pkg", + map = { + ["$(INSDIR)/bin/"..name] = "+"..name, + ["$(PLATIND)/man/man1/"..name..".1"] = "./"..name..".1", + } + } +end + +simpleprogram("aelflod") +simpleprogram("anm") +simpleprogram("ashow") +simpleprogram("asize") +simpleprogram("aslod") +simpleprogram("astrip") installable { - name = "aelflod-pkg", + name = "pkg", map = { - ["$(INSDIR)/bin/aelflod"] = "+aelflod", - ["$(PLATIND)/man/man1/aelflod.1"] = "./aelflod.1", + "+aelflod-pkg", + "+anm-pkg", + "+ashow-pkg", + "+asize-pkg", + "+aslod-pkg", + "+astrip-pkg", } }