1 # $NetBSD: Makefile,v 1.79 2013/08/21 08:30:50 matt 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 errno.c exit.c files.c \
27 getfile.c gets.c globals.c \
28 panic.c printf.c qsort.c snprintf.c sprintf.c strerror.c \
29 subr_prf.c twiddle.c vsprintf.c checkpasswd.c
31 .if
(${MACHINE_CPU} != "mips") && !defined
(__MINIX
)
36 .if
${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
37 SRCS
+= memcmp.c memcpy.c memmove.c memset.c strchr.c
40 SRCS
+= bcopy.c bzero.c
# Remove me eventually.
41 .
endif # !defined(__MINIX)
44 SRCS
+= closeall.c dev.c disklabel.c dkcksum.c ioctl.c nullfs.c stat.c fstat.c
45 SRCS
+= close.c lseek.c open.c read.c write.c
46 .if
(${SA_USE_CREAD} == "yes")
47 CPPFLAGS
+= -D__INTERNAL_LIBSA_CREAD
50 .if
(${SA_ENABLE_LS_OP} == "yes")
54 .if
(${SA_USE_LOADFILE} == "yes")
56 SRCS
+= loadfile.c loadfile_ecoff.c loadfile_elf32.c lookup_elf32.c \
57 loadfile_elf64.c lookup_elf64.c
58 .if
(${MACHINE_CPU} != "mips")
59 SRCS
+= loadfile_aout.c
62 SRCS
+= loadfile.c loadfile_elf32.c loadfile_elf64.c
63 .
endif # !defined(__MINIX)
66 .if
(${SA_INCLUDE_NET} == "yes")
68 SRCS
+= arp.c ether.c ether_sprintf.c ip_cksum.c net.c netif.c rpc.c udp.c ip.c
70 # network info services:
71 SRCS
+= bootp.c rarp.c bootparam.c
77 SRCS
+= ffsv1.c ffsv2.c
78 SRCS
+= lfsv1.c lfsv2.c
85 # for historic compatibility ufs == ffsv1
89 # NetBSD has it in libkern, MINIX lacks it
90 SRCS
+= xlat_mbr_fstype.c
91 .PATH.c
: ${NETBSDSRCDIR}/sys
/lib
/libkern
93 # NetBSD has it in libkern, MINIX has it in libc but not libminc...
95 .PATH.c
: ${NETBSDSRCDIR}/common
/lib
/libc
/md
96 .
endif # defined(__MINIX)
100 lib
${LIB}.o
:: ${OBJS}
101 @echo building standard
${LIB} library
103 @
${LD} -r
-o lib
${LIB}.o
`lorder ${OBJS} | tsort`
105 CPPFLAGS
+= -Wno-pointer-sign
107 .if defined
(HAVE_GCC
) && ${HAVE_GCC} >= 45 && ${MACHINE_ARCH} == "vax"