# Makefile for lib/ip.
#
# Note: The oneC_sum.c file is not used if there is an assembly equivalent.
# With 'include Make.$(ARCH)' a $(LIBCOBJARCH) list is included that may or
# may not mention $(LIBC)(oneC_sum.o) depending on the architecture.

include $(WORK)/Make.conf
CFLAGS	= -O9 -D_MINIX
CC1	= $(CC) -m$(ARCH) $(CFLAGS) -c

LIBC	= $(WORK)/libc.a
MAN	= /usr/man

default all install::	$(LIBC)

include Make.$(ARCH)

LIBCOBJ	= \
	$(LIBC)(dhcp_gettag.o) \
	$(LIBC)(dhcp_settag.o) \
	$(LIBC)(ether_line.o) \
	$(LIBC)(ethera2n.o) \
	$(LIBC)(ethere2a.o) \
	$(LIBC)(etherh2n.o) \
	$(LIBC)(ethern2h.o) \
	$(LIBC)(getdomainname.o) \
	$(LIBC)(gethostname.o) \
	$(LIBC)(gethostent.o) \
	$(LIBC)(hton.o) \
	$(LIBC)(ruserok.o) \
	$(LIBC)(servxcheck.o) \

$(LIBC):	$(LIBCOBJ) $(LIBCOBJARCH)
	$(CC) -c.a -o $@ *.o
	rm *.o

$(LIBC)(dhcp_gettag.o):	dhcp_gettag.c
	$(CC1) dhcp_gettag.c

$(LIBC)(dhcp_settag.o):	dhcp_settag.c
	$(CC1) dhcp_settag.c

$(LIBC)(ether_line.o):	ether_line.c
	$(CC1) ether_line.c

$(LIBC)(ethera2n.o):	ethera2n.c
	$(CC1) ethera2n.c

$(LIBC)(ethere2a.o):	ethere2a.c
	$(CC1) ethere2a.c

$(LIBC)(etherh2n.o):	etherh2n.c
	$(CC1) etherh2n.c

$(LIBC)(ethern2h.o):	ethern2h.c
	$(CC1) ethern2h.c

$(LIBC)(getdomainname.o):	getdomainname.c
	$(CC1) getdomainname.c

$(LIBC)(gethostname.o):	gethostname.c
	$(CC1) gethostname.c

$(LIBC)(gethostent.o):	gethostent.c
	$(CC1) gethostent.c

$(LIBC)(hton.o):	hton.c
	$(CC1) hton.c

$(LIBC)(oneC_sum.o):	oneC_sum.c
	$(CC1) oneC_sum.c

$(LIBC)(ruserok.o):	ruserok.c
	$(CC1) ruserok.c

$(LIBC)(servxcheck.o):	servxcheck.c
	$(CC1) servxcheck.c

install::	\
	$(MAN)/man3/hton.3 \
	$(MAN)/man3/oneC_sum.3 \
	$(MAN)/man3/servxcheck.3 \

$(MAN)/man3/hton.3:	hton.3
	install -lc $? $@

$(MAN)/man3/oneC_sum.3:	oneC_sum.3
	install -lc $? $@

$(MAN)/man3/servxcheck.3:	servxcheck.3
	install -lc $? $@

# $PchId: Makefile,v 1.6 2005/01/28 21:24:46 philip Exp $
