Makefile revision 1.77
11.77Schristos#	$NetBSD: Makefile,v 1.77 2012/01/16 18:44:13 christos 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.76StsutsuiSA_ENABLE_LS_OP?= no		# Filesystems ls operation
111.7Spk
121.66Smlelstv#DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
131.32SdrochnerCPPFLAGS=	-I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \
141.16Scgd		-DCOMPAT_UFS ${DEBUGCPPFLAGS}
151.7Spk
161.21Slukem#COPTS+= -ansi -pedantic -Wall
171.32Sdrochner
181.68Stsutsui.if defined(SA_EXTRADIR)
191.68Stsutsui.-include "${SA_EXTRADIR}/Makefile.inc"
201.68Stsutsui.endif
211.68Stsutsui
221.69She.include <bsd.own.mk>
231.69She
241.64Schristos.PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string
251.2Sbrezak
261.2Sbrezak# stand routines
271.69SheSRCS+=	alloc.c errno.c exit.c files.c \
281.64Schristos	getfile.c gets.c globals.c \
291.64Schristos	panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
301.63Sdsl	subr_prf.c twiddle.c vsprintf.c checkpasswd.c
311.1Sbrezak
321.69She.if (${MACHINE_CPU} != "mips")
331.70SheSRCS+=	exec.c
341.69She.endif
351.69She
361.64Schristos# string routines
371.73Sjoerg.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
381.64SchristosSRCS+=	memcmp.c memcpy.c memmove.c memset.c strchr.c
391.73Sjoerg.endif
401.65SchristosSRCS+=	bcopy.c bzero.c	# Remove me eventually.
411.64Schristos
421.1Sbrezak# io routines
431.15ScgdSRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
441.15ScgdSRCS+=	close.c lseek.c open.c read.c write.c
451.15Scgd.if (${SA_USE_CREAD} == "yes")
461.15ScgdCPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
471.15ScgdSRCS+=	cread.c
481.15Scgd.endif
491.76Stsutsui.if (${SA_ENABLE_LS_OP} == "yes")
501.76StsutsuiSRCS+= ls.c
511.76Stsutsui.endif
521.2Sbrezak
531.31Schristos.if (${SA_USE_LOADFILE} == "yes")
541.71SmartinSRCS+=	loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
551.71Smartin	loadfile_elf64.c lookup_elf64.c
561.70She.if (${MACHINE_CPU} != "mips")
571.70SheSRCS+=	loadfile_aout.c
581.70She.endif
591.31Schristos.endif
601.54Sdsl
611.15Scgd.if (${SA_INCLUDE_NET} == "yes")
621.2Sbrezak# network routines
631.72SzoltanSRCS+=	arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c
641.2Sbrezak
651.2Sbrezak# network info services:
661.7SpkSRCS+=	bootp.c rarp.c bootparam.c
671.1Sbrezak
681.2Sbrezak# boot filesystems
691.27SdrochnerSRCS+=	nfs.c tftp.c
701.27Sdrochner.endif
711.54Sdsl
721.76StsutsuiSRCS+=	ffsv1.c ffsv2.c
731.61StsutsuiSRCS+=	lfsv1.c lfsv2.c
741.60StsutsuiSRCS+=	cd9660.c
751.60StsutsuiSRCS+=	ustarfs.c
761.60StsutsuiSRCS+=	dosfs.c
771.60StsutsuiSRCS+=	ext2fs.c
781.77SchristosSRCS+=	minixfs3.c
791.77SchristosSRCS+=	fnmatch.c
801.62Stsutsui# for historic compatibility ufs == ffsv1
811.54SdslSRCS+=	ufs.c
821.19Scjs
831.19Scjs# only needed during build
841.19Scjslibinstall::
851.1Sbrezak
861.48Stv.undef DESTDIR
871.1Sbrezak.include <bsd.lib.mk>
881.15Scgd
891.15Scgdlib${LIB}.o:: ${OBJS}
901.15Scgd	@echo building standard ${LIB} library
911.15Scgd	@rm -f lib${LIB}.o
921.15Scgd	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
931.59Smrg
941.74Smrg.if defined(HAVE_GCC) || defined(HAVE_PCC)
951.59SmrgCPPFLAGS+=	-Wno-pointer-sign
961.59Smrg.endif
971.75Smrg
981.75Smrg.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && ${MACHINE_ARCH} == "vax"
991.75SmrgCOPTS.bootp.c+=	-O0
1001.75Smrg.endif
101