Home | History | Annotate | Line # | Download | only in libsa
Makefile revision 1.76
      1 #	$NetBSD: Makefile,v 1.76 2011/12/25 06:09:08 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 SA_ENABLE_LS_OP?= no		# Filesystems ls operation
     11 
     12 #DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID
     13 CPPFLAGS=	-I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \
     14 		-DCOMPAT_UFS ${DEBUGCPPFLAGS}
     15 
     16 #COPTS+= -ansi -pedantic -Wall
     17 
     18 .if defined(SA_EXTRADIR)
     19 .-include "${SA_EXTRADIR}/Makefile.inc"
     20 .endif
     21 
     22 .include <bsd.own.mk>
     23 
     24 .PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string
     25 
     26 # stand routines
     27 SRCS+=	alloc.c errno.c exit.c files.c \
     28 	getfile.c gets.c globals.c \
     29 	panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
     30 	subr_prf.c twiddle.c vsprintf.c checkpasswd.c
     31 
     32 .if (${MACHINE_CPU} != "mips")
     33 SRCS+=	exec.c
     34 .endif
     35 
     36 # string routines
     37 .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
     38 SRCS+=	memcmp.c memcpy.c memmove.c memset.c strchr.c
     39 .endif
     40 SRCS+=	bcopy.c bzero.c	# Remove me eventually.
     41 
     42 # io routines
     43 SRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
     44 SRCS+=	close.c lseek.c open.c read.c write.c
     45 .if (${SA_USE_CREAD} == "yes")
     46 CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
     47 SRCS+=	cread.c
     48 .endif
     49 .if (${SA_ENABLE_LS_OP} == "yes")
     50 SRCS+= ls.c
     51 .endif
     52 
     53 .if (${SA_USE_LOADFILE} == "yes")
     54 SRCS+=	loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
     55 	loadfile_elf64.c lookup_elf64.c
     56 .if (${MACHINE_CPU} != "mips")
     57 SRCS+=	loadfile_aout.c
     58 .endif
     59 .endif
     60 
     61 .if (${SA_INCLUDE_NET} == "yes")
     62 # network routines
     63 SRCS+=	arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c
     64 
     65 # network info services:
     66 SRCS+=	bootp.c rarp.c bootparam.c
     67 
     68 # boot filesystems
     69 SRCS+=	nfs.c tftp.c
     70 .endif
     71 
     72 SRCS+=	ffsv1.c ffsv2.c
     73 SRCS+=	lfsv1.c lfsv2.c
     74 SRCS+=	cd9660.c
     75 SRCS+=	ustarfs.c
     76 SRCS+=	dosfs.c
     77 SRCS+=	ext2fs.c
     78 # for historic compatibility ufs == ffsv1
     79 SRCS+=	ufs.c
     80 
     81 # only needed during build
     82 libinstall::
     83 
     84 .undef DESTDIR
     85 .include <bsd.lib.mk>
     86 
     87 lib${LIB}.o:: ${OBJS}
     88 	@echo building standard ${LIB} library
     89 	@rm -f lib${LIB}.o
     90 	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
     91 
     92 .if defined(HAVE_GCC) || defined(HAVE_PCC)
     93 CPPFLAGS+=	-Wno-pointer-sign
     94 .endif
     95 
     96 .if defined(HAVE_GCC) && ${HAVE_GCC} >= 45 && ${MACHINE_ARCH} == "vax"
     97 COPTS.bootp.c+=	-O0
     98 .endif
     99