1 # $NetBSD: Makefile,v 1.68 2009/03/20 11:31:30 tsutsui 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 .PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string 22 23 # stand routines 24 SRCS+= alloc.c errno.c exit.c exec.c files.c \ 25 getfile.c gets.c globals.c \ 26 panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \ 27 subr_prf.c twiddle.c vsprintf.c checkpasswd.c 28 29 # string routines 30 SRCS+= memcmp.c memcpy.c memmove.c memset.c strchr.c 31 SRCS+= bcopy.c bzero.c # Remove me eventually. 32 33 # io routines 34 SRCS+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c 35 SRCS+= close.c lseek.c open.c read.c write.c 36 .if (${SA_USE_CREAD} == "yes") 37 CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD 38 SRCS+= cread.c 39 .endif 40 41 .if (${SA_USE_LOADFILE} == "yes") 42 SRCS+= loadfile.c loadfile_aout.c loadfile_ecoff.c loadfile_elf32.c \ 43 loadfile_elf64.c 44 .endif 45 46 .if (${SA_INCLUDE_NET} == "yes") 47 # network routines 48 SRCS+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c 49 50 # network info services: 51 SRCS+= bootp.c rarp.c bootparam.c 52 53 # boot filesystems 54 SRCS+= nfs.c tftp.c 55 .endif 56 57 SRCS+= ffsv1.c ffsv2.c ufs_ls.c 58 SRCS+= lfsv1.c lfsv2.c 59 SRCS+= cd9660.c 60 SRCS+= ustarfs.c 61 SRCS+= dosfs.c 62 SRCS+= ext2fs.c 63 # for historic compatibility ufs == ffsv1 64 SRCS+= ufs.c 65 66 # only needed during build 67 libinstall:: 68 69 .undef DESTDIR 70 .include <bsd.lib.mk> 71 72 lib${LIB}.o:: ${OBJS} 73 @echo building standard ${LIB} library 74 @rm -f lib${LIB}.o 75 @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` 76 77 .if (defined(HAVE_GCC) && ${HAVE_GCC} == 4) || defined(HAVE_PCC) 78 CPPFLAGS+= -Wno-pointer-sign 79 .endif 80