#
# $Header: /usr/src/ecn/getethers/RCS/Makefile,v 1.4 92/05/08 14:15:36 davy Exp $
#
# Makefile for getethers.
#
# David A. Curry
# Purdue University
# Engineering Computer Network
# davy@ecn.purdue.edu
# November, 1991
#
GROUP =	guru
BINDIR=	/usr/local/etc
MANSEC=	8
MANDIR=	/usr/local/man/man$(MANSEC)

#
# Add -DNEED_STRDUP if you don't have the strdup() library routine.
# Add -DNEED_ENTOA  if you don'y have the ether_ntoa() library routine.
#
CC =	gcc
DEFS =	
CFLAGS=	-g -O $(DEFS)
LIBS =	-L/usr/local/lib -lresolv

#
#	If your inet_ routines are broken you may have to use
#	the longer form of the following OBJS definitions -
#	unless you have correct versions in your /usr/local/lib. ;-)
#
#OBJS=	arp.o excelan.o if.o main.o ping.o sniffer.o vendors.o

OBJS=	arp.o excelan.o if.o main.o ping.o sniffer.o vendors.o \
	inet_addr.o inet_lnaof.o inet_makeaddr.o inet_netof.o \
	inet_network.o inet_ntoa.o

getethers: $(OBJS)
	$(CC) $(CFLAGS) -o $@ $(OBJS) $(LIBS)

install: getethers
	install -c -s -m 4750 -o root -g $(GROUP) getethers $(BINDIR)/getethers
	install -c -m 644 getethers.8l $(MANDIR)/getethers.$(MANSEC)

clean:
	rm -f a.out core getethers *.o \#*

arp.o : arp.c defs.h
excelan.o : excelan.c defs.h
if.o : if.c defs.h
inet_addr.o : inet_addr.c
inet_lnaof.o : inet_lnaof.c
inet_makeaddr.o : inet_makeaddr.c
inet_netof.o : inet_netof.c
inet_network.o : inet_network.c
inet_ntoa.o : inet_ntoa.c
main.o : main.c defs.h
ping.o : ping.c defs.h
sniffer.o : sniffer.c defs.h
vendors.o : vendors.c defs.h
