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