##############################################################################
#    Instructions to Make, for compilation of ZOT UIP/utility processes
#
#	This file is automatically generated.  Do not edit!
# @(#)$Id: zotnetM,v 2.7 1992/10/29 16:25:20 jromine Exp $
##############################################################################

# The following entries were inserted during MH configuration
OPTIONS	=	-DSYS5 -DMORE='"/usr/bin/more"' -DRENAME -DSYS5DIR -DUNISTD -DSVR4 -DMIME -DVSPRINTF -DMHE -DOVERHEAD -DRPATHS -DDUMB -DATHENA -DBIND -DSOCKETS -DFCNTL -DPOPSERVICE='"pop-3"' -DDPOP -DPOP2 -DRPOP -DMHRC -DMAILGROUP -DSENDMTS -DSMTP -DPOP -DSPRINTFTYPE=int -DTYPESIG=void -traditional -D_NFILE='getdtablesize()' -DSIGEMT=SIGUSR1 -O2

# Linux shared library
JUMP_DIR=../jump/
JUMP_LIB=libzot
export JUMP_DIR JUMP_LIB

CC	=	cc
CFLAGS	=	$(OPTIONS) -I.
LFLAGS	=	-bhu $(OPTIONS) -I.

LIB	=	libzot.a
LLIB	=	llib-lzotnet

OFILES	=	mts/mts.o mts/lock.o mts/client.o mf/mf.o \
		bboards/getbbent.o \
		tws/dtime.o tws/dtimep.o tws/lexstring.o

MAKE	=	make DESTDIR=$(DESTDIR) $(MFLAGS)
SHELL	=	/bin/sh

DIRS	=	mts bboards tws mf


##############################################################################
#	Generation Rules
##############################################################################

# Linux: create $*.j from $*.c, contains DLL version
.c.o:;
	$(CC) -B/usr/dll/jump/ $(CFLAGS) -c $*.c
		-ld -x -r $@
		mv a.out $*.j
		$(CC) $(CFLAGS) -c $*.c
		-ld -x -r $@
		mv a.out $@



.c:;
	echo $@

##############################################################################
#	Generate ZOTnet subroutine library
##############################################################################

all:		allaux $(LIB)

$(LIB):		$(OFILES)
		-mv $@ z$@
		ar r $@ $(OFILES); ranlib $@
		-@ls -l $@
		-@echo "ZOTnet library built normally"

allaux:;
	for d in $(DIRS); do (cd $$d; $(MAKE) all); done

depend:;
	for d in $(DIRS); do (cd $$d; $(MAKE) depend); done

lint:;
	for d in $(DIRS); do (cd $$d; $(MAKE) lint); done


##############################################################################
#	Installation
##############################################################################

install:	inst-all clean

inst-all:;
	for d in $(DIRS); do (cd $$d; $(MAKE) inst-all); done

tar:;
	@for d in $(DIRS); \
		    do (cd $$d; $(MAKE) TFLAGS="$(TFLAGS)" tar); done

uninstall:;
	for d in $(DIRS); do (cd $$d; $(MAKE) uninstall); done


##############################################################################
#	Miscellaneous tasks
##############################################################################

unconfig:;
	-rm -f $(LIB) z$(LIB) _* :* *.o core
		for d in $(DIRS); do (cd $$d; $(MAKE) unconfig); done
		-rm -f Makefile

distribution:;
	-rm -f $(LIB) z$(LIB) _* :*
		for d in $(DIRS); do (cd $$d; $(MAKE) distribution); done

clean:;
	-rm -f $(LIB) z$(LIB) _* :* *.o *.j core
		for d in $(DIRS); do (cd $$d; $(MAKE) clean); done

unclean:;
	-rm -f z$(LIB) _* :* core
		for d in $(DIRS); do (cd $$d; $(MAKE) unclean); done
