#
# Copyright (c) 1992 Regents of the University of Michigan.
# All rights reserved.
#
# Redistribution and use in source and binary forms are permitted
# provided that this notice is preserved and that due credit is given
# to the University of Michigan at Ann Arbor. The name of the University
# may not be used to endorse or promote products derived from this
# software without specific prior written permission. This software
# is provided ``as is'' without express or implied warranty.
#
# Make Definitions file for the Internet Rover Problem Display Programs
#
SRCS=	inetrover.c netquery.c testport.c ns.c dxiup.c
HDRS=	netquery.h
OBJS=	inetrover.o netquery.o testport.o ns.o

DEFINES= 	-D_BSD 
INCLUDES= 	-I. -I../../include 
CFLAGS=	 	${INCLUDES} ${DEFINES} ${ACFLAGS}

MYLIBS=		-lctools -lProblemManager -lHostfileManager
LDFLAGS= 	-L${LIBDIR} ${MYLIBS} ${BSDLIB} ${ALDFLAGS}

default:
	(cd ../.. ; make InetRover)

all: InetRoverd ns dxiup

InetRoverd: ${OBJS} version.c
	${CC} -o $@ version.c ${OBJS} ${LDFLAGS}

version.c: Version.c
	(u=$${USER-root} h=`hostname` t=`date` v=`cat ../../VERSION`; \
	sed -e "s|%WHEN%|$${t}|" \
	    -e "s|%VERSION%|$${v}|" \
	    -e "s|%WHOANDWHERE%|$${u}@$${h}|" \
	    < Version.c > version.c)

ns: ns.c
	${CC} -o $@ -DSTANDALONE ns.c ${LDFLAGS}

dxiup: dxiup.c dixie.h
	${CC} -o $@ -DSTANDALONE dxiup.c ${LDFLAGS}

testport: testport.c 
	${CC} -DSTANDALONE -o $@ testport.c 

clean:
	rm -f *.o core InetRoverd ns dxiup version.c version.o

install:
	( cd ${BINDIR} ; rm -f InetRoverd ns dxiup )
	cp InetRoverd ns dxiup ${BINDIR}

depend: ${SRCS}
	mkdep ${CFLAGS} ${SRCS}

lint: ${SRCS} ${HDRS}
	lint -Dlint ${DEFINES} ${INCLUDES} ${SRCS}

tags:
	ctags -t ${SRCS} ${HDRS}

# DO NOT DELETE THIS LINE -- mkdep uses it.
# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.

inetrover.c:
netquery.c:
testport.c:
ns.c:
dxiup.c:

# IF YOU PUT ANYTHING HERE IT WILL GO AWAY
