Makefile revision 1.68
1#	$NetBSD: Makefile,v 1.68 2009/03/20 11:31:30 tsutsui 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 -DARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
12CPPFLAGS=	-I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \
13		-DCOMPAT_UFS ${DEBUGCPPFLAGS}
14
15#COPTS+= -ansi -pedantic -Wall
16
17.if defined(SA_EXTRADIR)
18.-include "${SA_EXTRADIR}/Makefile.inc"
19.endif
20
21.PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string
22
23# stand routines
24SRCS+=	alloc.c errno.c exit.c exec.c files.c \
25	getfile.c gets.c globals.c \
26	panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
27	subr_prf.c twiddle.c vsprintf.c checkpasswd.c
28
29# string routines
30SRCS+=	memcmp.c memcpy.c memmove.c memset.c strchr.c
31SRCS+=	bcopy.c bzero.c	# Remove me eventually.
32
33# io routines
34SRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
35SRCS+=	close.c lseek.c open.c read.c write.c
36.if (${SA_USE_CREAD} == "yes")
37CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
38SRCS+=	cread.c
39.endif
40
41.if (${SA_USE_LOADFILE} == "yes")
42SRCS+=	loadfile.c loadfile_aout.c loadfile_ecoff.c loadfile_elf32.c \
43	loadfile_elf64.c
44.endif
45
46.if (${SA_INCLUDE_NET} == "yes")
47# network routines
48SRCS+=	arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c
49
50# network info services:
51SRCS+=	bootp.c rarp.c bootparam.c
52
53# boot filesystems
54SRCS+=	nfs.c tftp.c
55.endif
56
57SRCS+=	ffsv1.c ffsv2.c ufs_ls.c
58SRCS+=	lfsv1.c lfsv2.c
59SRCS+=	cd9660.c
60SRCS+=	ustarfs.c
61SRCS+=	dosfs.c
62SRCS+=	ext2fs.c
63# for historic compatibility ufs == ffsv1
64SRCS+=	ufs.c
65
66# only needed during build
67libinstall::
68
69.undef DESTDIR
70.include <bsd.lib.mk>
71
72lib${LIB}.o:: ${OBJS}
73	@echo building standard ${LIB} library
74	@rm -f lib${LIB}.o
75	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
76
77.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
78CPPFLAGS+=	-Wno-pointer-sign
79.endif
80