Tue Dec 30 21:31:10 2008 UTC ()
Move list of rump-uses-kmod archs to bsd.own.mk for wider consumption.


(pooka)
diff -r1.552 -r1.553 src/share/mk/bsd.own.mk
diff -r1.19 -r1.20 src/sys/rump/Makefile.rump

cvs diff -r1.552 -r1.553 src/share/mk/bsd.own.mk (switch to unified diff)

--- src/share/mk/bsd.own.mk 2008/12/23 02:54:11 1.552
+++ src/share/mk/bsd.own.mk 2008/12/30 21:31:10 1.553
@@ -1,956 +1,964 @@ @@ -1,956 +1,964 @@
1# $NetBSD: bsd.own.mk,v 1.552 2008/12/23 02:54:11 agc Exp $ 1# $NetBSD: bsd.own.mk,v 1.553 2008/12/30 21:31:10 pooka Exp $
2 2
3.if !defined(_BSD_OWN_MK_) 3.if !defined(_BSD_OWN_MK_)
4_BSD_OWN_MK_=1 4_BSD_OWN_MK_=1
5 5
6MAKECONF?= /etc/mk.conf 6MAKECONF?= /etc/mk.conf
7.-include "${MAKECONF}" 7.-include "${MAKECONF}"
8 8
9# 9#
10# CPU model, derived from MACHINE_ARCH 10# CPU model, derived from MACHINE_ARCH
11# 11#
12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/} 12MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
13 13
14# 14#
15# Subdirectory used below ${RELEASEDIR} when building a release 15# Subdirectory used below ${RELEASEDIR} when building a release
16# 16#
17RELEASEMACHINEDIR?= ${MACHINE} 17RELEASEMACHINEDIR?= ${MACHINE}
18 18
19# 19#
20# Subdirectory or path component used for the following paths: 20# Subdirectory or path component used for the following paths:
21# distrib/${RELEASEMACHINE} 21# distrib/${RELEASEMACHINE}
22# distrib/notes/${RELEASEMACHINE} 22# distrib/notes/${RELEASEMACHINE}
23# etc/etc.${RELEASEMACHINE} 23# etc/etc.${RELEASEMACHINE}
24# Used when building a release. 24# Used when building a release.
25# 25#
26RELEASEMACHINE?= ${MACHINE} 26RELEASEMACHINE?= ${MACHINE}
27 27
28# 28#
29# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to 29# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
30# ensure that things defined by <bsd.own.mk> (default targets, 30# ensure that things defined by <bsd.own.mk> (default targets,
31# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk. 31# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
32# 32#
33NEED_OWN_INSTALL_TARGET?= yes 33NEED_OWN_INSTALL_TARGET?= yes
34 34
35# 35#
36# This lists the platforms which do not have working in-tree toolchains. 36# This lists the platforms which do not have working in-tree toolchains.
37# For the in-tree gcc 3.3.2 toolchain, this list is empty. 37# For the in-tree gcc 3.3.2 toolchain, this list is empty.
38# If some future port is not supported by the in-tree toolchain, this 38# If some future port is not supported by the in-tree toolchain, this
39# should be set to "yes" for that port only. 39# should be set to "yes" for that port only.
40# 40#
41TOOLCHAIN_MISSING?= no 41TOOLCHAIN_MISSING?= no
42 42
43# default to GCC4 43# default to GCC4
44.if !defined(HAVE_GCC) && !defined(HAVE_PCC) 44.if !defined(HAVE_GCC) && !defined(HAVE_PCC)
45HAVE_GCC= 4 45HAVE_GCC= 4
46.endif 46.endif
47 47
48# default to GDB6 48# default to GDB6
49HAVE_GDB?= 6 49HAVE_GDB?= 6
50 50
51CPPFLAG_ISYSTEM= -isystem 51CPPFLAG_ISYSTEM= -isystem
52.if defined(HAVE_GCC) 52.if defined(HAVE_GCC)
53.if ${HAVE_GCC} == 3 53.if ${HAVE_GCC} == 3
54CPPFLAG_ISYSTEMXX= -isystem-cxx 54CPPFLAG_ISYSTEMXX= -isystem-cxx
55.else # GCC 4 55.else # GCC 4
56CPPFLAG_ISYSTEMXX= -cxx-isystem 56CPPFLAG_ISYSTEMXX= -cxx-isystem
57.endif 57.endif
58.endif 58.endif
59 59
60.if empty(.MAKEFLAGS:M-V*) 60.if empty(.MAKEFLAGS:M-V*)
61.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR) 61.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
62PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx 62PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
63.else 63.else
64PRINTOBJDIR= ${MAKE} -V .OBJDIR 64PRINTOBJDIR= ${MAKE} -V .OBJDIR
65.endif 65.endif
66.else 66.else
67PRINTOBJDIR= echo # prevent infinite recursion 67PRINTOBJDIR= echo # prevent infinite recursion
68.endif 68.endif
69 69
70# 70#
71# Determine if running in the NetBSD source tree by checking for the 71# Determine if running in the NetBSD source tree by checking for the
72# existence of build.sh and tools/ in the current or a parent directory, 72# existence of build.sh and tools/ in the current or a parent directory,
73# and setting _SRC_TOP_ to the result. 73# and setting _SRC_TOP_ to the result.
74# 74#
75.if !defined(_SRC_TOP_) # { 75.if !defined(_SRC_TOP_) # {
76_SRC_TOP_!= cd ${.CURDIR}; while :; do \ 76_SRC_TOP_!= cd ${.CURDIR}; while :; do \
77 here=`pwd`; \ 77 here=`pwd`; \
78 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \ 78 [ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \
79 case $$here in /) echo ""; break;; esac; \ 79 case $$here in /) echo ""; break;; esac; \
80 cd ..; done 80 cd ..; done
81 81
82.MAKEOVERRIDES+= _SRC_TOP_ 82.MAKEOVERRIDES+= _SRC_TOP_
83 83
84.endif # } 84.endif # }
85 85
86# 86#
87# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set 87# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
88# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_. 88# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
89# 89#
90.if (${_SRC_TOP_} != "") # { 90.if (${_SRC_TOP_} != "") # {
91 91
92NETBSDSRCDIR?= ${_SRC_TOP_} 92NETBSDSRCDIR?= ${_SRC_TOP_}
93 93
94.if !defined(_SRC_TOP_OBJ_) 94.if !defined(_SRC_TOP_OBJ_)
95_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR} 95_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR}
96.MAKEOVERRIDES+= _SRC_TOP_OBJ_ 96.MAKEOVERRIDES+= _SRC_TOP_OBJ_
97.endif 97.endif
98 98
99.endif # _SRC_TOP_ != "" # } 99.endif # _SRC_TOP_ != "" # }
100 100
101 101
102.if (${_SRC_TOP_} != "") && \ 102.if (${_SRC_TOP_} != "") && \
103 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) 103 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
104USETOOLS?= yes 104USETOOLS?= yes
105.endif 105.endif
106USETOOLS?= no 106USETOOLS?= no
107 107
108 108
109.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \ 109.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
110 ${MACHINE_ARCH} == "sh3" 110 ${MACHINE_ARCH} == "sh3"
111.BEGIN: 111.BEGIN:
112 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el" 112 @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
113 @false 113 @false
114.elif defined(REQUIRETOOLS) && \ 114.elif defined(REQUIRETOOLS) && \
115 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \ 115 (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
116 ${USETOOLS} == "no" 116 ${USETOOLS} == "no"
117.BEGIN: 117.BEGIN:
118 @echo "USETOOLS=no, but this component requires a version-specific host toolchain" 118 @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
119 @false 119 @false
120.endif 120.endif
121 121
122# 122#
123# Host platform information; may be overridden 123# Host platform information; may be overridden
124# 124#
125.if !defined(HOST_OSTYPE) 125.if !defined(HOST_OSTYPE)
126_HOST_OSNAME!= uname -s 126_HOST_OSNAME!= uname -s
127_HOST_OSREL!= uname -r 127_HOST_OSREL!= uname -r
128_HOST_ARCH!= uname -p 2>/dev/null || uname -m 128_HOST_ARCH!= uname -p 2>/dev/null || uname -m
129HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g} 129HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g}
130.MAKEOVERRIDES+= HOST_OSTYPE 130.MAKEOVERRIDES+= HOST_OSTYPE
131.endif 131.endif
132 132
133.if ${USETOOLS} == "yes" # { 133.if ${USETOOLS} == "yes" # {
134 134
135# 135#
136# Provide a default for TOOLDIR. 136# Provide a default for TOOLDIR.
137# 137#
138.if !defined(TOOLDIR) 138.if !defined(TOOLDIR)
139TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE} 139TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
140.MAKEOVERRIDES+= TOOLDIR 140.MAKEOVERRIDES+= TOOLDIR
141.endif 141.endif
142 142
143# 143#
144# This is the prefix used for the NetBSD-sourced tools. 144# This is the prefix used for the NetBSD-sourced tools.
145# 145#
146_TOOL_PREFIX?= nb 146_TOOL_PREFIX?= nb
147 147
148# 148#
149# If an external toolchain base is specified, use it. 149# If an external toolchain base is specified, use it.
150# 150#
151.if defined(EXTERNAL_TOOLCHAIN) # { 151.if defined(EXTERNAL_TOOLCHAIN) # {
152AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar 152AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
153AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as 153AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
154LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld 154LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
155NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm 155NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
156OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy 156OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
157OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump 157OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
158RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib 158RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
159SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size 159SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
160STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip 160STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
161 161
162CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 162CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
163CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp 163CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
164CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++ 164CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
165FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77 165FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
166OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc 166OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
167.else # } { 167.else # } {
168# Define default locations for common tools. 168# Define default locations for common tools.
169.if ${USETOOLS_BINUTILS:Uyes} == "yes" # { 169.if ${USETOOLS_BINUTILS:Uyes} == "yes" # {
170AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar 170AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
171AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as 171AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
172LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld 172LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
173NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm 173NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
174OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy 174OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
175OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump 175OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
176RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib 176RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
177SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size 177SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
178STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip 178STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
179.endif # } 179.endif # }
180 180
181.if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # { 181.if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # {
182CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 182CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
183CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp 183CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
184CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++ 184CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
185FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77 185FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
186OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc 186OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
187.endif # } 187.endif # }
188 188
189.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes" 189.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes"
190CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc 190CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
191CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp 191CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
192CXX= false 192CXX= false
193FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77 193FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
194OBJC= false 194OBJC= false
195.endif 195.endif
196 196
197.endif # EXTERNAL_TOOLCHAIN # } 197.endif # EXTERNAL_TOOLCHAIN # }
198 198
199HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep 199HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
200 200
201DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym 201DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
202ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 202ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
203INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install 203INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
204LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex 204LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
205LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint 205LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
206LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder 206LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
207MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep 207MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
208PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl 208PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
209TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q 209TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
210YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc 210YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
211 211
212TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb 212TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
213TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb 213TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
214TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt 214TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
215TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile 215TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
216TOOL_ATF_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile 216TOOL_ATF_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile
217TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk 217TOOL_AWK= ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
218TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb 218TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
219TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat 219TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
220TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum 220TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
221TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et 221TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
222TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config 222TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
223TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen 223TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
224TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags 224TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
225TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db 225TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
226TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE} 226TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE}
227TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn 227TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
228TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk 228TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
229TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen 229TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
230TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym 230TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
231TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat 231TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
232TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake 232TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
233TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff 233TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
234TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump 234TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
235TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot 235TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
236TOOL_HP700MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot 236TOOL_HP700MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot
237TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib 237TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
238TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot 238TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
239TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info 239TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
240TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join 240TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
241TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4 241TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
242TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff 242TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
243TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs 243TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
244TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo 244TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
245TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis 245TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
246TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage 246TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
247TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc 247TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
248TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff 248TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
249TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper 249TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
250TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb 250TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
251TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale 251TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
252TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file 252TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
253TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp 253TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
254TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc 254TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
255TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree 255TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
256TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax 256TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
257TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic 257TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
258TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage 258TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
259TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb 259TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
260TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer 260TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
261TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff 261TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
262TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 262TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
263TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 263TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
264TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 264TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
265TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 265TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
266TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen 266TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
267TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed 267TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
268TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim 268TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
269TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc 269TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
270TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat 270TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
271TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile 271TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
272TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel 272TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
273TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl 273TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
274TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode 274TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
275TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f 275TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
276TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic 276TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
277 277
278.else # USETOOLS != yes # } { 278.else # USETOOLS != yes # } {
279 279
280TOOL_AMIGAAOUT2BB= amiga-aout2bb 280TOOL_AMIGAAOUT2BB= amiga-aout2bb
281TOOL_AMIGAELF2BB= amiga-elf2bb 281TOOL_AMIGAELF2BB= amiga-elf2bb
282TOOL_AMIGATXLT= amiga-txlt 282TOOL_AMIGATXLT= amiga-txlt
283TOOL_ASN1_COMPILE= asn1_compile 283TOOL_ASN1_COMPILE= asn1_compile
284TOOL_ATF_COMPILE= atf-compile 284TOOL_ATF_COMPILE= atf-compile
285TOOL_AWK= awk 285TOOL_AWK= awk
286TOOL_CAP_MKDB= cap_mkdb 286TOOL_CAP_MKDB= cap_mkdb
287TOOL_CAT= cat 287TOOL_CAT= cat
288TOOL_CKSUM= cksum 288TOOL_CKSUM= cksum
289TOOL_COMPILE_ET= compile_et 289TOOL_COMPILE_ET= compile_et
290TOOL_CONFIG= config 290TOOL_CONFIG= config
291TOOL_CRUNCHGEN= crunchgen 291TOOL_CRUNCHGEN= crunchgen
292TOOL_CTAGS= ctags 292TOOL_CTAGS= ctags
293TOOL_DB= db 293TOOL_DB= db
294TOOL_DISKLABEL= disklabel 294TOOL_DISKLABEL= disklabel
295TOOL_EQN= eqn 295TOOL_EQN= eqn
296TOOL_FDISK= fdisk 296TOOL_FDISK= fdisk
297TOOL_FGEN= fgen 297TOOL_FGEN= fgen
298TOOL_GENASSYM= genassym 298TOOL_GENASSYM= genassym
299TOOL_GENCAT= gencat 299TOOL_GENCAT= gencat
300TOOL_GMAKE= gmake 300TOOL_GMAKE= gmake
301TOOL_GROFF= groff 301TOOL_GROFF= groff
302TOOL_HEXDUMP= hexdump 302TOOL_HEXDUMP= hexdump
303TOOL_HP300MKBOOT= hp300-mkboot 303TOOL_HP300MKBOOT= hp300-mkboot
304TOOL_HP700MKBOOT= hp700-mkboot 304TOOL_HP700MKBOOT= hp700-mkboot
305TOOL_INDXBIB= indxbib 305TOOL_INDXBIB= indxbib
306TOOL_INSTALLBOOT= installboot 306TOOL_INSTALLBOOT= installboot
307TOOL_INSTALL_INFO= install-info 307TOOL_INSTALL_INFO= install-info
308TOOL_JOIN= join 308TOOL_JOIN= join
309TOOL_M4= m4 309TOOL_M4= m4
310TOOL_MACPPCFIXCOFF= macppc-fixcoff 310TOOL_MACPPCFIXCOFF= macppc-fixcoff
311TOOL_MAKEFS= makefs 311TOOL_MAKEFS= makefs
312TOOL_MAKEINFO= makeinfo 312TOOL_MAKEINFO= makeinfo
313TOOL_MAKEWHATIS= /usr/libexec/makewhatis 313TOOL_MAKEWHATIS= /usr/libexec/makewhatis
314TOOL_MDSETIMAGE= mdsetimage 314TOOL_MDSETIMAGE= mdsetimage
315TOOL_MENUC= menuc 315TOOL_MENUC= menuc
316TOOL_MIPSELF2ECOFF= mips-elf2ecoff 316TOOL_MIPSELF2ECOFF= mips-elf2ecoff
317TOOL_MKCSMAPPER= mkcsmapper 317TOOL_MKCSMAPPER= mkcsmapper
318TOOL_MKESDB= mkesdb 318TOOL_MKESDB= mkesdb
319TOOL_MKLOCALE= mklocale 319TOOL_MKLOCALE= mklocale
320TOOL_MKMAGIC= file 320TOOL_MKMAGIC= file
321TOOL_MKTEMP= mktemp 321TOOL_MKTEMP= mktemp
322TOOL_MSGC= msgc 322TOOL_MSGC= msgc
323TOOL_MTREE= mtree 323TOOL_MTREE= mtree
324TOOL_PAX= pax 324TOOL_PAX= pax
325TOOL_PIC= pic 325TOOL_PIC= pic
326TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage 326TOOL_POWERPCMKBOOTIMAGE= powerpc-mkbootimage
327TOOL_PWD_MKDB= pwd_mkdb 327TOOL_PWD_MKDB= pwd_mkdb
328TOOL_REFER= refer 328TOOL_REFER= refer
329TOOL_ROFF_ASCII= nroff 329TOOL_ROFF_ASCII= nroff
330TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi 330TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
331TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html 331TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
332TOOL_ROFF_PS= ${TOOL_GROFF} -Tps 332TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
333TOOL_ROFF_RAW= ${TOOL_GROFF} -Z 333TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
334TOOL_RPCGEN= rpcgen 334TOOL_RPCGEN= rpcgen
335TOOL_SED= sed 335TOOL_SED= sed
336TOOL_SOELIM= soelim 336TOOL_SOELIM= soelim
337TOOL_SPARKCRC= sparkcrc 337TOOL_SPARKCRC= sparkcrc
338TOOL_STAT= stat 338TOOL_STAT= stat
339TOOL_STRFILE= strfile 339TOOL_STRFILE= strfile
340TOOL_SUNLABEL= sunlabel 340TOOL_SUNLABEL= sunlabel
341TOOL_TBL= tbl 341TOOL_TBL= tbl
342TOOL_UUDECODE= uudecode 342TOOL_UUDECODE= uudecode
343TOOL_VGRIND= vgrind -f 343TOOL_VGRIND= vgrind -f
344TOOL_ZIC= zic 344TOOL_ZIC= zic
345 345
346.endif # USETOOLS != yes # } 346.endif # USETOOLS != yes # }
347 347
348# 348#
349# Targets to check if DESTDIR or RELEASEDIR is provided 349# Targets to check if DESTDIR or RELEASEDIR is provided
350# 350#
351.if !target(check_DESTDIR) 351.if !target(check_DESTDIR)
352check_DESTDIR: .PHONY .NOTMAIN 352check_DESTDIR: .PHONY .NOTMAIN
353.if !defined(DESTDIR) 353.if !defined(DESTDIR)
354 @echo "setenv DESTDIR before doing that!" 354 @echo "setenv DESTDIR before doing that!"
355 @false 355 @false
356.else 356.else
357 @true 357 @true
358.endif 358.endif
359.endif 359.endif
360 360
361.if !target(check_RELEASEDIR) 361.if !target(check_RELEASEDIR)
362check_RELEASEDIR: .PHONY .NOTMAIN 362check_RELEASEDIR: .PHONY .NOTMAIN
363.if !defined(RELEASEDIR) 363.if !defined(RELEASEDIR)
364 @echo "setenv RELEASEDIR before doing that!" 364 @echo "setenv RELEASEDIR before doing that!"
365 @false 365 @false
366.else 366.else
367 @true 367 @true
368.endif 368.endif
369.endif 369.endif
370 370
371 371
372.if ${USETOOLS} == "yes" # { 372.if ${USETOOLS} == "yes" # {
373# 373#
374# Make sure DESTDIR is set, so that builds with these tools always 374# Make sure DESTDIR is set, so that builds with these tools always
375# get appropriate -nostdinc, -nostdlib, etc. handling. The default is 375# get appropriate -nostdinc, -nostdlib, etc. handling. The default is
376# <empty string>, meaning start from /, the root directory. 376# <empty string>, meaning start from /, the root directory.
377# 377#
378DESTDIR?= 378DESTDIR?=
379.endif # } 379.endif # }
380 380
381# 381#
382# Build a dynamically linked /bin and /sbin, with the necessary shared 382# Build a dynamically linked /bin and /sbin, with the necessary shared
383# libraries moved from /usr/lib to /lib and the shared linker moved 383# libraries moved from /usr/lib to /lib and the shared linker moved
384# from /usr/libexec to /lib 384# from /usr/libexec to /lib
385# 385#
386# Note that if the BINDIR is not /bin or /sbin, then we always use the 386# Note that if the BINDIR is not /bin or /sbin, then we always use the
387# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin 387# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
388# and /sbin). See <bsd.shlib.mk>. 388# and /sbin). See <bsd.shlib.mk>.
389# 389#
390MKDYNAMICROOT?= yes 390MKDYNAMICROOT?= yes
391 391
392# 392#
393# Where the system object and source trees are kept; can be configurable 393# Where the system object and source trees are kept; can be configurable
394# by the user in case they want them in ~/foosrc and ~/fooobj (for example). 394# by the user in case they want them in ~/foosrc and ~/fooobj (for example).
395# 395#
396BSDSRCDIR?= /usr/src 396BSDSRCDIR?= /usr/src
397BSDOBJDIR?= /usr/obj 397BSDOBJDIR?= /usr/obj
398NETBSDSRCDIR?= ${BSDSRCDIR} 398NETBSDSRCDIR?= ${BSDSRCDIR}
399 399
400BINGRP?= wheel 400BINGRP?= wheel
401BINOWN?= root 401BINOWN?= root
402BINMODE?= 555 402BINMODE?= 555
403NONBINMODE?= 444 403NONBINMODE?= 444
404 404
405MANDIR?= /usr/share/man 405MANDIR?= /usr/share/man
406MANGRP?= wheel 406MANGRP?= wheel
407MANOWN?= root 407MANOWN?= root
408MANMODE?= ${NONBINMODE} 408MANMODE?= ${NONBINMODE}
409MANINSTALL?= catinstall htmlinstall maninstall 409MANINSTALL?= catinstall htmlinstall maninstall
410 410
411INFODIR?= /usr/share/info 411INFODIR?= /usr/share/info
412INFOGRP?= wheel 412INFOGRP?= wheel
413INFOOWN?= root 413INFOOWN?= root
414INFOMODE?= ${NONBINMODE} 414INFOMODE?= ${NONBINMODE}
415 415
416LIBDIR?= /usr/lib 416LIBDIR?= /usr/lib
417 417
418LINTLIBDIR?= /usr/libdata/lint 418LINTLIBDIR?= /usr/libdata/lint
419LIBGRP?= ${BINGRP} 419LIBGRP?= ${BINGRP}
420LIBOWN?= ${BINOWN} 420LIBOWN?= ${BINOWN}
421LIBMODE?= ${NONBINMODE} 421LIBMODE?= ${NONBINMODE}
422 422
423DOCDIR?= /usr/share/doc 423DOCDIR?= /usr/share/doc
424HTMLDOCDIR?= /usr/share/doc/html 424HTMLDOCDIR?= /usr/share/doc/html
425DOCGRP?= wheel 425DOCGRP?= wheel
426DOCOWN?= root 426DOCOWN?= root
427DOCMODE?= ${NONBINMODE} 427DOCMODE?= ${NONBINMODE}
428 428
429NLSDIR?= /usr/share/nls 429NLSDIR?= /usr/share/nls
430NLSGRP?= wheel 430NLSGRP?= wheel
431NLSOWN?= root 431NLSOWN?= root
432NLSMODE?= ${NONBINMODE} 432NLSMODE?= ${NONBINMODE}
433 433
434KMODULEGRP?= wheel 434KMODULEGRP?= wheel
435KMODULEOWN?= root 435KMODULEOWN?= root
436KMODULEMODE?= ${NONBINMODE} 436KMODULEMODE?= ${NONBINMODE}
437 437
438LOCALEDIR?= /usr/share/locale 438LOCALEDIR?= /usr/share/locale
439LOCALEGRP?= wheel 439LOCALEGRP?= wheel
440LOCALEOWN?= root 440LOCALEOWN?= root
441LOCALEMODE?= ${NONBINMODE} 441LOCALEMODE?= ${NONBINMODE}
442 442
443FIRMWAREDIR?= /libdata/firmware 443FIRMWAREDIR?= /libdata/firmware
444FIRMWAREGRP?= wheel 444FIRMWAREGRP?= wheel
445FIRMWAREOWN?= root 445FIRMWAREOWN?= root
446FIRMWAREMODE?= ${NONBINMODE} 446FIRMWAREMODE?= ${NONBINMODE}
447 447
448DEBUGDIR?= /usr/libdata/debug 448DEBUGDIR?= /usr/libdata/debug
449DEBUGGRP?= wheel 449DEBUGGRP?= wheel
450DEBUGOWN?= root 450DEBUGOWN?= root
451DEBUGMODE?= ${NONBINMODE} 451DEBUGMODE?= ${NONBINMODE}
452 452
453# 453#
454# Data-driven table using make variables to control how 454# Data-driven table using make variables to control how
455# toolchain-dependent targets and shared libraries are built 455# toolchain-dependent targets and shared libraries are built
456# for different platforms and object formats. 456# for different platforms and object formats.
457# 457#
458# OBJECT_FMT: currently either "ELF" or "a.out". 458# OBJECT_FMT: currently either "ELF" or "a.out".
459# 459#
460# All platforms are ELF. 460# All platforms are ELF.
461# 461#
462OBJECT_FMT= ELF 462OBJECT_FMT= ELF
463 463
464# 464#
465# If this platform's toolchain is missing, we obviously cannot build it. 465# If this platform's toolchain is missing, we obviously cannot build it.
466# 466#
467.if ${TOOLCHAIN_MISSING} != "no" 467.if ${TOOLCHAIN_MISSING} != "no"
468MKBFD:= no 468MKBFD:= no
469MKGDB:= no 469MKGDB:= no
470MKGCC:= no 470MKGCC:= no
471.endif 471.endif
472 472
473# 473#
474# If we are using an external toolchain, we can still build the target's 474# If we are using an external toolchain, we can still build the target's
475# BFD stuff, but we cannot build GCC's support libraries, since those are 475# BFD stuff, but we cannot build GCC's support libraries, since those are
476# tightly-coupled to the version of GCC being used. 476# tightly-coupled to the version of GCC being used.
477# 477#
478.if defined(EXTERNAL_TOOLCHAIN) 478.if defined(EXTERNAL_TOOLCHAIN)
479MKGCC:= no 479MKGCC:= no
480.endif 480.endif
481 481
482# 482#
483# The m68000 port is incomplete. 483# The m68000 port is incomplete.
484# 484#
485.if ${MACHINE_ARCH} == "m68000" 485.if ${MACHINE_ARCH} == "m68000"
486NOPIC= # defined 486NOPIC= # defined
487MKISCSI= no 487MKISCSI= no
488# XXX GCC 4 outputs mcount() calling sequences that try to load values 488# XXX GCC 4 outputs mcount() calling sequences that try to load values
489# from over 64KB away and this fails to assemble. 489# from over 64KB away and this fails to assemble.
490.if defined(HAVE_GCC) && (${HAVE_GCC} == 4) 490.if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
491NOPROFILE= # defined 491NOPROFILE= # defined
492.endif 492.endif
493.endif 493.endif
494 494
495# 495#
496# The ia64 port is incomplete. 496# The ia64 port is incomplete.
497# 497#
498.if ${MACHINE_ARCH} == "ia64" 498.if ${MACHINE_ARCH} == "ia64"
499MKLINT= no 499MKLINT= no
500MKGDB= no 500MKGDB= no
501.endif 501.endif
502 502
503# 503#
504# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC), 504# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
505# not just shared libraries, so don't build the _pic version. 505# not just shared libraries, so don't build the _pic version.
506# 506#
507.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" 507.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
508MKPICLIB:= no 508MKPICLIB:= no
509.endif 509.endif
510 510
511# 511#
512# On VAX using ELF, all objects are PIC, not just shared libraries, 512# On VAX using ELF, all objects are PIC, not just shared libraries,
513# so don't build the _pic version. Unless we are using GCC3 which 513# so don't build the _pic version. Unless we are using GCC3 which
514# doesn't support PIC yet. 514# doesn't support PIC yet.
515# 515#
516.if ${MACHINE_ARCH} == "vax" 516.if ${MACHINE_ARCH} == "vax"
517MKPICLIB= no 517MKPICLIB= no
518.endif 518.endif
519 519
520# 520#
521# Location of the file that contains the major and minor numbers of the 521# Location of the file that contains the major and minor numbers of the
522# version of a shared library. If this file exists a shared library 522# version of a shared library. If this file exists a shared library
523# will be built by <bsd.lib.mk>. 523# will be built by <bsd.lib.mk>.
524# 524#
525SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version 525SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
526 526
527# 527#
528# GNU sources and packages sometimes see architecture names differently. 528# GNU sources and packages sometimes see architecture names differently.
529# 529#
530GNU_ARCH.coldfire=m68k 530GNU_ARCH.coldfire=m68k
531GNU_ARCH.m68000=m68010 531GNU_ARCH.m68000=m68010
532GNU_ARCH.sh3eb=sh 532GNU_ARCH.sh3eb=sh
533GNU_ARCH.sh3el=shle 533GNU_ARCH.sh3el=shle
534GNU_ARCH.mips64eb=mips64 534GNU_ARCH.mips64eb=mips64
535MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}} 535MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
536 536
537# 537#
538# In order to identify NetBSD to GNU packages, we sometimes need 538# In order to identify NetBSD to GNU packages, we sometimes need
539# an "elf" tag for historically a.out platforms. 539# an "elf" tag for historically a.out platforms.
540# 540#
541.if ${OBJECT_FMT} == "ELF" && \ 541.if ${OBJECT_FMT} == "ELF" && \
542 (${MACHINE_GNU_ARCH} == "arm" || \ 542 (${MACHINE_GNU_ARCH} == "arm" || \
543 ${MACHINE_GNU_ARCH} == "armeb" || \ 543 ${MACHINE_GNU_ARCH} == "armeb" || \
544 ${MACHINE_ARCH} == "i386" || \ 544 ${MACHINE_ARCH} == "i386" || \
545 ${MACHINE_CPU} == "m68k" || \ 545 ${MACHINE_CPU} == "m68k" || \
546 ${MACHINE_GNU_ARCH} == "sh" || \ 546 ${MACHINE_GNU_ARCH} == "sh" || \
547 ${MACHINE_GNU_ARCH} == "shle" || \ 547 ${MACHINE_GNU_ARCH} == "shle" || \
548 ${MACHINE_ARCH} == "sparc" || \ 548 ${MACHINE_ARCH} == "sparc" || \
549 ${MACHINE_ARCH} == "vax") 549 ${MACHINE_ARCH} == "vax")
550MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf 550MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
551.else 551.else
552MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd 552MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
553.endif 553.endif
554 554
 555#
 556# Determine if arch uses native kernel modules with rump
 557#
 558.if ${MACHINE_ARCH} == "i386" || \
 559 ${MACHINE_ARCH} == "x86_64"
 560RUMPKMOD= # defined
 561.endif
 562
555TARGETS+= all clean cleandir depend dependall includes \ 563TARGETS+= all clean cleandir depend dependall includes \
556 install lint obj regress tags html 564 install lint obj regress tags html
557PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \ 565PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
558 install lint obj regress tags beforedepend afterdepend \ 566 install lint obj regress tags beforedepend afterdepend \
559 beforeinstall afterinstall realinstall realdepend realall \ 567 beforeinstall afterinstall realinstall realdepend realall \
560 html subdir-all subdir-install subdir-depend 568 html subdir-all subdir-install subdir-depend
561.PHONY: ${PHONY_NOTMAIN} 569.PHONY: ${PHONY_NOTMAIN}
562.NOTMAIN: ${PHONY_NOTMAIN} 570.NOTMAIN: ${PHONY_NOTMAIN}
563 571
564.if ${NEED_OWN_INSTALL_TARGET} != "no" 572.if ${NEED_OWN_INSTALL_TARGET} != "no"
565.if !target(install) 573.if !target(install)
566install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall 574install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
567beforeinstall: 575beforeinstall:
568subdir-install: 576subdir-install:
569realinstall: 577realinstall:
570afterinstall: 578afterinstall:
571.endif 579.endif
572all: realall subdir-all 580all: realall subdir-all
573subdir-all: 581subdir-all:
574realall: 582realall:
575depend: realdepend subdir-depend 583depend: realdepend subdir-depend
576subdir-depend: 584subdir-depend:
577realdepend: 585realdepend:
578distclean: cleandir 586distclean: cleandir
579cleandir: clean 587cleandir: clean
580 588
581dependall: .NOTMAIN realdepend .MAKE 589dependall: .NOTMAIN realdepend .MAKE
582 @cd ${.CURDIR}; ${MAKE} realall 590 @cd ${.CURDIR}; ${MAKE} realall
583.endif 591.endif
584 592
585# 593#
586# Define MKxxx variables (which are either yes or no) for users 594# Define MKxxx variables (which are either yes or no) for users
587# to set in /etc/mk.conf and override in the make environment. 595# to set in /etc/mk.conf and override in the make environment.
588# These should be tested with `== "no"' or `!= "no"'. 596# These should be tested with `== "no"' or `!= "no"'.
589# The NOxxx variables should only be set by Makefiles. 597# The NOxxx variables should only be set by Makefiles.
590# 598#
591# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync 599# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
592# with changes to the MK* variables here. 600# with changes to the MK* variables here.
593# 601#
594 602
595# 603#
596# Supported NO* options (if defined, MK* will be forced to "no", 604# Supported NO* options (if defined, MK* will be forced to "no",
597# regardless of user's mk.conf setting). 605# regardless of user's mk.conf setting).
598# 606#
599# Source makefiles should set NO*, and not MK*, and must do so before 607# Source makefiles should set NO*, and not MK*, and must do so before
600# including bsd.own.mk. 608# including bsd.own.mk.
601# 609#
602.for var in \ 610.for var in \
603 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \ 611 NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
604 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB 612 NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
605.if defined(${var}) 613.if defined(${var})
606MK${var:S/^NO//}:= no 614MK${var:S/^NO//}:= no
607.endif 615.endif
608.endfor 616.endfor
609 617
610# 618#
611# Older-style variables that enabled behaviour when set. 619# Older-style variables that enabled behaviour when set.
612# 620#
613.for var in MANZ UNPRIVED UPDATE 621.for var in MANZ UNPRIVED UPDATE
614.if defined(${var}) 622.if defined(${var})
615MK${var}:= yes 623MK${var}:= yes
616.endif 624.endif
617.endfor 625.endfor
618 626
619# 627#
620# MK* options which have variable defaults. 628# MK* options which have variable defaults.
621# 629#
622.if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64" 630.if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64"
623MKCOMPAT?= yes 631MKCOMPAT?= yes
624.else 632.else
625# Don't let this build where it really isn't supported. 633# Don't let this build where it really isn't supported.
626MKCOMPAT:= no 634MKCOMPAT:= no
627.endif 635.endif
628 636
629# 637#
630# MK* options which default to "yes". 638# MK* options which default to "yes".
631# 639#
632.for var in \ 640.for var in \
633 MKATF \ 641 MKATF \
634 MKBFD MKBINUTILS \ 642 MKBFD MKBINUTILS \
635 MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \ 643 MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \
636 MKDOC \ 644 MKDOC \
637 MKGCC MKGCCCMDS MKGDB \ 645 MKGCC MKGCCCMDS MKGDB \
638 MKHESIOD MKHTML \ 646 MKHESIOD MKHTML \
639 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \ 647 MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
640 MKKERBEROS \ 648 MKKERBEROS \
641 MKLDAP MKLINKLIB MKLINT \ 649 MKLDAP MKLINKLIB MKLINT \
642 MKMAN \ 650 MKMAN \
643 MKNLS \ 651 MKNLS \
644 MKOBJ \ 652 MKOBJ \
645 MKPAM \ 653 MKPAM \
646 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \ 654 MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
647 MKSHARE MKSKEY MKSTATICLIB \ 655 MKSHARE MKSKEY MKSTATICLIB \
648 MKYP 656 MKYP
649${var}?= yes 657${var}?= yes
650.endfor 658.endfor
651 659
652# 660#
653# MK* options which default to "no". 661# MK* options which default to "no".
654# 662#
655.for var in \ 663.for var in \
656 MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \ 664 MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
657 MKLVM \ 665 MKLVM \
658 MKMANZ MKOBJDIRS \ 666 MKMANZ MKOBJDIRS \
659 MKPCC MKPCCCMDS \ 667 MKPCC MKPCCCMDS \
660 MKSOFTFLOAT MKSTRIPIDENT \ 668 MKSOFTFLOAT MKSTRIPIDENT \
661 MKUNPRIVED MKUPDATE MKX11  669 MKUNPRIVED MKUPDATE MKX11
662${var}?=no 670${var}?=no
663.endfor 671.endfor
664 672
665# 673#
666# Do we default to XFree86 or Xorg for this platform? 674# Do we default to XFree86 or Xorg for this platform?
667# 675#
668.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || \ 676.if ${MACHINE} == "amd64" || ${MACHINE} == "i386" || \
669 ${MACHINE} == "macppc" || ${MACHINE} == "shark" || \ 677 ${MACHINE} == "macppc" || ${MACHINE} == "shark" || \
670 ${MACHINE} == "sparc64" 678 ${MACHINE} == "sparc64"
671X11FLAVOUR?= Xorg 679X11FLAVOUR?= Xorg
672.else 680.else
673X11FLAVOUR?= XFree86 681X11FLAVOUR?= XFree86
674.endif 682.endif
675 683
676# 684#
677# Force some options off if their dependencies are off. 685# Force some options off if their dependencies are off.
678# 686#
679 687
680.if ${MKCRYPTO} == "no" 688.if ${MKCRYPTO} == "no"
681MKKERBEROS:= no 689MKKERBEROS:= no
682.endif 690.endif
683 691
684.if ${MKMAN} == "no" 692.if ${MKMAN} == "no"
685MKCATPAGES:= no 693MKCATPAGES:= no
686MKHTML:= no 694MKHTML:= no
687.endif 695.endif
688 696
689.if ${MKLINKLIB} == "no" 697.if ${MKLINKLIB} == "no"
690MKLINT:= no 698MKLINT:= no
691MKPICINSTALL:= no 699MKPICINSTALL:= no
692MKPROFILE:= no 700MKPROFILE:= no
693.endif 701.endif
694 702
695.if ${MKPIC} == "no" 703.if ${MKPIC} == "no"
696MKPICLIB:= no 704MKPICLIB:= no
697.endif 705.endif
698 706
699.if ${MKOBJ} == "no" 707.if ${MKOBJ} == "no"
700MKOBJDIRS:= no 708MKOBJDIRS:= no
701.endif 709.endif
702 710
703.if ${MKSHARE} == "no" 711.if ${MKSHARE} == "no"
704MKCATPAGES:= no 712MKCATPAGES:= no
705MKDOC:= no 713MKDOC:= no
706MKINFO:= no 714MKINFO:= no
707MKHTML:= no 715MKHTML:= no
708MKMAN:= no 716MKMAN:= no
709MKNLS:= no 717MKNLS:= no
710.endif 718.endif
711 719
712# 720#
713# install(1) parameters. 721# install(1) parameters.
714# 722#
715COPY?= -c 723COPY?= -c
716.if ${MKUPDATE} == "no" 724.if ${MKUPDATE} == "no"
717PRESERVE?=  725PRESERVE?=
718.else 726.else
719PRESERVE?= -p 727PRESERVE?= -p
720.endif 728.endif
721RENAME?= -r 729RENAME?= -r
722HRDLINK?= -l h 730HRDLINK?= -l h
723SYMLINK?= -l s 731SYMLINK?= -l s
724 732
725METALOG?= ${DESTDIR}/METALOG 733METALOG?= ${DESTDIR}/METALOG
726METALOG.add?= ${TOOL_CAT} -l >> ${METALOG} 734METALOG.add?= ${TOOL_CAT} -l >> ${METALOG}
727.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR} 735.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
728.if ${MKUNPRIVED} != "no" 736.if ${MKUNPRIVED} != "no"
729INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha1 737INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha1
730.else 738.else
731INSTPRIV.unpriv= 739INSTPRIV.unpriv=
732.endif 740.endif
733INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc 741INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
734.endif 742.endif
735STRIPFLAG?=  743STRIPFLAG?=
736 744
737.if ${NEED_OWN_INSTALL_TARGET} != "no" 745.if ${NEED_OWN_INSTALL_TARGET} != "no"
738INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d 746INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d
739INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME} 747INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
740INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME} 748INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
741INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME} 749INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
742HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME} 750HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
743HOST_INSTALL_DIR?= ${INSTALL} -d 751HOST_INSTALL_DIR?= ${INSTALL} -d
744HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME} 752HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME}
745.endif 753.endif
746 754
747# 755#
748# Set defaults for the USE_xxx variables. 756# Set defaults for the USE_xxx variables.
749# 757#
750 758
751# 759#
752# USE_* options which default to "no" and will be forced to "no" if their 760# USE_* options which default to "no" and will be forced to "no" if their
753# corresponding MK* variable is set to "no". 761# corresponding MK* variable is set to "no".
754# 762#
755.for var in USE_SKEY 763.for var in USE_SKEY
756.if (${${var:S/USE_/MK/}} == "no") 764.if (${${var:S/USE_/MK/}} == "no")
757${var}:= no 765${var}:= no
758.else 766.else
759${var}?= no 767${var}?= no
760.endif 768.endif
761.endfor 769.endfor
762 770
763# 771#
764# USE_* options which default to "yes" unless their corresponding MK* 772# USE_* options which default to "yes" unless their corresponding MK*
765# variable is set to "no". 773# variable is set to "no".
766# 774#
767.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP 775.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
768.if (${${var:S/USE_/MK/}} == "no") 776.if (${${var:S/USE_/MK/}} == "no")
769${var}:= no 777${var}:= no
770.else 778.else
771${var}?= yes 779${var}?= yes
772.endif 780.endif
773.endfor 781.endfor
774 782
775# 783#
776# USE_* options which default to "yes". 784# USE_* options which default to "yes".
777# 785#
778.for var in USE_JEMALLOC 786.for var in USE_JEMALLOC
779${var}?= yes 787${var}?= yes
780.endfor 788.endfor
781 789
782# 790#
783# USE_* options which default to "no". 791# USE_* options which default to "no".
784# 792#
785#.for var in 793#.for var in
786#${var}?= no 794#${var}?= no
787#.endfor 795#.endfor
788 796
789# 797#
790# Where X11 sources are and where it is installed to. 798# Where X11 sources are and where it is installed to.
791# 799#
792X11SRCDIR?= /usr/xsrc 800X11SRCDIR?= /usr/xsrc
793X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc 801X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc
794X11SRCDIR.local?= ${X11SRCDIR}/local 802X11SRCDIR.local?= ${X11SRCDIR}/local
795.if ${X11FLAVOUR} == "Xorg" 803.if ${X11FLAVOUR} == "Xorg"
796X11ROOTDIR?= /usr/X11R7 804X11ROOTDIR?= /usr/X11R7
797.else 805.else
798X11ROOTDIR?= /usr/X11R6 806X11ROOTDIR?= /usr/X11R6
799.endif 807.endif
800X11BINDIR?= ${X11ROOTDIR}/bin 808X11BINDIR?= ${X11ROOTDIR}/bin
801X11ETCDIR?= /etc/X11 809X11ETCDIR?= /etc/X11
802X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts 810X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts
803X11INCDIR?= ${X11ROOTDIR}/include 811X11INCDIR?= ${X11ROOTDIR}/include
804X11LIBDIR?= ${X11ROOTDIR}/lib/X11 812X11LIBDIR?= ${X11ROOTDIR}/lib/X11
805X11MANDIR?= ${X11ROOTDIR}/man 813X11MANDIR?= ${X11ROOTDIR}/man
806X11USRLIBDIR?= ${X11ROOTDIR}/lib 814X11USRLIBDIR?= ${X11ROOTDIR}/lib
807 815
808# 816#
809# New modular-xorg based builds 817# New modular-xorg based builds
810# 818#
811X11SRCDIRMIT?= ${X11SRCDIR}/external/mit 819X11SRCDIRMIT?= ${X11SRCDIR}/external/mit
812.for _lib in \ 820.for _lib in \
813 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \ 821 FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
814 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xp Xpm XprintUtil \ 822 Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xp Xpm XprintUtil \
815 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \ 823 Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
816 fontenc xkbfile xkbui Xaw lbxutil Xfontcache XprintAppUtil 824 fontenc xkbfile xkbui Xaw lbxutil Xfontcache XprintAppUtil
817X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist 825X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist
818.endfor 826.endfor
819 827
820.for _proto in \ 828.for _proto in \
821 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \ 829 xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
822 xinerama print render resource record video xf86dga xf86misc \ 830 xinerama print render resource record video xf86dga xf86misc \
823 xf86vidmode composite damage trap gl randr fontcache xf86dri 831 xf86vidmode composite damage trap gl randr fontcache xf86dri
824X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist 832X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist
825.endfor 833.endfor
826 834
827.for _dir in \ 835.for _dir in \
828 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \ 836 xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
829 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata \ 837 xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata \
830 xbitmaps appres xeyes xev xedit sessreg pixman \ 838 xbitmaps appres xeyes xev xedit sessreg pixman \
831 beforelight bitmap editres makedepend fonttosfnt fslsfonts \ 839 beforelight bitmap editres makedepend fonttosfnt fslsfonts \
832 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \ 840 fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
833 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \ 841 luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
834 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \ 842 setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
835 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \ 843 xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
836 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \ 844 xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
837 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \ 845 xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
838 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \ 846 xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
839 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \ 847 xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
840 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \ 848 xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
841 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \ 849 xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
842 xkeyboard-config xinput \ 850 xkeyboard-config xinput \
843 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \ 851 font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
844 font-adobe-utopia-75dpi font-adobe-utopia-type1 \ 852 font-adobe-utopia-75dpi font-adobe-utopia-type1 \
845 font-alias \ 853 font-alias \
846 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \ 854 font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
847 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \ 855 font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
848 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \ 856 font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
849 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \ 857 font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
850 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \ 858 font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
851 font-util ttf-bitstream-vera encodings 859 font-util ttf-bitstream-vera encodings
852X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist 860X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist
853.endfor 861.endfor
854 862
855.for _i in \ 863.for _i in \
856 keyboard mouse vmmouse void 864 keyboard mouse vmmouse void
857X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist 865X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist
858.endfor 866.endfor
859 867
860.for _v in \ 868.for _v in \
861 ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 imstt \ 869 ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 imstt \
862 intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 radeonhd \ 870 intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 radeonhd \
863 rendition s3 s3virge savage siliconmotion sis sunffb suncg6 tdfx tga \ 871 rendition s3 s3virge savage siliconmotion sis sunffb suncg6 tdfx tga \
864 trident tseng vesa vga via vmware wsfb 872 trident tseng vesa vga via vmware wsfb
865  873
866X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist 874X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist
867.endfor 875.endfor
868 876
869.if ${X11FLAVOUR} == "Xorg" 877.if ${X11FLAVOUR} == "Xorg"
870X11DRI?= yes 878X11DRI?= yes
871.endif 879.endif
872 880
873X11DRI?= no 881X11DRI?= no
874X11LOADABLE?= yes 882X11LOADABLE?= yes
875 883
876 884
877# 885#
878# MAKEDIRTARGET dir target [extra make(1) params] 886# MAKEDIRTARGET dir target [extra make(1) params]
879# run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message 887# run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message
880# 888#
881MAKEDIRTARGET=\ 889MAKEDIRTARGET=\
882 @_makedirtarget() { \ 890 @_makedirtarget() { \
883 dir="$$1"; shift; \ 891 dir="$$1"; shift; \
884 target="$$1"; shift; \ 892 target="$$1"; shift; \
885 case "$${dir}" in \ 893 case "$${dir}" in \
886 /*) this="$${dir}/"; \ 894 /*) this="$${dir}/"; \
887 real="$${dir}" ;; \ 895 real="$${dir}" ;; \
888 .) this="${_THISDIR_}"; \ 896 .) this="${_THISDIR_}"; \
889 real="${.CURDIR}" ;; \ 897 real="${.CURDIR}" ;; \
890 *) this="${_THISDIR_}$${dir}/"; \ 898 *) this="${_THISDIR_}$${dir}/"; \
891 real="${.CURDIR}/$${dir}" ;; \ 899 real="${.CURDIR}/$${dir}" ;; \
892 esac; \ 900 esac; \
893 show=$${this:-.}; \ 901 show=$${this:-.}; \
894 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \ 902 echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
895 cd "$${real}" \ 903 cd "$${real}" \
896 && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \ 904 && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
897 }; \ 905 }; \
898 _makedirtarget 906 _makedirtarget
899 907
900# 908#
901# MAKEVERBOSE support. Levels are: 909# MAKEVERBOSE support. Levels are:
902# 0 Minimal output ("quiet") 910# 0 Minimal output ("quiet")
903# 1 Describe what is occurring 911# 1 Describe what is occurring
904# 2 Describe what is occurring and echo the actual command 912# 2 Describe what is occurring and echo the actual command
905# 3 Ignore the effect of the "@" prefix in make commands 913# 3 Ignore the effect of the "@" prefix in make commands
906# 4 Trace shell commands using the shell's -x flag 914# 4 Trace shell commands using the shell's -x flag
907#  915#
908MAKEVERBOSE?= 2 916MAKEVERBOSE?= 2
909 917
910.if ${MAKEVERBOSE} == 0 918.if ${MAKEVERBOSE} == 0
911_MKMSG?= @\# 919_MKMSG?= @\#
912_MKSHMSG?= : echo 920_MKSHMSG?= : echo
913_MKSHECHO?= : echo 921_MKSHECHO?= : echo
914.SILENT: 922.SILENT:
915.elif ${MAKEVERBOSE} == 1 923.elif ${MAKEVERBOSE} == 1
916_MKMSG?= @echo ' ' 924_MKMSG?= @echo ' '
917_MKSHMSG?= echo ' ' 925_MKSHMSG?= echo ' '
918_MKSHECHO?= : echo 926_MKSHECHO?= : echo
919.SILENT: 927.SILENT:
920.else # MAKEVERBOSE >= 2 928.else # MAKEVERBOSE >= 2
921_MKMSG?= @echo '\# ' 929_MKMSG?= @echo '\# '
922_MKSHMSG?= echo '\# ' 930_MKSHMSG?= echo '\# '
923_MKSHECHO?= echo 931_MKSHECHO?= echo
924.SILENT: __makeverbose_dummy_target__ 932.SILENT: __makeverbose_dummy_target__
925.endif # MAKEVERBOSE >= 2 933.endif # MAKEVERBOSE >= 2
926.if ${MAKEVERBOSE} >= 3 934.if ${MAKEVERBOSE} >= 3
927.MAKEFLAGS: -dl 935.MAKEFLAGS: -dl
928.endif # ${MAKEVERBOSE} >= 3 936.endif # ${MAKEVERBOSE} >= 3
929.if ${MAKEVERBOSE} >= 4 937.if ${MAKEVERBOSE} >= 4
930.MAKEFLAGS: -dx 938.MAKEFLAGS: -dx
931.endif # ${MAKEVERBOSE} >= 4 939.endif # ${MAKEVERBOSE} >= 4
932 940
933_MKMSG_BUILD?= ${_MKMSG} " build " 941_MKMSG_BUILD?= ${_MKMSG} " build "
934_MKMSG_CREATE?= ${_MKMSG} " create " 942_MKMSG_CREATE?= ${_MKMSG} " create "
935_MKMSG_COMPILE?= ${_MKMSG} "compile " 943_MKMSG_COMPILE?= ${_MKMSG} "compile "
936_MKMSG_FORMAT?= ${_MKMSG} " format " 944_MKMSG_FORMAT?= ${_MKMSG} " format "
937_MKMSG_INSTALL?= ${_MKMSG} "install " 945_MKMSG_INSTALL?= ${_MKMSG} "install "
938_MKMSG_LINK?= ${_MKMSG} " link " 946_MKMSG_LINK?= ${_MKMSG} " link "
939_MKMSG_LEX?= ${_MKMSG} " lex " 947_MKMSG_LEX?= ${_MKMSG} " lex "
940_MKMSG_REMOVE?= ${_MKMSG} " remove " 948_MKMSG_REMOVE?= ${_MKMSG} " remove "
941_MKMSG_YACC?= ${_MKMSG} " yacc " 949_MKMSG_YACC?= ${_MKMSG} " yacc "
942 950
943_MKSHMSG_CREATE?= ${_MKSHMSG} " create " 951_MKSHMSG_CREATE?= ${_MKSHMSG} " create "
944_MKSHMSG_INSTALL?= ${_MKSHMSG} "install " 952_MKSHMSG_INSTALL?= ${_MKSHMSG} "install "
945 953
946_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET} 954_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
947_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET} 955_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
948_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET} 956_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
949_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET} 957_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
950_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET} 958_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET}
951_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET} 959_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
952_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET} 960_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
953_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET} 961_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET}
954_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET} 962_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
955 963
956.endif # !defined(_BSD_OWN_MK_) 964.endif # !defined(_BSD_OWN_MK_)

cvs diff -r1.19 -r1.20 src/sys/rump/Makefile.rump (switch to unified diff)

--- src/sys/rump/Makefile.rump 2008/12/30 19:05:40 1.19
+++ src/sys/rump/Makefile.rump 2008/12/30 21:31:10 1.20
@@ -1,31 +1,32 @@ @@ -1,31 +1,32 @@
1# $NetBSD: Makefile.rump,v 1.19 2008/12/30 19:05:40 pooka Exp $ 1# $NetBSD: Makefile.rump,v 1.20 2008/12/30 21:31:10 pooka Exp $
2# 2#
3 3
4WARNS?= 4 4WARNS?= 4
5NOLINT= # kernel code 5NOLINT= # kernel code
6 6
 7.include <bsd.own.mk>
 8
7# use kernel ABI instead of rump ABI (needs md code) 9# use kernel ABI instead of rump ABI (needs md code)
8.if ${MACHINE_ARCH} != "i386" && \ 10.ifndef(RUMPKMOD)
9 ${MACHINE_ARCH} != "x86_64" 
10CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLAGS} 11CPPFLAGS:= -I${RUMPTOP}/include ${CPPFLAGS}
11.endif 12.endif
12 13
13CFLAGS+= -ffreestanding 14CFLAGS+= -ffreestanding
14CPPFLAGS+= -D_RUMPKERNEL # XXX: this should die 15CPPFLAGS+= -D_RUMPKERNEL # XXX: this should die
15CPPFLAGS+= -D_KERNEL -DMULTIPROCESSOR -D_MODULE 16CPPFLAGS+= -D_KERNEL -DMULTIPROCESSOR -D_MODULE
16CPPFLAGS+= -DDIAGNOSTIC 17CPPFLAGS+= -DDIAGNOSTIC
17CPPFLAGS+= -I${.CURDIR} -I. 18CPPFLAGS+= -I${.CURDIR} -I.
18CPPFLAGS+= -I${RUMPTOP}/../../common/include -I${RUMPTOP}/../arch 19CPPFLAGS+= -I${RUMPTOP}/../../common/include -I${RUMPTOP}/../arch
19CPPFLAGS+= -I${RUMPTOP}/include 20CPPFLAGS+= -I${RUMPTOP}/include
20CPPFLAGS+= -nostdinc -I${RUMPTOP}/.. 21CPPFLAGS+= -nostdinc -I${RUMPTOP}/..
21#CPPFLAGS+= -DDEBUG 22#CPPFLAGS+= -DDEBUG
22 23
23RUMPKERNEL= This is NetBSD and I am the rump. Good evening. 24RUMPKERNEL= This is NetBSD and I am the rump. Good evening.
24 25
25# workaround: evbppc is not a well-defined arch 26# workaround: evbppc is not a well-defined arch
26.if (${MACHINE} == "evbppc") 27.if (${MACHINE} == "evbppc")
27CPPFLAGS+= -DPPC_OEA 28CPPFLAGS+= -DPPC_OEA
28.endif 29.endif
29 30
30# If an options are changed, trigger a rebuild 31# If an options are changed, trigger a rebuild
31${SRCS:S/.c/.o/g}: ${RUMPTOP}/Makefile.rump 32${SRCS:S/.c/.o/g}: ${RUMPTOP}/Makefile.rump