1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 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) $(CPPFLAGS) UCI2WB.c -o uci2wb $(LDFLAGS)
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.rc rosetta.ico 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
|