# Edit the following two entries for your configuration
LIBDIR=/mit/consult/lib/rtftohtml
BINDIR=/mit/consult/decmipsbin

HFILES=rtf.h tokenscan.h rtftohtml.h stdcharnames.h
SOURCE= rtftohtml.c htmlout.c transinit.c reader.c outmap.c tokenscan.c \
	libprefix.c standard-names
TRFILES=ansi-gen html-map mac-gen pc-gen pca-gen \
	ansi-sym html-trans mac-sym pc-sym pca-sym
OBJS= rtftohtml.o htmlout.o transinit.o reader.o outmap.o tokenscan.o \
	libprefix.o
LIBS=
SRCDIST=${HFILES} ${SOURCE} ${TRFILES} Makefile stdnames.awk README
BINDIST=${TRFILES} rtftohtml

rtftohtml:      ${OBJS}
	${CC}   ${CCFLAGS} ${OBJS} ${LIBS} -o rtftohtml

all:	rtftohtmlsrc.tar.Z rtftohtmlsun4.tar.Z

rtftohtml.o:	rtftohtml.c rtftohtml.h rtf.h

htmlout.o:	htmlout.c rtftohtml.h rtf.h

transinit.o:	transinit.c rtftohtml.h rtf.h

reader.o:	reader.c rtf.h stdcharnames.h tokenscan.h

outmap.o:	outmap.c tokenscan.h rtf.h 

tokenscan.o:	tokenscan.c tokenscan.h

libprefix.o:	libprefix.c rtf.h
	${CC}	-c ${CFLAGS} -DLIBDIR="\"${LIBDIR}\"" libprefix.c

install:	rtftohtml ${TRFILES}
	chmod 755 rtftohtml
	chmod 644 ${TRFILES}
	cp rtftohtml ${BINDIR}
	cp ${TRFILES} ${LIBDIR}

clean:	
	rm -f ${OBJS} rtftohtml

rtftohtmlsrc.tar.Z:	${SRCDIST}
	tar -cf rtftohtmlsrc.tar ${SRCDIST}
	compress rtftohtmlsrc.tar

rtftohtmlsun4.tar.Z:	${BINDIST}
	tar -cf rtftohtmlsun4.tar ${BINDIST}
	compress rtftohtmlsun4.tar

stdcharnames.h:	standard-names 
	$(AWK) -f stdnames.awk standard-names >stdcharnames.h

