1 # $NetBSD: Makefile,v 1.89 2019/03/31 20:08:45 christos 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 # For testing 18 # WARNS=5 19 # COPTS+=-ffreestanding 20 # CPPFLAGS+= -I${.CURDIR}/../../ -I${.CURDIR} 21 22 .if defined(SA_EXTRADIR) 23 .-include "${SA_EXTRADIR}/Makefile.inc" 24 .endif 25 26 .include <bsd.own.mk> 27 28 .PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string 29 30 # stand routines 31 SRCS+= alloc.c atoi.c errno.c exit.c files.c \ 32 getfile.c gets.c globals.c \ 33 panic.c printf.c qsort.c snprintf.c strerror.c \ 34 subr_prf.c twiddle.c checkpasswd.c 35 36 SRCS+= bootcfg.c 37 38 # string routines 39 .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64" 40 SRCS+= memcmp.c memcpy.c memmove.c memset.c strchr.c 41 .endif 42 SRCS+= bcopy.c bzero.c # Remove me eventually. 43 44 # io routines 45 SRCS+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c 46 SRCS+= close.c lseek.c open.c read.c write.c 47 .if (${SA_USE_CREAD} == "yes") 48 CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD 49 SRCS+= cread.c 50 .endif 51 .if (${SA_ENABLE_LS_OP} == "yes") 52 SRCS+= ls.c 53 .endif 54 55 .if (${SA_USE_LOADFILE} == "yes") 56 SRCS+= loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \ 57 loadfile_elf64.c lookup_elf64.c 58 .if (${MACHINE_CPU} != "mips") 59 SRCS+= loadfile_aout.c 60 .endif 61 .endif 62 63 .if (${SA_INCLUDE_NET} == "yes") 64 # network routines 65 SRCS+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c 66 67 # network info services: 68 SRCS+= bootp.c rarp.c bootparam.c 69 70 # boot filesystems 71 SRCS+= nfs.c tftp.c 72 .endif 73 74 SRCS+= ffsv1.c ffsv2.c 75 SRCS+= lfsv1.c lfsv2.c 76 SRCS+= cd9660.c 77 SRCS+= ustarfs.c 78 SRCS+= dosfs.c 79 SRCS+= ext2fs.c 80 SRCS+= minixfs3.c 81 SRCS+= fnmatch.c 82 # for historic compatibility ufs == ffsv1 83 SRCS+= ufs.c 84 85 .include <bsd.lib.mk> 86 87 lib${LIB}.o:: ${OBJS:O} __buildstdlib 88 89 CPPFLAGS+= -Wno-pointer-sign 90 91 .if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax" 92 COPTS.bootp.c+= -O0 93 .endif 94