#
# dip		Dialup IP connection support program.
#		Makefile for LINUX.
#
# Version:	@(#)Makefile.LINUX	1.30	08/18/94
#
# Author:	Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG>
#		Copyright 1988-1993 MicroWalt Corporation
#	
# Modified:     Uri Blumenthal, <uri@watson.ibm.com>
#               Copyright 1994 IBM T. J. Watson Research Center
#
#		This program is free software; you can redistribute it
#		and/or  modify it under  the terms of  the GNU General
#		Public  License as  published  by  the  Free  Software
#		Foundation;  either  version 2 of the License, or  (at
#		your option) any later version.
#

# If you want to include S/Key authentication, un-comment the next
# 2 lines. You will need libskey.a from the skey-linux-1.1b package
# (available on sunsite.unc.edu in
# /pub/Linux/system/Network/sunacm/Programs/User/skey)
# If libskey.a is not in /usr/lib then add the path to it in the 
# SKEYLIB define below.
# Some of S/Key sources is here in skey directory, probably enough
# to build libskey.a, but I haven't tested it...
#
# If you're retarded and insist on binary locks - you may try
# -DHAVE_V2_LOCKFILES=1 flag. I haven't debugged it and will
# not accept any complains if this doesn't work as you
# would like (:-). I don't use it myself, won't test
# it and won't care.

#SKEYDEF	= -DSKEY
#SKEYLIB	= -L/usr/local/lib -lskey

CFLAGS	= -DLINUX $(SKEYDEF) $(O)
LDFLAGS	= -N

LDLIBS	= $(SKEYLIB)


VERSION	= 3.3.7


# Object modules.
OBJS	= main.o config.o daemon.o tty.o attach.o \
	  term.o modem.o command.o login.o 

PROTOS	= slip.o ppp.o


all:		dip

install:	all
		install -s -m 6754 -o root -g uucp dip /usr/sbin/
		(cd /usr/sbin; ln -sf dip diplogin)
		install -m 644 man/dip.8 /usr/man/man8/
		(cd /usr/man/man8; ln -sf dip.8 diplogin.8)
		if ! test -f ~root/sample.dip; then \
			install -m 600 samples/conf/net/dip/sample.dip \
				~root/sample.dip; fi
		if ! test -f /etc/diphosts; then \
			install -m 644 samples/conf/net/diphosts /etc; fi


dip:		protocols.a $(OBJS)
		$(CC) $(LDFLAGS) -o dip $(OBJS) protocols.a $(LDLIBS)

protocols.a:	$(PROTOS)
		ar rcs protocols.a $(PROTOS)

clean:
		rm -f core *.o *.a dip

# End of Makefile.
