Home | History | Annotate | Line # | Download | only in libsa
Makefile revision 1.84
      1 #	$NetBSD: Makefile,v 1.84 2014/08/10 07:40:49 isaki 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 .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 atoi.c errno.c exit.c files.c \
     27 	getfile.c gets.c globals.c \
     28 	panic.c printf.c qsort.c snprintf.c strerror.c \
     29 	subr_prf.c twiddle.c checkpasswd.c
     30 
     31 SRCS+=	bootcfg.c
     32 
     33 # string routines
     34 .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
     35 SRCS+=	memcmp.c memcpy.c memmove.c memset.c strchr.c
     36 .endif
     37 SRCS+=	bcopy.c bzero.c	# Remove me eventually.
     38 
     39 # io routines
     40 SRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
     41 SRCS+=	close.c lseek.c open.c read.c write.c
     42 .if (${SA_USE_CREAD} == "yes")
     43 CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
     44 SRCS+=	cread.c
     45 .endif
     46 .if (${SA_ENABLE_LS_OP} == "yes")
     47 SRCS+= ls.c
     48 .endif
     49 
     50 .if (${SA_USE_LOADFILE} == "yes")
     51 SRCS+=	loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
     52 	loadfile_elf64.c lookup_elf64.c
     53 .if (${MACHINE_CPU} != "mips")
     54 SRCS+=	loadfile_aout.c
     55 .endif
     56 .endif
     57 
     58 .if (${SA_INCLUDE_NET} == "yes")
     59 # network routines
     60 SRCS+=	arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c
     61 
     62 # network info services:
     63 SRCS+=	bootp.c rarp.c bootparam.c
     64 
     65 # boot filesystems
     66 SRCS+=	nfs.c tftp.c
     67 .endif
     68 
     69 SRCS+=	ffsv1.c ffsv2.c
     70 SRCS+=	lfsv1.c lfsv2.c
     71 SRCS+=	cd9660.c
     72 SRCS+=	ustarfs.c
     73 SRCS+=	dosfs.c
     74 SRCS+=	ext2fs.c
     75 SRCS+=	minixfs3.c
     76 SRCS+=	fnmatch.c
     77 # for historic compatibility ufs == ffsv1
     78 SRCS+=	ufs.c
     79 
     80 .include <bsd.lib.mk>
     81 
     82 lib${LIB}.o:: ${OBJS}
     83 	@echo building standard ${LIB} library
     84 	@rm -f lib${LIB}.o
     85 	@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
     86 
     87 CPPFLAGS+=	-Wno-pointer-sign
     88 
     89 .if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
     90 COPTS.bootp.c+=	-O0
     91 .endif
     92