Makefile revision 1.79
1# $NetBSD: Makefile,v 1.79 2013/08/21 08:30:50 matt Exp $ 2 3LIB= sa 4LIBISPRIVATE?= yes 5 6SA_USE_CREAD?= no # Read compressed kernels 7SA_INCLUDE_NET?= yes # Netboot via TFTP, NFS 8SA_USE_LOADFILE?= no # Generic executable loading support 9SA_ENABLE_LS_OP?= no # Filesystems ls operation 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.include <bsd.own.mk> 22 23.PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string 24 25# stand routines 26SRCS+= alloc.c errno.c exit.c files.c \ 27 getfile.c gets.c globals.c \ 28 panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \ 29 subr_prf.c twiddle.c vsprintf.c checkpasswd.c 30 31.if (${MACHINE_CPU} != "mips") 32SRCS+= exec.c 33.endif 34 35# string routines 36.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64" 37SRCS+= memcmp.c memcpy.c memmove.c memset.c strchr.c 38.endif 39SRCS+= bcopy.c bzero.c # Remove me eventually. 40 41# io routines 42SRCS+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c 43SRCS+= close.c lseek.c open.c read.c write.c 44.if (${SA_USE_CREAD} == "yes") 45CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD 46SRCS+= cread.c 47.endif 48.if (${SA_ENABLE_LS_OP} == "yes") 49SRCS+= ls.c 50.endif 51 52.if (${SA_USE_LOADFILE} == "yes") 53SRCS+= loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \ 54 loadfile_elf64.c lookup_elf64.c 55.if (${MACHINE_CPU} != "mips") 56SRCS+= loadfile_aout.c 57.endif 58.endif 59 60.if (${SA_INCLUDE_NET} == "yes") 61# network routines 62SRCS+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c 63 64# network info services: 65SRCS+= bootp.c rarp.c bootparam.c 66 67# boot filesystems 68SRCS+= nfs.c tftp.c 69.endif 70 71SRCS+= ffsv1.c ffsv2.c 72SRCS+= lfsv1.c lfsv2.c 73SRCS+= cd9660.c 74SRCS+= ustarfs.c 75SRCS+= dosfs.c 76SRCS+= ext2fs.c 77SRCS+= minixfs3.c 78SRCS+= fnmatch.c 79# for historic compatibility ufs == ffsv1 80SRCS+= ufs.c 81 82.include <bsd.lib.mk> 83 84lib${LIB}.o:: ${OBJS} 85 @echo building standard ${LIB} library 86 @rm -f lib${LIB}.o 87 @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` 88 89CPPFLAGS+= -Wno-pointer-sign 90 91.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && ${MACHINE_ARCH} == "vax" 92COPTS.bootp.c+= -O0 93.endif 94