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 44 45 46 47 48
|
# makefile for zmakebas
# comment out the `-DHAVE_GETOPT' if, for some reason or other, you
# don't have getopt(). (This is mainly so it'll work on MS-DOS, though
# I'm not entirely sure why I bothered supporting that. :-))
#
CC=gcc
CFLAGS=-O -Wall -Wno-pointer-sign -DHAVE_GETOPT
# these set where the executable and man page are installed
PREFIX=/usr/local
BINDIR=$(PREFIX)/bin
MANDIR=$(PREFIX)/share/man/man1
all: zmakebas
zmakebas: zmakebas.o
$(CC) $(CFLAGS) -o zmakebas zmakebas.o
installdirs:
/bin/sh ./mkinstalldirs $(BINDIR) $(MANDIR)
install: zmakebas installdirs
install -m 755 zmakebas $(BINDIR)
install -m 644 zmakebas.1 $(MANDIR)
uninstall:
$(RM) $(BINDIR)/zmakebas
$(RM) $(MANDIR)/zmakebas.1*
clean:
$(RM) *~ *.o zmakebas
# The stuff below makes the distribution tgz.
VERS=1.2b
dist: tgz
tgz: ../zmakebas-$(VERS).tar.gz
../zmakebas-$(VERS).tar.gz: clean
$(RM) ../zmakebas-$(VERS)
@cd ..;ln -s zmakebas zmakebas-$(VERS)
cd ..;tar zchvf zmakebas-$(VERS).tar.gz zmakebas-$(VERS)
@cd ..;$(RM) zmakebas-$(VERS)
|