DAEMONDIR	= /usr/net
DESTDIR		= /usr/local

OBJECTS	= rsendd.o rsend.o
SOURCE	= rsendd.c rsend.c
HEADRS	= rsend.h

#
# Possible defines in CFLAGS are:
#
# -DDEBUG	when debugging the daemon, it will run attached to a terminal
#		compile and load with -g instead of -O, and debug it
# -DTEST 	when testing the daemon, doesn't need to be root, but can't
#		recieve from other machines (Entry in /etc/services not needed)
# -DINET_D	if you let the daemon be invoked by inetd (the internet daemon)
#		when its service is required
# -DUNIQUE	if you want the user program to check rwho database for
#		reciever on other hosts when not logged in on the local machine
#		(i e one username is always the same person on all machines in
#		the local area network)

CFLAGS	= -O -DUNIQUE
# LDFLAGS = -O	# when debugging

all:	rsend rsendd
	
rsend:	rsend.o
	cc ${LDFLAGS} -o rsend rsend.o

rsendd:	rsendd.o
	cc ${LDFLAGS} -o rsendd rsendd.o

rsend.o:	 ${HEADRS}

rsendd.o:	 ${HEADRS}

install:	all
	strip rsend rsendd
	cp rsend ${DESTDIR}/rsend
	cp rsendd ${DAEMONDIR}/rsendd
	chmod 755 ${DESTDIR}/rsend
	chmod 700 ${DAEMONDIR/rsendd

clean:
	rm -f *.o
