#! smake
#	$Id: Makefile.in,v 1.137 1996/08/21 23:30:42 sam Rel $
#
# Warning, this file was automatically created by the HylaFAX configure script
#
# HylaFAX Facsimile Software
#
# Copyright (c) 1990-1996 Sam Leffler
# Copyright (c) 1991-1996 Silicon Graphics, Inc.
# HylaFAX is a trademark of Silicon Graphics
# 
# Permission to use, copy, modify, distribute, and sell this software and 
# its documentation for any purpose is hereby granted without fee, provided
# that (i) the above copyright notices and this permission notice appear in
# all copies of the software and related documentation, and (ii) the names of
# Sam Leffler and Silicon Graphics may not be used in any advertising or
# publicity relating to the software without the specific, prior written
# permission of Sam Leffler and Silicon Graphics.
# 
# THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, 
# EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY 
# WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.  
# 
# IN NO EVENT SHALL SAM LEFFLER OR SILICON GRAPHICS BE LIABLE FOR
# ANY SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND,
# OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
# WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY OF 
# LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 
# OF THIS SOFTWARE.
#

#
# VERSION:	v4.0pl1
# DATE:		Fri Aug 15 16:03:03 MEST 1997
# TARGET:	i586-unknown-linux
# CCOMPILER:	/usr/bin/gcc
# CXXCOMPILER:	/usr/bin/g++
#
DEPTH=..
include ${DEPTH}/defs

SRCDIR	= ${DEPTH}/${TOPSRCDIR}/faxd
VPATH	= .././faxd

C++FILES=ClassModem.c++ \
	FaxModem.c++ \
	Class0.c++ \
	Class1.c++ \
	Class1Poll.c++ \
	Class1Recv.c++ \
	Class1Send.c++ \
	Class2.c++ \
	Class20.c++ \
	Class2Ersatz.c++ \
	Class2Poll.c++ \
	Class2Recv.c++ \
	Class2Send.c++ \
	CopyQuality.c++ \
	DestControl.c++ \
	DestInfo.c++ \
	FaxAcctInfo.c++ \
	FaxFont.c++ \
	FaxMachineInfo.c++ \
	FaxMachineLog.c++ \
	FaxPoll.c++ \
	FaxRecv.c++ \
	FaxRequest.c++ \
	FaxSend.c++ \
	HylaClient.c++ \
	ModemServer.c++ \
	FaxServer.c++ \
	G3Decoder.c++ \
	G3Encoder.c++ \
	Getty.c++ \
	GettySysV.c++ \
	HDLCFrame.c++ \
	Job.c++ \
	Modem.c++ \
	ModemConfig.c++ \
	PCFFont.c++ \
	QLink.c++ \
	ServerConfig.c++ \
	TagLine.c++ \
	Trigger.c++ \
	TriggerRef.c++ \
	UUCPLock.c++ \
	faxApp.c++ \
	faxGettyApp.c++ \
	faxQueueApp.c++ \
	faxRequest.c++ \
	faxSendApp.c++ \
	tagtest.c++ \
	tsitest.c++ \
	pageSendApp.c++ \
	d1SendApp.c++ \
	citySendApp.c++ \
	d2SendApp.c++ \
	ftpSendApp.c++  \
	isdn_bftrcv.c++
MODEM_OBJS=ClassModem.o \
	FaxModem.o \
	Class0.o \
	Class1.o \
	Class1Poll.o \
	Class1Recv.o \
	Class1Send.o \
	Class2.o \
	Class20.o \
	Class2Ersatz.o \
	Class2Poll.o \
	Class2Recv.o \
	Class2Send.o \
	CopyQuality.o \
	G3Decoder.o \
	G3Encoder.o \
	HDLCFrame.o \
	ModemConfig.o \
	FaxFont.o \
	PCFFont.o \
	TagLine.o
SERVER_OBJS=faxApp.o \
	\
	faxRequest.o \
	FaxRequest.o \
	\
	FaxAcctInfo.o \
	FaxMachineInfo.o \
	FaxMachineLog.o \
	FaxPoll.o \
	FaxRecv.o \
	FaxSend.o \
	ModemServer.o \
	FaxServer.o \
	UUCPLock.o \
	ServerConfig.o
FAXQOBJS=DestControl.o \
	DestInfo.o \
	Job.o \
	HylaClient.o \
	Modem.o \
	QLink.o \
	Trigger.o \
	TriggerRef.o \
	\
	faxQueueApp.o
FAXSENDOBJS=  faxSendApp.o
FAXQCLEANOBJS=faxQCleanApp.o
FAXGETTYOBJS= Getty.o GettySysV.o faxGettyApp.o
TARGETS=libfaxserver.${DSO} \
	faxq faxsend faxgetty pagesend ftpserver d1send citysend d2send ftpsend faxqclean \
	tsitest tagtest cqtest choptest

default all::
	@${MAKE} incdepend
	@${MAKE} targets

targets: $(TARGETS)

include ${COMMONRULES}

libfaxserver.a: ${SERVER_OBJS} ${MODEM_OBJS}
	${AR} ${AROPTS} libfaxserver.a $?
	${RANLIB} libfaxserver.a

# ${SRCDIR}/Makefile.nodso

LDIRT	= hash.h version.h mkhash

hash.h:	mkhash
	rm -f hash.h; ./mkhash > hash.h
mkhash:	${SRCDIR}/mkhash.c
	${CCF} -o mkhash ${SRCDIR}/mkhash.c

version.h:
	VERSION="4.0pl1";\
	if [ pl1 = beta ]; then \
	    VERSION="$${VERSION}022"; \
	fi; \
	rm -f version.h; \
	echo "#define VERSION \"HylaFAX (tm) Version $$VERSION\"">version.h
faxQueueApp.o FaxRecv.o: version.h
incdepend: version.h hash.h

faxq:	${FAXQOBJS} libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ ${FAXQOBJS} libfaxserver.${DSO} ${LDFLAGS}
	cp faxq /usr/sbin
	cp faxq /usr/lib

faxsend: ${FAXSENDOBJS} libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ ${FAXSENDOBJS} libfaxserver.${DSO} ${LDFLAGS}
	cp faxsend /usr/sbin
	cp faxsend /usr/lib

faxgetty: ${FAXGETTYOBJS} libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ ${FAXGETTYOBJS} libfaxserver.${DSO} ${LDFLAGS}
	cp faxgetty /usr/sbin
	cp faxgetty /usr/lib

faxqclean: ${FAXQCLEANOBJS} libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ ${FAXQCLEANOBJS} libfaxserver.${DSO} ${LDFLAGS}

PAGESENDOBJS=\
	pageSendApp.o
pagesend:${PAGESENDOBJS} libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ ${PAGESENDOBJS} libfaxserver.${DSO} ${LDFLAGS}

D1SENDOBJS=\
	d1SendApp.o
d1send:${D1SENDOBJS} libfaxserver.${DSO} ../lms/lmslib.o ${LIBS}
	${C++F} -o $@ ${D1SENDOBJS} ../lms/lmslib.o libfaxserver.${DSO} ${LDFLAGS}
	cp d1send /usr/sbin
	cp d1send /usr/lib

FTPSERVEROBJS=\
	isdn_bftrcv.o
ftpserver:${FTPSERVEROBJS} 
	${C++F} -o bmftrecv ${FTPSERVEROBJS} ${LDFLAGS}
	cp bmftrecv /usr/sbin
	cp bmftrecv /usr/lib

CITYSENDOBJS=\
	citySendApp.o
citysend:${CITYSENDOBJS} libfaxserver.${DSO} ../lms/lmslib.o ${LIBS}
	${C++F} -o $@ ${CITYSENDOBJS} ../lms/lmslib.o libfaxserver.${DSO} ${LDFLAGS}
	cp citysend /usr/sbin
	cp citysend /usr/lib

FTPSENDOBJS=\
	ftpSendApp.o
ftpsend:${FTPSENDOBJS} libfaxserver.${DSO} ../lms/lmslib.o ${LIBS}
	${C++F} -o bmftsend ${FTPSENDOBJS} ../lms/lmslib.o libfaxserver.${DSO} ${LDFLAGS}
	cp bmftsend /usr/sbin
	cp bmftsend /usr/lib

D2SENDOBJS=\
	d2SendApp.o
d2send:${D2SENDOBJS} libfaxserver.${DSO} ../lms/lmslib.o ${LIBS}
	${C++F} -o $@ ${D2SENDOBJS} ../lms/lmslib.o libfaxserver.${DSO} ${LDFLAGS}
	cp d2send /usr/sbin
	cp d2send /usr/lib

tagtest: tagtest.o libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ tagtest.o libfaxserver.${DSO} ${LDFLAGS}
cqtest:	cqtest.o libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ cqtest.o libfaxserver.${DSO} ${LDFLAGS}
choptest: choptest.o libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ choptest.o libfaxserver.${DSO} ${LDFLAGS}
tsitest: tsitest.o libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ tsitest.o libfaxserver.${DSO} ${LDFLAGS}
trigtest: trigtest.o libfaxserver.${DSO} ${LIBS}
	${C++F} -o $@ trigtest.o libfaxserver.${DSO} ${LDFLAGS}

PUTSERV=${INSTALL} -idb ${PRODUCT}.sw.server

install: default
	${PUTSERV} -F ${SBIN} -m 755 -O faxq faxqclean
	${PUTSERV} -F ${LIBEXEC} -m 755 -O faxgetty faxsend pagesend ftpserver d1send citysend d2send ftpsend
	${PUTSERV} -F ${SBIN} -m 755 -O tsitest tagtest cqtest choptest
