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