srcdir = .
+prefix = /usr/local
+exec_prefix=$(prefix)
+bindir=$(exec_prefix)/bin
+datadir=$(prefix)/share
CC?=gcc
CFLAGS?= -O2 -s
all: ${ALL}
uci2wb: UCI2WB.c
- $(CC) $(CFLAGS) $(LDFLAGS) $(CPPFLAGS) UCI2WB.c -o uci2wb
+ $(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
+ install -d -m0755 $(DESTDIR)$(bindir)
+ cp -u ${srcdir}/uci2wb $(DESTDIR)$(bindir)
+ install -d -m0755 $(DESTDIR)$(datadir)/man/man6
+ cp -u ${srcdir}/uci2wb.6.gz $(DESTDIR)$(datadir)/man/man6
uci2wb.6.gz: uci2wb.pod
pod2man -s 6 uci2wb.pod | gzip -9n > uci2wb.6.gz
rmdir UCI2WB
uninstall:
- rm -f $(DESTDIR)/usr/share/man/man6/uci2wb.6.gz
- rm -f $(DESTDIR)/usr/games/uci2wb
+ rm -f $(DESTDIR)$(datadir)/man/man6/uci2wb.6.gz
+ rm -f $(DESTDIR)$(bindir)/uci2wb