`# $Id: multiplec,v 2.2 1997/10/26 14:56:36 ksb Exp $
#
#	master Makefile for %% program name %%

PROG=	%% program name %%
BIN=	${DESTDIR}/%% bin directory might change to ETC %%
LIB=	${DESTDIR}/%% lib directory if needed %%
DOC=	${DESTDIR}/usr/local/man

I=/usr/include
S=/usr/include/sys
L=/usr/include/local
P=

INCLUDE=%% include file directories %%
DEBUG=	%% compiler debug/optimize switch %%
CDEFS=  -D'HOSTTYPE`%% extra arguments for the C compiler %%
CFLAGS= ${DEBUG} ${CDEFS} ${INCLUDE}

HDR=	%% header (.h) files %%
SRC=	%% source (.c) files %%
OBJ=	%% object (.o) files %%
MAN=	%% the manual page for this tool %%
OTHER=	README %% other files in this directory %%
SOURCE=	Makefile ${OTHER} ${MAN} ${HDR} ${SRC}

all: ${PROG}

${PROG}:$P ${OBJ}
	${CC} -o $@ ${CFLAGS} ${OBJ} %% -ltermcap -lm -lopt -lpucc %%

clean: FRC
	rm -f Makefile.bak ${PROG} a.out *.o core errs lint.out tags

deinstall: ${MAN} ${DOC} FRC
	install -R ${BIN}/${PROG}
	mkcat -r${DOC} -D ${MAN}

depend: ${HDR} ${SRC} FRC
	maketd ${CDEFS} ${INCLUDE} ${SRC}

dirs: ${BIN} ${LIB}

distrib: FRC
	distrib -c ${BIN}/${PROG} HOST

install: all dirs FRC
	install -cs ${PROG} ${BIN}/${PROG}

lint: ${HDR} ${SRC} FRC
	lint -h ${CDEFS} ${INCLUDE} ${SRC}

mkcat: ${MAN} ${DOC} FRC
	mkcat -r${DOC} ${MAN}

print: source FRC
	lpr -J"${PROG} source" ${SOURCE}

source: ${SOURCE}

spotless: clean
	rcsclean ${SOURCE}

tags: ${HDR} ${SRC}
	ctags -t ${HDR} ${SRC}

${BIN} ${LIB}:
	install -dr $@

${SOURCE}:
	co -q $@

FRC:

# DO NOT DELETE THIS LINE - make depend DEPENDS ON IT

# *** Do not add anything here - It will go away. ***
'dnl
