aboutsummaryrefslogtreecommitdiffstats
path: root/Makefile
diff options
context:
space:
mode:
authorKevin Lange <kevin.lange@phpwnage.com>2011-11-30 22:12:44 -0800
committerKevin Lange <kevin.lange@phpwnage.com>2011-11-30 22:12:44 -0800
commit584fb40b7d158fb863dfbb77442486114956894b (patch)
treee6ecef21e6d002d7e8e8ef7d67e82f8a6c66e60d /Makefile
parentcb850e9ab9b70f183ef9afbda9952110b3922204 (diff)
parent900194edee61b6dded593e04b435e9b7c9ca0517 (diff)
downloadnyancat-584fb40b7d158fb863dfbb77442486114956894b.tar.gz
Merge pull request #2 from apeschel/autotools
[apeschel] Made project more in line with Autotools standard.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile37
1 files changed, 35 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 8d1c3ae..58ef75b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,2 +1,35 @@
-nyancat: nyancat.c
- gcc -o nyancat nyancat.c
+package = nyancat
+version = 0.1
+tarname = $(package)
+distdir = $(tarname)-$(version)
+
+all clean check parser:
+ cd src && $(MAKE) $@
+
+dist: $(distdir).tar.gz
+
+$(distdir).tar.gz: $(distdir)
+ tar chof - $(distdir) | gzip -9 -c > $@
+ rm -rf $(distdir)
+
+$(distdir): FORCE
+ mkdir -p $(distdir)/src
+ cp Makefile $(distdir)
+ cp src/Makefile $(distdir)/src
+ cp src/nyancat.c $(distdir)/src
+ cp src/nyancat.py $(distdir)/src
+ cp src/telnetsrvlib.py $(distdir)/src
+
+FORCE:
+ -rm $(distdir).tar.gz >/dev/null 2>&1
+ -rm -rf $(distdir) >/dev/null 2>&1
+
+distcheck: $(distdir).tar.gz
+ gzip -cd $(distdir).tar.gz | tar xvf -
+ cd $(distdir) && $(MAKE) all
+ cd $(distdir) && $(MAKE) check
+ cd $(distdir) && $(MAKE) clean
+ rm -rf $(distdir)
+ @echo "*** Package $(distdir).tar.gz is ready for distribution."
+
+.PHONY: FORCE all clean check dist distcheck