# makefile for ppmtoxvmini (also installs makexvpics)

# If you only have a K&R C compiler (surely just about impossible
# these days, but just in case...), uncomment this:
#KRDEF=-DKANDR

CFLAGS = -O $(KRDEF)

# these are where makexvpics and ppmtoxvmini are installed
PREFIX = /usr/local
BINDIR = $(PREFIX)/bin
MANDIR = $(PREFIX)/man/man1

# You shouldn't need to modify anything below this line.


all: ppmtoxvmini

ppmtoxvmini: ppmtoxvmini.o
	$(CC) $(CFLAGS) -o ppmtoxvmini ppmtoxvmini.o

install: all
	install -m 511 -s ppmtoxvmini $(BINDIR)
	install -m 555 makexvpics.sh $(BINDIR)/makexvpics
	install -m 444 makexvpics.1 $(MANDIR)

clean:
	$(RM) *.o *~ ppmtoxvmini


VERS=1.0.1

tgz: ../makexvpics-$(VERS).tar.gz
  
# Based on the example in ESR's Software Release Practice HOWTO.
#
../makexvpics-$(VERS).tar.gz: clean
	$(RM) ../makexvpics-$(VERS)
	@cd ..;ln -s makexvpics makexvpics-$(VERS)
	cd ..;tar zchvf makexvpics-$(VERS).tar.gz \
			--exclude='*/sav' makexvpics-$(VERS)
	@cd ..;$(RM) makexvpics-$(VERS)
