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