Makefile revision 1.40
1#	$NetBSD: Makefile,v 1.40 1999/11/12 13:13:59 lukem Exp $
2
3LIB=	sa
4MKPIC=	no
5MKPROFILE=no
6
7SA_USE_CREAD?= no
8SA_INCLUDE_NET?= yes
9SA_USE_LOADFILE?= no
10
11#DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
12CPPFLAGS=	-I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \
13		-DCOMPAT_UFS ${DEBUGCPPFLAGS}
14
15#COPTS+= -ansi -pedantic -Wall
16
17.PATH.c: ${SADIR}
18
19# stand routines
20SRCS+=	alloc.c bcmp.c bcopy.c bzero.c errno.c exit.c exec.c getfile.c gets.c \
21	globals.c htonl.c htons.c inet_addr.c intoa.c memcmp.c memcpy.c \
22	memset.c ntohs.c ntohl.c panic.c printf.c snprintf.c sprintf.c \
23	strlen.c strcmp.c strncmp.c strcpy.c strncpy.c strcat.c strerror.c \
24	subr_prf.c twiddle.c vsprintf.c checkpasswd.c
25
26# io routines
27SRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
28SRCS+=	close.c lseek.c open.c read.c write.c
29.if (${SA_USE_CREAD} == "yes")
30CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
31SRCS+=	cread.c
32.endif
33
34.if (${SA_USE_LOADFILE} == "yes")
35SRCS+=	loadfile.c
36.endif
37.if (${SA_INCLUDE_NET} == "yes")
38# network routines
39SRCS+=	arp.c ether.c in_cksum.c net.c netif.c rpc.c
40
41# network info services:
42SRCS+=	bootp.c rarp.c bootparam.c
43
44# boot filesystems
45SRCS+=	nfs.c tftp.c
46.endif
47SRCS+=	lfs.c ufs.c ufs_ls.c cd9660.c ustarfs.c
48
49# quad routines
50SRCS+=	ashrdi3.c
51
52# work-around for gcc annoyance
53SRCS+=	__main.c
54
55# only needed during build
56libinstall::
57
58.include <bsd.lib.mk>
59
60lib${LIB}.o:: ${OBJS}
61	@echo building standard ${LIB} library
62	@rm -f lib${LIB}.o
63	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
64