diff options
author | Samuel Holland <samuel@sholland.org> | 2019-07-05 21:25:36 -0500 |
---|---|---|
committer | Samuel Holland <samuel@sholland.org> | 2019-07-05 22:32:22 -0500 |
commit | 1db574fa1f339f77999d3988251e13a266201083 (patch) | |
tree | 9d5d6cf6fef5b0cf81ec107eb2ef70f22c296156 | |
parent | 4b05e0e49c979e4a49f37a441556ee11cd6a0c5e (diff) | |
download | userland-1db574fa1f339f77999d3988251e13a266201083.tar.gz userland-1db574fa1f339f77999d3988251e13a266201083.tar.bz2 userland-1db574fa1f339f77999d3988251e13a266201083.tar.xz userland-1db574fa1f339f77999d3988251e13a266201083.zip |
build: add wrapper Makefile
-rw-r--r-- | Makefile | 23 | ||||
-rw-r--r-- | bin/ed/ed.gpr | 10 | ||||
-rw-r--r-- | bin/stty/stty.gpr | 6 | ||||
-rw-r--r-- | later/ed.gpr | 12 | ||||
-rw-r--r-- | userland.gpr | 11 |
5 files changed, 50 insertions, 12 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1d58eaf --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +INSTALL = install +YACC = byacc + +PROJECT = userland.gpr + +GENERATED = bin/expr/expr.c + +all: prepare + gprbuild -P $(PROJECT) -p + +clean: + gprclean -P $(PROJECT) -p + rm -f $(GENERATED) + +install: all + gprinstall -P $(PROJECT) -p --prefix=$(if $(DESTDIR),$(DESTDIR),/) + $(INSTALL) -Dm0755 usr.bin/false/false.sh $(DESTDIR)/usr/bin/false + $(INSTALL) -Dm0755 usr.bin/true/true.sh $(DESTDIR)/usr/bin/true + +prepare: $(GENERATED) + +.y.c: + $(YACC) -o $@ $< diff --git a/bin/ed/ed.gpr b/bin/ed/ed.gpr new file mode 100644 index 0000000..9ebfc3c --- /dev/null +++ b/bin/ed/ed.gpr @@ -0,0 +1,10 @@ +project ed extends "template/bin.gpr" is + + for Main use ("main"); + for Object_Dir use External ("BUILDROOT") & "/" & project'Name; + + package Builder is + for Executable ("main") use "ed"; + end Builder; + +end ed; diff --git a/bin/stty/stty.gpr b/bin/stty/stty.gpr new file mode 100644 index 0000000..d41143a --- /dev/null +++ b/bin/stty/stty.gpr @@ -0,0 +1,6 @@ +project stty extends "template/bin.gpr" is + + for Main use (project'Name); + for Object_Dir use External ("BUILDROOT") & "/" & project'Name; + +end stty; diff --git a/later/ed.gpr b/later/ed.gpr deleted file mode 100644 index ef7bf99..0000000 --- a/later/ed.gpr +++ /dev/null @@ -1,12 +0,0 @@ -project ed is - - for Languages use ("C"); - for Object_Dir use "obj"; - for Exec_Dir use "."; - for Main use ("main"); - - package Builder is - for Executable ("main.c") use "ed"; - end Builder; - -end ed; diff --git a/userland.gpr b/userland.gpr new file mode 100644 index 0000000..b26a28a --- /dev/null +++ b/userland.gpr @@ -0,0 +1,11 @@ +aggregate project Userland is + + for Create_Missing_Dirs use "true"; + for External ("BUILDROOT") use Userland'Project_Dir & "/build"; + for Project_Files use ("bin/**/*.gpr", "usr.bin/**/*.gpr"); + + package Builder is + for Switches (others) use ("-j" & External ("JOBS", "0"), "-s"); + end Builder; + +end Userland; |