#
#	Internet Rover Makefile		WB Norton    	4/17/89
#					Merit Computer Network
#
#   Make Definitions file for the Internet Rover Pinger (Pingky) 
#							(Little Pingger)
#
#VPATH = ../MISC
#CFLAGS=-g -D_BSD=1 -DBUILTIN=1
CFLAGS=-g -D_BSD=1 

.c.o:
	echo 'static char *Version="'$* ${PINGKYVERSION}' compiled on '`hostname ` at `date`'";' >version.h ; \
	cc ${CFLAGS} -c $<


InetRoverd: inetrover.o netquery.o Hostfileio.o ../Ctools/ctools.o ../ProblemManager/ProblemManager.o  Hostfileio.o ../ProblemManager/ProblemFileio.o connect.o
	cc -o InetRoverd inetrover.o netquery.o Hostfileio.o ../ProblemManager/ProblemManager.o ../Ctools/ctools.o ../ProblemManager/ProblemFileio.o connect.o 

# Must make ping as root! 
ping:	ping.o Makefile
	cc -o ping ping.o
	chmod 4755 ping

ping.o:	
	cc -c ping.c $(CFLAGS)

Hostfileio:	Hostfileio.o ../Ctools/ctools.o
	cc -o Hostfileio Hostfileio.c -g -DDEBUG=1 -DSTANDALONE=1 ../Ctools/ctools.o

print:
	lpr -Pnext *.c *.h Makefile

netquery.o: netquery.c netquery.h 
	cc -c ${CFLAGS} netquery.c

clean:
	-rm *.o
	-rm core
	-rm Display xdisplay 
	-rm pingky.cycle 
#	-rm PROBLEM.FILE  hostfileio problemlog.*
	-rm ping InetRoverd Hostfileio
	-rm LINKCHECK/*.log LINKCHECK/AS.*
	-rm MailBridge/*.log MailBridge/AS.*

fastping:       Hostfileio.o ../Ctools/ctools.o fastping.o
	cc -o fastping fastping.c Hostfileio.o ../Ctools/ctools.o

ns:	ns.c
	cc -c ns.c -DSTANDALONE -D_BSD
	cc -o ns ns.o
	
