#
# $Header: Makefile,v 1.7 89/02/23 14:21:18 he Locked $
#
# $Log:	Makefile,v $
# Revision 1.7  89/02/23  14:21:18  he
# Parametrized install, changed man directory.
# 
# Revision 1.6  88/09/17  19:40:28  he
# Incredible. Error in OS_REV again.
# 
# Revision 1.5  88/09/17  19:11:54  he
# Glitch with OS_REV fixed.
# 
# Revision 1.4  88/09/17  18:59:11  he
# Changes to add SunOS version define.
# Some rearranging of macros (LOCAL_DEFINES, DEBUG_OR_OPT etc.)
# 
# Revision 1.3  88/08/10  14:05:22  he
# Syntax error...
# 
# Revision 1.2  88/08/10  14:00:09  he
# Misc. cleanup.
# Moved all configurable options to head of file.
# Generalized by using more macros.
# Created "install" and "shar" targets.
# 
# Revision 1.1  88/08/04  19:40:22  he
# Initial revision
# 
########################################
# Local configuration macros:

# This is where the executable goes
DEST=/local/etc

# This is where the man page goes
MANDIR=/local/man/man8
MANEXT=8

# If you run SunOS 4.x, use OS_REV=4;
# if you run SunOS 3.x where x>=2, use OS_REV=3
OS_REV=4

# You may override the macro definition of CONFFILE in LOCAL_DEFINES
# below, if the default of /etc/proxytab is unacceptable.  (eg. by
# including -DCONFFILE=\"/usr/local/etc/proxytab\").
LOCAL_DEFINES=

DEBUG_OR_OPTIMIZE= -g

# use "-c -s" if not debugging, "-c" if debugging
INSTALL_FLAGS= -c

# If you need special info to access a 4.3-style resolver (preferred
# if you have one), put any necessary info here:
LIBS= -lresolv
INCLUDES=

# End of local configuration macros
########################################

DEFINES= "-DOS_REV=$(OS_REV)" $(LOCAL_DEFINES)
CFLAGS= $(DEBUG_OR_OPTIMIZE) $(DEFINES) $(INCLUDES)
#

PROGS=	proxyarpd

OBJS=	proxyarpd.o

SRC=	proxyarpd.c

DISTFILES=\
	README		\
	TODO		\
	Makefile	\
	proxyarpd.c	\
	proxyarpd.8	\
	proxytab.example


all: $(PROGS)

proxyarpd: $(OBJS)
	$(CC) $(CFLAGS) -o proxyarpd $(OBJS) $(LIBS)

lint: $(SRC)
	lint $(DEFINES) -Dlint $(SRC)

shar: $(DISTFILES)
	shar $(DISTFILES) > proxyarpd.shar

clean:
	rm -f $(OBJS) $(PROGS) proxyarpd.shar core a.out

install: all
	install $(INSTALL_FLAGS) proxyarpd $(DEST)/proxyarpd
	cp proxyarpd.8 $(MANDIR)/proxyarpd.$(MANEXT)

.DEFAULT:
	co $@
