
# This Makefile will help automate the installation of the binaries that
# are needed to enable Van Jacobson's traceroute.  This Makefile has been
# written for and tested on a Sun 3, Sun 3x, and Sun 4 machines running
# SunOS 4.0.x.  There is no reason, however, why it could not be expanded
# to the 386i or other machines.
#
# Note that this Makefile will overwrite the existing (SunOS 4.0.x versions)
# of /sys/arch/OBJ/raw_ip.o and /sys/arch/OBJ/ip_icmp.o, where "arch" is
# your kernel architecture.  If you want to save the 4.0.x versions of
# raw_ip.o and ip_icmp.o, you need to do this by hand before running
# the Makefile. 
#

# To install, set the ARCH_K and DESTDIR variables properly.  (See
# accompanying notes elsewhere in the # Makefile.)
#
# Then become root and type "make install"
#
# REMINDER:
# YOU MUST RECOMPILE AND REINSTALL YOUR KERNEL AFTER RUNNING THIS MAKEFILE!!
# IF YOU DO NOT DO THIS, TRACEROUTE WILL NOT BE ENABLED ON YOUR MACHINE.
#
# Manavendra K. Thakur <thakur@zerkalo.harvard.edu>  11/24/89
# Revised to fix DESTDIR. 01/29/90


# Set DESTDIR to the directory in which the traceroute executable will be
# installed.  /usr/etc is a good place to put a network debugging tool such
# as this.

DESTDIR= /usr/local/bin

# You shouldn't need to change anything below this line.

CC= cc
CFLAGS = -O

# At the moment, the INCL variable isn't really needed for anything.
INCL = -I.
LIBS = -lsocket -lnsl
MANDIR= /usr/local/man/man8

all: traceroute

traceroute: traceroute.c
	$(CC) $(CFLAGS) $(INCL) -o traceroute traceroute.c $(LIBS)

install: all
	install -o root -g bin -m 4755 traceroute ${DESTDIR}
	install -o root -g staff -m 755 traceroute.8 ${MANDIR}
	@ echo ""
	@ echo "Binaries and man page installed."
	@ echo ""

lint:
	lint -b -h -x $(INCL) traceroute.c

clean:
	rm -f *.o traceroute
