# Makefile for TeXplorators dvipaste
#
# config.sun-gcc.h is supplied as a model.
# UnixTeX would like to hear of any interesting
# configuration files for other systems.
# Copy the appropriate config.*.h to config.h
# then make
#
# This Makefile may not work for MSDOS. Make your 
# own one, or compile by hand.
#
CFLAGS = -g
CC = gcc

all:	dvipaste 

dvipaste:	dvipaste.o
	cc -o dvipaste dvipaste.o

dvipaste.o:	dvipaste.c config.h

config.h:
	@if test ! -f config.h ; then \
		echo "You must first copy the right config.*.h file" ; \
		echo "into config.h" ; exit 1 ; \
	fi

test:	./test/boxes1.tex ./test/boxes2.tex \
		./test/dvipaste.tex ./test/join.tex
	-(cd test ; tex boxes1 ; tex boxes2 ; tex join ; \
	../dvipaste join newjoin )

clean:
	rm -f *.o *~ \#* core *.log 

veryclean:	clean
	rm -f config.h dvipaste *.dat *.dvi
	(cd test ; rm -rf *.dvi *.log)