summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorKiyoshi Aman <kiyoshi.aman@gmail.com>2019-07-06 06:41:07 +0000
committerKiyoshi Aman <kiyoshi.aman@gmail.com>2019-07-06 06:41:07 +0000
commit1c7e02467bcf74ed39d83ea66ead1bb689772345 (patch)
treebcf92c377b807fa2dab3e5d4649cee59ee79365a /Makefile
parent91e542abd30b662683cfb93dc63d33ff36b398da (diff)
parent5b502a0ebc714bac3e679334c30faaf12e295cfb (diff)
downloaduserland-1c7e02467bcf74ed39d83ea66ead1bb689772345.tar.gz
userland-1c7e02467bcf74ed39d83ea66ead1bb689772345.tar.bz2
userland-1c7e02467bcf74ed39d83ea66ead1bb689772345.tar.xz
userland-1c7e02467bcf74ed39d83ea66ead1bb689772345.zip
Merge branch 'gprbuild-build-system' into 'master'
RFC: gprbuild-based build system See merge request Aerdan/userland!1
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile23
1 files changed, 23 insertions, 0 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 $@ $<