#
# NET-BASE	A collection of programs that form the base set of the
#		NET-2 Networking Distribution for the LINUX operating
#		system.
#
# Version:	@(#)Makefile	0.32	01/16/94
#
# Author:	Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
#		Copyright 1988-1993 MicroWalt Corporation
#
#		Extensively modified from 01/21/94 onwards by
#		Alan Cox <A.Cox@swansea.ac.uk>
#		Copyright 1993-1994 Swansea University Computer Society
#
#		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.
#

.EXPORT_ALL_VARIABLES:

CFLAGS	= -I. -I.. -Ilib $(O) #-DDEBUG
LDFLAGS	= -Llib -L../lib -N -s

LDLIBS	= -lsupport


PROGS	= ifconfig hostname arp netstat route slattach rarp plipconfig

all:		config.h version.h $(PROGS)
install:	all
		install -s hostname /bin
		install -s ifconfig netstat route /sbin
		install -s arp rarp slattach plipconfig /usr/sbin/
		install -s hostname /usr/bin/dnsdomainname
		install -m644 man/hostname.1 man/dnsdomainname.1 /usr/man/man1/
		install -m644 man/arp.8 man/ifconfig.8 man/netstat.8 \
			man/rarp.8 man/route.8 man/slattach.8 man/plipconfig.8 \
			/usr/man/man8/

clean:
		rm -f *.o $(PROGS)
		(cd lib && make clean)

ifconfig:	lib/libsupport.a ifconfig.o
hostname:	lib/libsupport.a hostname.o
plipconfig:	plipconfig.o
route:		lib/libsupport.a route.o
arp:		lib/libsupport.a arp.o
rarp:		lib/libsupport.a rarp.o
slattach:	lib/libsupport.a slattach.o
netstat:	lib/libsupport.a netstat.o


lib/libsupport.a:
		@(cd lib ; $(MAKE))

netstat.o:	netstat.c
		$(CC) $(CFLAGS) -D__KERNEL__ -c $<

# End of Makefile.
