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