# Makefile for the supdup server and user.

# Definitions for supdupd.
# TERMINFO	Does setup for terminfo.
# TTYLOC	Sets your ttyloc from supdup.  The code included is specific
#		to borax.  You would probably want to replace the code in
#		those sections with whatever you do locally for ttyloc.
#
# Definitions for supdup.
# TERMCAP	Uses the termcap database.
# TERMINFO	Uses the terminfo database.  Exactly one of TERMCAP or
#		TERMINFO must be defined and the corresponding library
#		(-ltermcap or -lterminfo) must be linked in.

SUPDUPD-DEF = -DTTYLOC -DDEBUG
SUPDUP-DEF = -DTERMCAP -DDEBUG
# -lresolv is for the domain name resolver
SUPDUP-LIB = -ltermcap
# -lresolv is not needed, it is in libc for athena 5.x (4.3?)
PROGRAM = supdup

#all: supdup supdupd

all: $(PROGRAM)

supdup: supdup.c termcap.h
	cc -O -o supdup $(SUPDUP-DEF) supdup.c $(SUPDUP-LIB)

supdupd: supdupd.c supdupd.h
	cc -O -o supdupd $(SUPDUPD-DEF) supdupd.c

install:
	install -c -s -g watchmkr -m 755 $(PROGRAM) /mit/watchmaker/`machtype`bin/$(PROGRAM)

clean:
	/bin/rm -f *.o *.back core $(PROGRAM) *~ \#* *.{aux,err,log}

# note: untested make. Need to uncompress supdup.mss.Z first...
supdup.PS: supdup.mss
	rm -f supdup.PS; scribe supdup -device postscript

