1 # $NetBSD: Makefile,v 1.86 2015/09/07 03:44:19 uebayasi Exp $
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
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}
15 #COPTS+= -ansi -pedantic -Wall
17 .if defined
(SA_EXTRADIR
)
18 .
-include "${SA_EXTRADIR}/Makefile.inc"
23 .PATH.c
: ${SADIR} ${.PARSEDIR
}/..
/..
/..
/common
/lib
/libc
/string
26 SRCS
+= alloc.c atoi.c errno.c exit.c files.c \
27 getfile.c gets.c globals.c \
28 panic.c printf.c qsort.c snprintf.c strerror.c \
29 subr_prf.c twiddle.c checkpasswd.c
34 .if
${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
35 SRCS
+= memcmp.c memcpy.c memmove.c memset.c strchr.c
38 SRCS
+= bcopy.c bzero.c
# Remove me eventually.
39 .
endif # !defined(__MINIX)
42 SRCS
+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
43 SRCS
+= close.c lseek.c open.c read.c write.c
44 .if
(${SA_USE_CREAD} == "yes")
45 CPPFLAGS
+= -D__INTERNAL_LIBSA_CREAD
48 .if
(${SA_ENABLE_LS_OP} == "yes")
52 .if
(${SA_USE_LOADFILE} == "yes")
54 SRCS
+= loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
55 loadfile_elf64.c lookup_elf64.c
56 .if
(${MACHINE_CPU} != "mips")
57 SRCS
+= loadfile_aout.c
60 SRCS
+= loadfile.c loadfile_elf32.c loadfile_elf64.c
61 .
endif # !defined(__MINIX)
64 .if
(${SA_INCLUDE_NET} == "yes")
66 SRCS
+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c
68 # network info services:
69 SRCS
+= bootp.c rarp.c bootparam.c
75 SRCS
+= ffsv1.c ffsv2.c
76 SRCS
+= lfsv1.c lfsv2.c
83 # for historic compatibility ufs == ffsv1
87 # NetBSD has it in libkern, MINIX lacks it
88 SRCS
+= xlat_mbr_fstype.c
89 .PATH.c
: ${NETBSDSRCDIR}/sys
/lib
/libkern
91 # NetBSD has it in libkern, MINIX has it in libc but not libminc...
93 .PATH.c
: ${NETBSDSRCDIR}/common
/lib
/libc
/md
94 .
endif # defined(__MINIX)
98 lib
${LIB}.o
:: ${OBJS
:O
}
99 @echo building standard
${LIB} library
101 @
${LD} -r
-o lib
${LIB}.o
`lorder ${OBJS} | tsort`
104 CPPFLAGS
+= -Wno-pointer-sign
106 .if defined
(HAVE_GCC
) && ${MACHINE_ARCH} == "vax"