1*0d1e6041Srin# $NetBSD: Makefile,v 1.98 2024/06/29 08:00:06 rin Exp $ 236b52a82Sbrezak 336b52a82SbrezakLIB= sa 4f0f9ccc9SmattLIBISPRIVATE?= yes 5f7259cc3SchristosNOSSP=yes 6f7259cc3SchristosNOFORTIFY=yes 736b52a82Sbrezak 8267271c1ShubertfSA_USE_CREAD?= no # Read compressed kernels 9267271c1ShubertfSA_INCLUDE_NET?= yes # Netboot via TFTP, NFS 1015bffcdeSthorpejSA_USE_LOADFILE?= no # Generic executable loading support 11c2e8ce64StsutsuiSA_ENABLE_LS_OP?= no # Filesystems ls operation 12a1eeaadbSrinSA_ENABLE_BIENDIAN?= no # Biendian support 13a1eeaadbSrin # (currently only for loadfile_elf*) 140c92121bSpk 15a4002c76Smlelstv#DEBUGCPPFLAGS= -DBOOTP_DEBUG -DNETIF_DEBUG -DETHER_DEBUG -DNFS_DEBUG -DRPC_DEBUG -DRARP_DEBUG -DARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID 16192b3c73SdrochnerCPPFLAGS= -I${SADIR} ${SACPPFLAGS} ${SAMISCCPPFLAGS} \ 1772a6422aScgd -DCOMPAT_UFS ${DEBUGCPPFLAGS} 180c92121bSpk 193acbcabdSlukem#COPTS+= -ansi -pedantic -Wall 20e03842d0Sbrezak 2110497fd2Schristos# For testing 2294ad267eSchristos#WARNS=6 2394ad267eSchristos#COPTS+=-ffreestanding -Wpointer-sign 2410497fd2Schristos#CPPFLAGS+= -I${.CURDIR}/../../ -I${.CURDIR} 2510497fd2Schristos 269d279688Stsutsui.if defined(SA_EXTRADIR) 279d279688Stsutsui.-include "${SA_EXTRADIR}/Makefile.inc" 289d279688Stsutsui.endif 299d279688Stsutsui 30e408f743She.include <bsd.own.mk> 31e408f743She 32*0d1e6041Srin.PATH.c: ${SADIR} \ 33*0d1e6041Srin ${.PARSEDIR}/../../../common/lib/libc/stdlib \ 34*0d1e6041Srin ${.PARSEDIR}/../../../common/lib/libc/string 35192b3c73Sdrochner 36e03842d0Sbrezak# stand routines 377b2cf765SisakiSRCS+= alloc.c atoi.c errno.c exit.c files.c \ 38*0d1e6041Srin getfile.c getopt.c gets.c globals.c \ 3954ec44daSchristos panic.c printf.c qsort.c snprintf.c strerror.c \ 4054ec44daSchristos subr_prf.c twiddle.c checkpasswd.c 4136b52a82Sbrezak 42e9c95bf5SrtrSRCS+= bootcfg.c 43e9c95bf5Srtr 44e1b834bdSchristos# string routines 45df3149f5Sjoerg.if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64" 46e1b834bdSchristosSRCS+= memcmp.c memcpy.c memmove.c memset.c strchr.c 47df3149f5Sjoerg.endif 4819d181b7SchristosSRCS+= bcopy.c bzero.c # Remove me eventually. 49e1b834bdSchristos 5036b52a82Sbrezak# io routines 517de9d97fSmrgSRCS+= closeall.c dev.c disklabel.c ioctl.c nullfs.c stat.c fstat.c 522ce45596ScgdSRCS+= close.c lseek.c open.c read.c write.c 532ce45596Scgd.if (${SA_USE_CREAD} == "yes") 542ce45596ScgdCPPFLAGS+= -D__INTERNAL_LIBSA_CREAD 552ce45596ScgdSRCS+= cread.c 562ce45596Scgd.endif 57c2e8ce64Stsutsui.if (${SA_ENABLE_LS_OP} == "yes") 58c2e8ce64StsutsuiSRCS+= ls.c 59c2e8ce64Stsutsui.endif 6036b52a82Sbrezak 610fdd24ecSchristos.if (${SA_USE_LOADFILE} == "yes") 629b40c0f8SmartinSRCS+= loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \ 639b40c0f8Smartin loadfile_elf64.c lookup_elf64.c 6478569b98She.if (${MACHINE_CPU} != "mips") 6578569b98SheSRCS+= loadfile_aout.c 6678569b98She.endif 670fdd24ecSchristos.endif 684efa73a1Sdsl 692ce45596Scgd.if (${SA_INCLUDE_NET} == "yes") 70e03842d0Sbrezak# network routines 71b3cd019cSzoltanSRCS+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c 72e03842d0Sbrezak 73e03842d0Sbrezak# network info services: 740c92121bSpkSRCS+= bootp.c rarp.c bootparam.c 75e03842d0Sbrezak 76e03842d0Sbrezak# boot filesystems 770633616dSdrochnerSRCS+= nfs.c tftp.c 780633616dSdrochner.endif 794efa73a1Sdsl 80a1eeaadbSrin.if (${SA_ENABLE_BIENDIAN} == "yes") 81a1eeaadbSrinCPPFLAGS+= -DLIBSA_BIENDIAN_SUPPORT 82a1eeaadbSrinSRCS+= byteorder.c 83a1eeaadbSrin.endif 84a1eeaadbSrin 8513c62577SmrgSRCS+= ffsv1.c ffsv2.c ffs_bswap.c 862dc9b9cbStsutsuiSRCS+= lfsv1.c lfsv2.c 87d8fc6660StsutsuiSRCS+= cd9660.c 88d8fc6660StsutsuiSRCS+= ustarfs.c 89d8fc6660StsutsuiSRCS+= dosfs.c 90d8fc6660StsutsuiSRCS+= ext2fs.c 918ead40fdSchristosSRCS+= minixfs3.c 928ead40fdSchristosSRCS+= fnmatch.c 935d07958fStsutsui# for historic compatibility ufs == ffsv1 944efa73a1SdslSRCS+= ufs.c 9536b52a82Sbrezak 9636b52a82Sbrezak.include <bsd.lib.mk> 972ce45596Scgd 98de3955c3Schristoslib${LIB}.o:: ${OBJS:O} __buildstdlib 99abeaa4f6Smrg 100abeaa4f6SmrgCPPFLAGS+= -Wno-pointer-sign 101