Home | History | Annotate | Line # | Download | only in libsa
Makefile revision 1.88.2.1
      1 #	$NetBSD: Makefile,v 1.88.2.1 2019/06/10 22:09:05 christos 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 # For testing
     18 #WARNS=6
     19 #NOSSP=yes
     20 #NOFORTIFY=yes
     21 #COPTS+=-ffreestanding -Wpointer-sign
     22 #CPPFLAGS+= -I${.CURDIR}/../../ -I${.CURDIR}
     23 
     24 .if defined(SA_EXTRADIR)
     25 .-include "${SA_EXTRADIR}/Makefile.inc"
     26 .endif
     27 
     28 .include <bsd.own.mk>
     29 
     30 .PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string
     31 
     32 # stand routines
     33 SRCS+=	alloc.c atoi.c errno.c exit.c files.c \
     34 	getfile.c gets.c globals.c \
     35 	panic.c printf.c qsort.c snprintf.c strerror.c \
     36 	subr_prf.c twiddle.c checkpasswd.c
     37 
     38 SRCS+=	bootcfg.c
     39 
     40 # string routines
     41 .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
     42 SRCS+=	memcmp.c memcpy.c memmove.c memset.c strchr.c
     43 .endif
     44 SRCS+=	bcopy.c bzero.c	# Remove me eventually.
     45 
     46 # io routines
     47 SRCS+=	closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
     48 SRCS+=	close.c lseek.c open.c read.c write.c
     49 .if (${SA_USE_CREAD} == "yes")
     50 CPPFLAGS+= -D__INTERNAL_LIBSA_CREAD
     51 SRCS+=	cread.c
     52 .endif
     53 .if (${SA_ENABLE_LS_OP} == "yes")
     54 SRCS+= ls.c
     55 .endif
     56 
     57 .if (${SA_USE_LOADFILE} == "yes")
     58 SRCS+=	loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
     59 	loadfile_elf64.c lookup_elf64.c
     60 .if (${MACHINE_CPU} != "mips")
     61 SRCS+=	loadfile_aout.c
     62 .endif
     63 .endif
     64 
     65 .if (${SA_INCLUDE_NET} == "yes")
     66 # network routines
     67 SRCS+=	arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c
     68 
     69 # network info services:
     70 SRCS+=	bootp.c rarp.c bootparam.c
     71 
     72 # boot filesystems
     73 SRCS+=	nfs.c tftp.c
     74 .endif
     75 
     76 SRCS+=	ffsv1.c ffsv2.c
     77 SRCS+=	lfsv1.c lfsv2.c
     78 SRCS+=	cd9660.c
     79 SRCS+=	ustarfs.c
     80 SRCS+=	dosfs.c
     81 SRCS+=	ext2fs.c
     82 SRCS+=	minixfs3.c
     83 SRCS+=	fnmatch.c
     84 # for historic compatibility ufs == ffsv1
     85 SRCS+=	ufs.c
     86 
     87 .include <bsd.lib.mk>
     88 
     89 lib${LIB}.o:: ${OBJS:O} __buildstdlib
     90 
     91 CPPFLAGS+=	-Wno-pointer-sign
     92 
     93 .if defined(HAVE_GCC) && ${MACHINE_ARCH} == "vax"
     94 COPTS.bootp.c+=	-O0
     95 .endif
     96