#
# Copyright (c) 1987, 1989 University of Maryland
# Department of Computer Science.  All rights reserved.
# Permission to copy for any purpose is hereby granted
# so long as this copyright notice remains intact.
#
# /usr/local/src/CVS/eps/dvi/Makefile,v 1.2 1993/10/02 03:12:35 neal Exp
#
# Makefile for ctex/dvi (DVI-to-DVI conversion programs)
#
CFLAGS=	-O -I../h

CC=gcc

%.o:	%.c
	${CC} -c ${CFLAGS} $<


DESTDIR=
#SHELL=	/bin/sh

LIBS=	../lib/lib.a

# these are intended to be overridden by the definitions in ../Makefile
# but just in case, they are here too
BINDIR=	${DESTDIR}/usr/TeX/bin
MANDIR=	${DESTDIR}/usr/man
INSTALL=install

SRCS=	dviconcat.c dviselect.c
PROGS=	dviconcat dviselect

all: ${PROGS}

install:
	for i in ${PROGS}; do \
	    ${INSTALL} $$i ${BINDIR}; done
	${INSTALL} -c -m 444 dviconcat.1 ${MANDIR}/man1
	${INSTALL} -c -m 444 dviselect.1 ${MANDIR}/man1

clean:
	rm -f core *.o *.bak ${PROGS}

cleandir: clean
	rm -f .depend

depend: ${SRCS}
	mkdep ${CFLAGS} ${SRCS}

lint: ${SRCS}
	lint ${LINTFL} dviconcat.c
	lint ${LINTFL} dviselect.c

dviconcat: dviconcat.o ${LIBS}
	${CC} -o dviconcat ${CFLAGS} dviconcat.o ${LIBS}

dviselect: dviselect.o ${LIBS}
	${CC} -o dviselect ${CFLAGS} dviselect.o ${LIBS}

