]> git.ozlabs.org Git - petitboot/blobdiff - Makefile
Add 'make dist' target
[petitboot] / Makefile
index a9ae25c09fb65f187fdc6e5adeb5d1736ad41a3b..64a8c46e630bc8fbc759a20a3a30dfa2957d4089 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
 PREFIX?=/usr
+VERSION=0.0.1
+PACKAGE=petitboot
 CC=gcc
 INSTALL=install
 TWIN_CFLAGS=$(shell pkg-config --cflags libtwin)
@@ -31,6 +33,18 @@ install: all
        $(INSTALL) -t $(PREFIX)/share/petitboot/artwork/ \
                $(foreach a,$(ARTWORK),artwork/$(a))
 
+dist:  $(PACKAGE)-$(VERSION).tar.gz
+
+$(PACKAGE)-$(VERSION).tar.gz: $(PACKAGE)-$(VERSION)
+       tar czvf $@ $^
+
+$(PACKAGE)-$(VERSION): clean
+       mkdir $@ $@/devices
+       cp -a artwork $@
+       cp *.[ch] $@
+       cp -a devices/*.[ch] $@/devices/
+       cp Makefile $@
+
 clean:
        rm -f petitboot
        rm -f udev-helper