#*
#* TNET		A server program for MINIX which implements the TCP/IP
#*		suite of networking protocols.  It is based on the
#*		TCP/IP code written by Phil Karn et al, as found in
#*		his NET package for Packet Radio communications.
#*
#*		@(#)inet/Makefile	1.00	07/11/92
#*
#* Author:	Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
#*

# This set of macros for the MINIX-PC ACK compiler.
CC	= cc -LIB
O	= s
L	= ack

# This set of macros for the MINIX-PC BCC compiler.
#CC	= bcc
#O	= o
#L	= bcc

# Where are the TNET include files?
INC	= -I../../include

# Library options.
#OPTS	=
#OPTS	= -DDEBUG
#OPTS	= -DNETWORKED
OPTS	= -DDEBUG -DNETWORKED
CFLAGS	= -D_MINIX -D_POSIX_SOURCE $(OPTS) $(INC)

OBJ	= gethostent.$(O) res_query.$(O) res_send.$(O) res_debug.$(O) \
	  res_mkquery.$(O) res_init.$(O) in_addr.$(O) in_mkaddr.$(O) \
	  htonl.$(O) getnetent.$(O) in_lnaof.$(O) in_netof.$(O) \
	  ntohl.$(O) res_comp.$(O) ntohs.$(O) in_ntoa.$(O) in_network.$(O) \
	  htons.$(O) herror.$(O) getservent.$(O) getprtoent.$(O) \
	  _byteorder.$(O)


libinet.a:		Makefile $(OBJ)
			ar rv ../$(L)/libinet.a $(OBJ)

clean:
			@rm -f *.a *.$(O)

Versions:
			@fgrep "\@\(\#\)" *.c >tmp
			@sed 's/.*:	//' <tmp >Versions
			@rm -f tmp

gethostent.$(O):	gethostent.c
			$(CC) -c $(CFLAGS) gethostent.c

res_query.$(O):		res_query.c
			$(CC) -c $(CFLAGS) res_query.c

res_debug.$(O):		res_debug.c
			$(CC) -c $(CFLAGS) res_debug.c

res_mkquery.$(O):	res_mkquery.c
			$(CC) -c $(CFLAGS) res_mkquery.c

res_send.$(O):		res_send.c
			$(CC) -c $(CFLAGS) res_send.c

res_init.$(O):		res_init.c
			$(CC) -c $(CFLAGS) res_init.c

in_addr.$(O):		in_addr.c
			$(CC) -c $(CFLAGS) in_addr.c

in_mkaddr.$(O):		in_mkaddr.c
			$(CC) -c $(CFLAGS) in_mkaddr.c

htonl.$(O):		htonl.c
			$(CC) -c $(CFLAGS) htonl.c

getnetent.$(O):		getnetent.c
			$(CC) -c $(CFLAGS) getnetent.c

in_lnaof.$(O):		in_lnaof.c
			$(CC) -c $(CFLAGS) in_lnaof.c

in_netof.$(O):		in_netof.c
			$(CC) -c $(CFLAGS) in_netof.c

ntohl.$(O):		ntohl.c
			$(CC) -c $(CFLAGS) ntohl.c

res_comp.$(O):		res_comp.c
			$(CC) -c $(CFLAGS) res_comp.c

ntohs.$(O):		ntohs.c
			$(CC) -c $(CFLAGS) ntohs.c

in_ntoa.$(O):		in_ntoa.c
			$(CC) -c $(CFLAGS) in_ntoa.c

in_network.$(O):	in_network.c
			$(CC) -c $(CFLAGS) in_network.c

htons.$(O):		htons.c
			$(CC) -c $(CFLAGS) htons.c

herror.$(O):		herror.c
			$(CC) -c $(CFLAGS) herror.c

getservent.$(O):	getservent.c
			$(CC) -c $(CFLAGS) getservent.c

getprtoent.$(O):	getprtoent.c
			$(CC) -c $(CFLAGS) getprtoent.c

_byteorder.$(O):	_byteorder.c
			$(CC) -c $(CFLAGS) _byteorder.c

# End of Makefile.
