custom message type for VM_INFO
[minix3.git] / sys / lib / libsa / Makefile
blobe721c9b0283ff6d48481ecacfda23577625db987
1 # $NetBSD: Makefile,v 1.79 2013/08/21 08:30:50 matt Exp $
3 LIB= sa
4 LIBISPRIVATE?= yes
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"
19 .endif
21 .include <bsd.own.mk>
23 .PATH.c: ${SADIR} ${.PARSEDIR}/../../../common/lib/libc/string
25 # stand routines
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)
32 SRCS+= exec.c
33 .endif
35 # string routines
36 .if ${MACHINE_ARCH} != "i386" && ${MACHINE_ARCH} != "x86_64"
37 SRCS+= memcmp.c memcpy.c memmove.c memset.c strchr.c
38 .endif
39 .if !defined(__MINIX)
40 SRCS+= bcopy.c bzero.c # Remove me eventually.
41 .endif # !defined(__MINIX)
43 # io routines
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
48 SRCS+= cread.c
49 .endif
50 .if (${SA_ENABLE_LS_OP} == "yes")
51 SRCS+= ls.c
52 .endif
54 .if (${SA_USE_LOADFILE} == "yes")
55 .if !defined(__MINIX)
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
60 .endif
61 .else
62 SRCS+= loadfile.c loadfile_elf32.c loadfile_elf64.c
63 .endif # !defined(__MINIX)
64 .endif
66 .if (${SA_INCLUDE_NET} == "yes")
67 # network routines
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
73 # boot filesystems
74 SRCS+= nfs.c tftp.c
75 .endif
77 SRCS+= ffsv1.c ffsv2.c
78 SRCS+= lfsv1.c lfsv2.c
79 SRCS+= cd9660.c
80 SRCS+= ustarfs.c
81 SRCS+= dosfs.c
82 SRCS+= ext2fs.c
83 SRCS+= minixfs3.c
84 SRCS+= fnmatch.c
85 # for historic compatibility ufs == ffsv1
86 SRCS+= ufs.c
88 .if defined(__MINIX)
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...
94 SRCS+= md5c.c
95 .PATH.c: ${NETBSDSRCDIR}/common/lib/libc/md
96 .endif # defined(__MINIX)
98 .include <bsd.lib.mk>
100 lib${LIB}.o:: ${OBJS}
101 @echo building standard ${LIB} library
102 @rm -f lib${LIB}.o
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"
108 COPTS.bootp.c+= -O0
109 .endif