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