Makefile revision 1.64
1#	$NetBSD: Makefile,v 1.64 2008/03/25 21:23:50 christos Exp $
2
3LIB=	sa
4NOPIC=	# defined
5NOPROFILE=# defined
6
7SA_USE_CREAD?= no		# Read compressed kernels
8SA_INCLUDE_NET?= yes		# Netboot via TFTP, NFS
9SA_USE_LOADFILE?= no		# Generic executable loading support
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} ${.PARSEDIR}/../../../common/lib/libc/string
18
19# stand routines
20SRCS+=	alloc.c errno.c exit.c exec.c files.c \
21	getfile.c gets.c globals.c \
22	panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
23	subr_prf.c twiddle.c vsprintf.c checkpasswd.c
24
25# string routines
26SRCS+=	memcmp.c memcpy.c memmove.c memset.c strchr.c
27
28# io routines
29SRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
30SRCS+=	close.c lseek.c open.c read.c write.c
31.if (${SA_USE_CREAD} == "yes")
32CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
33SRCS+=	cread.c
34.endif
35
36.if (${SA_USE_LOADFILE} == "yes")
37SRCS+=	loadfile.c loadfile_aout.c loadfile_ecoff.c loadfile_elf32.c \
38	loadfile_elf64.c
39.endif
40
41.if (${SA_INCLUDE_NET} == "yes")
42# network routines
43SRCS+=	arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c
44
45# network info services:
46SRCS+=	bootp.c rarp.c bootparam.c
47
48# boot filesystems
49SRCS+=	nfs.c tftp.c
50.endif
51
52SRCS+=	ffsv1.c ffsv2.c ufs_ls.c
53SRCS+=	lfsv1.c lfsv2.c
54SRCS+=	cd9660.c
55SRCS+=	ustarfs.c
56SRCS+=	dosfs.c
57SRCS+=	ext2fs.c
58# for historic compatibility ufs == ffsv1
59SRCS+=	ufs.c
60
61# only needed during build
62libinstall::
63
64.undef DESTDIR
65.include <bsd.lib.mk>
66
67lib${LIB}.o:: ${OBJS}
68	@echo building standard ${LIB} library
69	@rm -f lib${LIB}.o
70	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
71
72.if ${HAVE_GCC} == 4
73CPPFLAGS+=	-Wno-pointer-sign
74.endif
75