Makefile revision 1.71
11.71Smartin#	$NetBSD: Makefile,v 1.71 2010/02/10 21:54:47 martin Exp $
21.1Sbrezak
31.1SbrezakLIB=	sa
41.49StvNOPIC=	# defined
51.49StvNOPROFILE=# defined
61.1Sbrezak
71.44ShubertfSA_USE_CREAD?= no		# Read compressed kernels
81.44ShubertfSA_INCLUDE_NET?= yes		# Netboot via TFTP, NFS
91.50SthorpejSA_USE_LOADFILE?= no		# Generic executable loading support
101.7Spk
111.66Smlelstv#DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
121.32SdrochnerCPPFLAGS=	-I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \
131.16Scgd		-DCOMPAT_UFS ${DEBUGCPPFLAGS}
141.7Spk
151.21Slukem#COPTS+= -ansi -pedantic -Wall
161.32Sdrochner
171.68Stsutsui.if defined(SA_EXTRADIR)
181.68Stsutsui.-include "${SA_EXTRADIR}/Makefile.inc"
191.68Stsutsui.endif
201.68Stsutsui
211.69She.include <bsd.own.mk>
221.69She
231.64Schristos.PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string
241.2Sbrezak
251.2Sbrezak# stand routines
261.69SheSRCS+=	alloc.c errno.c exit.c files.c \
271.64Schristos	getfile.c gets.c globals.c \
281.64Schristos	panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
291.63Sdsl	subr_prf.c twiddle.c vsprintf.c checkpasswd.c
301.1Sbrezak
311.69She.if (${MACHINE_CPU} != "mips")
321.70SheSRCS+=	exec.c
331.69She.endif
341.69She
351.64Schristos# string routines
361.64SchristosSRCS+=	memcmp.c memcpy.c memmove.c memset.c strchr.c
371.65SchristosSRCS+=	bcopy.c bzero.c	# Remove me eventually.
381.64Schristos
391.1Sbrezak# io routines
401.15ScgdSRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
411.15ScgdSRCS+=	close.c lseek.c open.c read.c write.c
421.15Scgd.if (${SA_USE_CREAD} == "yes")
431.15ScgdCPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
441.15ScgdSRCS+=	cread.c
451.15Scgd.endif
461.2Sbrezak
471.31Schristos.if (${SA_USE_LOADFILE} == "yes")
481.71SmartinSRCS+=	loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
491.71Smartin	loadfile_elf64.c lookup_elf64.c
501.70She.if (${MACHINE_CPU} != "mips")
511.70SheSRCS+=	loadfile_aout.c
521.70She.endif
531.31Schristos.endif
541.54Sdsl
551.15Scgd.if (${SA_INCLUDE_NET} == "yes")
561.2Sbrezak# network routines
571.58SchristosSRCS+=	arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c
581.2Sbrezak
591.2Sbrezak# network info services:
601.7SpkSRCS+=	bootp.c rarp.c bootparam.c
611.1Sbrezak
621.2Sbrezak# boot filesystems
631.27SdrochnerSRCS+=	nfs.c tftp.c
641.27Sdrochner.endif
651.54Sdsl
661.61StsutsuiSRCS+=	ffsv1.c ffsv2.c ufs_ls.c
671.61StsutsuiSRCS+=	lfsv1.c lfsv2.c
681.60StsutsuiSRCS+=	cd9660.c
691.60StsutsuiSRCS+=	ustarfs.c
701.60StsutsuiSRCS+=	dosfs.c
711.60StsutsuiSRCS+=	ext2fs.c
721.62Stsutsui# for historic compatibility ufs == ffsv1
731.54SdslSRCS+=	ufs.c
741.19Scjs
751.19Scjs# only needed during build
761.19Scjslibinstall::
771.1Sbrezak
781.48Stv.undef DESTDIR
791.1Sbrezak.include <bsd.lib.mk>
801.15Scgd
811.15Scgdlib${LIB}.o:: ${OBJS}
821.15Scgd	@echo building standard ${LIB} library
831.15Scgd	@rm -f lib${LIB}.o
841.15Scgd	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
851.59Smrg
861.67Sgmcgarry.if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC)
871.59SmrgCPPFLAGS+=	-Wno-pointer-sign
881.59Smrg.endif
89