xref: /netbsd-src/sys/lib/libsa/Makefile (revision b5cd2489b2952ee409ede7b61183dba7ab0359ad)
1#	$NetBSD: Makefile,v 1.47 2001/10/31 17:20:50 thorpej Exp $
2
3LIB=	sa
4MKPIC=	no
5MKPROFILE=no
6
7SA_USE_CREAD?= no		# Read compressed kernels
8SA_INCLUDE_NET?= yes		# Netboot via TFTP, NFS
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 memcmp.c memcpy.c memmove.c memset.c panic.c printf.c \
22	snprintf.c sprintf.c strerror.c subr_prf.c twiddle.c vsprintf.c \
23	checkpasswd.c
24
25# io routines
26SRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
27SRCS+=	close.c lseek.c open.c read.c write.c
28.if (${SA_USE_CREAD} == "yes")
29CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
30SRCS+=	cread.c
31.endif
32
33.if (${SA_USE_LOADFILE} == "yes")
34SRCS+=	loadfile.c loadfile_aout.c loadfile_ecoff.c loadfile_elf32.c \
35	loadfile_elf64.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 udp.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 dosfs.c
48
49# only needed during build
50libinstall::
51
52.include <bsd.lib.mk>
53
54lib${LIB}.o:: ${OBJS}
55	@echo building standard ${LIB} library
56	@rm -f lib${LIB}.o
57	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
58