From: H.G.Muller Date: Thu, 30 Oct 2014 11:46:51 +0000 (+0100) Subject: Add Linux Makefile X-Git-Tag: v2.0~3 X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=f8e0474483b999f156e24ee5a161fad03d4f04a3;p=uci2wb.git Add Linux Makefile --- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..6adf5c6 --- /dev/null +++ b/Makefile @@ -0,0 +1,43 @@ +srcdir = . + +CC?=gcc +CFLAGS?= -O2 -s +LDFLAGS?= -lpthread +VERSION?=`grep 'define VERSION' UCI2WB.c | sed -e 's/.*"\(.*\)".*/\1/'` + +ALL= uci2wb uci2wb.6.gz + +all: ${ALL} + +uci2wb: UCI2WB.c + $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) UCI2WB.c -o uci2wb + +install: ${ALL} + install -d -m0755 $(DESTDIR)/usr/games + cp -u ${srcdir}/uci2wb $(DESTDIR)/usr/games + install -d -m0755 $(DESTDIR)/usr/share/man/man6 + cp -u ${srcdir}/uci2wb.6.gz $(DESTDIR)/usr/share/man/man6 + +uci2wb.6.gz: uci2wb.pod + pod2man -s 6 uci2wb.pod | gzip -9n > uci2wb.6.gz + +clean: + rm -f ${ALL} + +dist-clean: + rm -f ${ALL} *~ md5sums + +dist: + install -d -m0755 UCI2WB + rm -f uci2wb.tar uci2wb.tar.gz + cp UCI2WB.c uci2wb.pod Makefile README.txt UCI2WB + md5sum UCI2WB/* > UCI2WB/md5sums + tar -cvvf uci2wb-$(VERSION).tar UCI2WB + gzip uci2wb-$(VERSION).tar + rm UCI2WB/* + rmdir UCI2WB + +uninstall: + rm -f $(DESTDIR)/usr/share/man/man6/uci2wb.6.gz + rm -f $(DESTDIR)/usr/games/uci2wb +