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