1 1.76 tsutsui # $NetBSD: Makefile,v 1.76 2011/12/25 06:09:08 tsutsui Exp $ 2 1.1 brezak 3 1.1 brezak LIB= sa 4 1.49 tv NOPIC= # defined 5 1.49 tv NOPROFILE=# defined 6 1.1 brezak 7 1.44 hubertf SA_USE_CREAD?= no # Read compressed kernels 8 1.44 hubertf SA_INCLUDE_NET?= yes # Netboot via TFTP, NFS 9 1.50 thorpej SA_USE_LOADFILE?= no # Generic executable loading support 10 1.76 tsutsui SA_ENABLE_LS_OP?= no # Filesystems ls operation 11 1.7 pk 12 1.66 mlelstv #DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID 13 1.32 drochner CPPFLAGS= -I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \ 14 1.16 cgd -DCOMPAT_UFS ${DEBUGCPPFLAGS} 15 1.7 pk 16 1.21 lukem #COPTS+= -ansi -pedantic -Wall 17 1.32 drochner 18 1.68 tsutsui .if defined(SA_EXTRADIR) 19 1.68 tsutsui .-include "${SA_EXTRADIR}/Makefile.inc" 20 1.68 tsutsui .endif 21 1.68 tsutsui 22 1.69 he .include <bsd.own.mk> 23 1.69 he 24 1.64 christos .PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string 25 1.2 brezak 26 1.2 brezak # stand routines 27 1.69 he SRCS+= alloc.c errno.c exit.c files.c \ 28 1.64 christos getfile.c gets.c globals.c \ 29 1.64 christos panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \ 30 1.63 dsl subr_prf.c twiddle.c vsprintf.c checkpasswd.c 31 1.1 brezak 32 1.69 he .if (${MACHINE_CPU} != "mips") 33 1.70 he SRCS+= exec.c 34 1.69 he .endif 35 1.69 he 36 1.64 christos # string routines 37 1.73 joerg .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64" 38 1.64 christos SRCS+= memcmp.c memcpy.c memmove.c memset.c strchr.c 39 1.73 joerg .endif 40 1.65 christos SRCS+= bcopy.c bzero.c # Remove me eventually. 41 1.64 christos 42 1.1 brezak # io routines 43 1.15 cgd SRCS+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c 44 1.15 cgd SRCS+= close.c lseek.c open.c read.c write.c 45 1.15 cgd .if (${SA_USE_CREAD} == "yes") 46 1.15 cgd CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD 47 1.15 cgd SRCS+= cread.c 48 1.15 cgd .endif 49 1.76 tsutsui .if (${SA_ENABLE_LS_OP} == "yes") 50 1.76 tsutsui SRCS+= ls.c 51 1.76 tsutsui .endif 52 1.2 brezak 53 1.31 christos .if (${SA_USE_LOADFILE} == "yes") 54 1.71 martin SRCS+= loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \ 55 1.71 martin loadfile_elf64.c lookup_elf64.c 56 1.70 he .if (${MACHINE_CPU} != "mips") 57 1.70 he SRCS+= loadfile_aout.c 58 1.70 he .endif 59 1.31 christos .endif 60 1.54 dsl 61 1.15 cgd .if (${SA_INCLUDE_NET} == "yes") 62 1.2 brezak # network routines 63 1.72 zoltan SRCS+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c 64 1.2 brezak 65 1.2 brezak # network info services: 66 1.7 pk SRCS+= bootp.c rarp.c bootparam.c 67 1.1 brezak 68 1.2 brezak # boot filesystems 69 1.27 drochner SRCS+= nfs.c tftp.c 70 1.27 drochner .endif 71 1.54 dsl 72 1.76 tsutsui SRCS+= ffsv1.c ffsv2.c 73 1.61 tsutsui SRCS+= lfsv1.c lfsv2.c 74 1.60 tsutsui SRCS+= cd9660.c 75 1.60 tsutsui SRCS+= ustarfs.c 76 1.60 tsutsui SRCS+= dosfs.c 77 1.60 tsutsui SRCS+= ext2fs.c 78 1.62 tsutsui # for historic compatibility ufs == ffsv1 79 1.54 dsl SRCS+= ufs.c 80 1.19 cjs 81 1.19 cjs # only needed during build 82 1.19 cjs libinstall:: 83 1.1 brezak 84 1.48 tv .undef DESTDIR 85 1.1 brezak .include <bsd.lib.mk> 86 1.15 cgd 87 1.15 cgd lib${LIB}.o:: ${OBJS} 88 1.15 cgd @echo building standard ${LIB} library 89 1.15 cgd @rm -f lib${LIB}.o 90 1.15 cgd @${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort` 91 1.59 mrg 92 1.74 mrg .if defined(HAVE_GCC) || defined(HAVE_PCC) 93 1.59 mrg CPPFLAGS+= -Wno-pointer-sign 94 1.59 mrg .endif 95 1.75 mrg 96 1.75 mrg .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && ${MACHINE_ARCH} == "vax" 97 1.75 mrg COPTS.bootp.c+= -O0 98 1.75 mrg .endif 99