Annotation of src/share/mk/bsd.own.mk, Revision 1.555
1.555 ! abs 1: # $NetBSD: bsd.own.mk,v 1.554 2009/01/25 23:11:16 tron 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:
1.508 ad 434: KMODULEGRP?= wheel
435: KMODULEOWN?= root
436: KMODULEMODE?= ${NONBINMODE}
437:
1.155 itojun 438: LOCALEDIR?= /usr/share/locale
439: LOCALEGRP?= wheel
440: LOCALEOWN?= root
441: LOCALEMODE?= ${NONBINMODE}
1.1 cgd 442:
1.453 rpaulo 443: FIRMWAREDIR?= /libdata/firmware
444: FIRMWAREGRP?= wheel
445: FIRMWAREOWN?= root
446: FIRMWAREMODE?= ${NONBINMODE}
447:
1.465 lukem 448: DEBUGDIR?= /usr/libdata/debug
449: DEBUGGRP?= wheel
450: DEBUGOWN?= root
451: DEBUGMODE?= ${NONBINMODE}
452:
1.341 lukem 453: #
454: # Data-driven table using make variables to control how
1.264 thorpej 455: # toolchain-dependent targets and shared libraries are built
456: # for different platforms and object formats.
457: #
1.296 thorpej 458: # OBJECT_FMT: currently either "ELF" or "a.out".
1.264 thorpej 459: #
1.499 simonb 460: # All platforms are ELF.
1.341 lukem 461: #
1.264 thorpej 462: OBJECT_FMT= ELF
463:
1.341 lukem 464: #
1.310 thorpej 465: # If this platform's toolchain is missing, we obviously cannot build it.
1.341 lukem 466: #
1.406 lukem 467: .if ${TOOLCHAIN_MISSING} != "no"
1.310 thorpej 468: MKBFD:= no
469: MKGDB:= no
470: MKGCC:= no
471: .endif
472:
1.341 lukem 473: #
1.310 thorpej 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
476: # tightly-coupled to the version of GCC being used.
1.341 lukem 477: #
1.310 thorpej 478: .if defined(EXTERNAL_TOOLCHAIN)
479: MKGCC:= no
480: .endif
481:
1.341 lukem 482: #
1.165 fredette 483: # The m68000 port is incomplete.
1.341 lukem 484: #
1.165 fredette 485: .if ${MACHINE_ARCH} == "m68000"
1.230 tv 486: NOPIC= # defined
1.458 mrg 487: MKISCSI= no
488: # XXX GCC 4 outputs mcount() calling sequences that try to load values
489: # from over 64KB away and this fails to assemble.
1.519 gmcgarry 490: .if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
1.458 mrg 491: NOPROFILE= # defined
492: .endif
1.32 thorpej 493: .endif
1.122 simonb 494:
1.341 lukem 495: #
1.441 skrll 496: # The ia64 port is incomplete.
497: #
498: .if ${MACHINE_ARCH} == "ia64"
499: MKLINT= no
1.472 skrll 500: MKGDB= no
1.441 skrll 501: .endif
502:
503: #
1.327 thorpej 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.
1.341 lukem 506: #
1.327 thorpej 507: .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
508: MKPICLIB:= no
509: .endif
510:
1.341 lukem 511: #
1.327 thorpej 512: # On VAX using ELF, all objects are PIC, not just shared libraries,
1.401 matt 513: # so don't build the _pic version. Unless we are using GCC3 which
514: # doesn't support PIC yet.
1.341 lukem 515: #
1.494 matt 516: .if ${MACHINE_ARCH} == "vax"
517: MKPICLIB= no
1.327 thorpej 518: .endif
519:
1.341 lukem 520: #
1.122 simonb 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
523: # will be built by <bsd.lib.mk>.
1.341 lukem 524: #
1.122 simonb 525: SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
1.69 tv 526:
1.341 lukem 527: #
1.69 tv 528: # GNU sources and packages sometimes see architecture names differently.
1.341 lukem 529: #
1.494 matt 530: GNU_ARCH.coldfire=m68k
1.261 thorpej 531: GNU_ARCH.m68000=m68010
1.150 itojun 532: GNU_ARCH.sh3eb=sh
1.236 thorpej 533: GNU_ARCH.sh3el=shle
1.468 matt 534: GNU_ARCH.mips64eb=mips64
1.172 tv 535: MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
1.161 tv 536:
1.341 lukem 537: #
1.161 tv 538: # In order to identify NetBSD to GNU packages, we sometimes need
539: # an "elf" tag for historically a.out platforms.
1.341 lukem 540: #
1.162 tv 541: .if ${OBJECT_FMT} == "ELF" && \
1.192 thorpej 542: (${MACHINE_GNU_ARCH} == "arm" || \
1.294 thorpej 543: ${MACHINE_GNU_ARCH} == "armeb" || \
1.168 matt 544: ${MACHINE_ARCH} == "i386" || \
1.494 matt 545: ${MACHINE_CPU} == "m68k" || \
1.235 thorpej 546: ${MACHINE_GNU_ARCH} == "sh" || \
1.236 thorpej 547: ${MACHINE_GNU_ARCH} == "shle" || \
1.168 matt 548: ${MACHINE_ARCH} == "sparc" || \
549: ${MACHINE_ARCH} == "vax")
1.318 thorpej 550: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
1.161 tv 551: .else
1.318 thorpej 552: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
1.161 tv 553: .endif
1.153 itojun 554:
1.553 pooka 555: #
556: # Determine if arch uses native kernel modules with rump
557: #
558: .if ${MACHINE_ARCH} == "i386" || \
559: ${MACHINE_ARCH} == "x86_64"
560: RUMPKMOD= # defined
561: .endif
562:
1.160 tv 563: TARGETS+= all clean cleandir depend dependall includes \
1.521 lukem 564: install lint obj regress tags html
1.485 dsl 565: PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
1.128 perry 566: install lint obj regress tags beforedepend afterdepend \
1.142 phil 567: beforeinstall afterinstall realinstall realdepend realall \
1.521 lukem 568: html subdir-all subdir-install subdir-depend
1.485 dsl 569: .PHONY: ${PHONY_NOTMAIN}
570: .NOTMAIN: ${PHONY_NOTMAIN}
1.58 agc 571:
1.406 lukem 572: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.56 drochner 573: .if !target(install)
1.485 dsl 574: install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
575: beforeinstall:
576: subdir-install:
577: realinstall:
578: afterinstall:
579: .endif
580: all: realall subdir-all
581: subdir-all:
582: realall:
583: depend: realdepend subdir-depend
584: subdir-depend:
585: realdepend:
586: distclean: cleandir
587: cleandir: clean
1.205 tv 588:
589: dependall: .NOTMAIN realdepend .MAKE
590: @cd ${.CURDIR}; ${MAKE} realall
1.132 mycroft 591: .endif
1.116 lukem 592:
1.341 lukem 593: #
1.116 lukem 594: # Define MKxxx variables (which are either yes or no) for users
1.350 lukem 595: # to set in /etc/mk.conf and override in the make environment.
1.116 lukem 596: # These should be tested with `== "no"' or `!= "no"'.
1.340 lukem 597: # The NOxxx variables should only be set by Makefiles.
1.116 lukem 598: #
1.466 lukem 599: # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
600: # with changes to the MK* variables here.
601: #
1.116 lukem 602:
1.341 lukem 603: #
1.230 tv 604: # Supported NO* options (if defined, MK* will be forced to "no",
605: # regardless of user's mk.conf setting).
1.341 lukem 606: #
1.503 dholland 607: # Source makefiles should set NO*, and not MK*, and must do so before
608: # including bsd.own.mk.
609: #
1.422 lukem 610: .for var in \
1.534 apb 611: NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
1.503 dholland 612: NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
613: .if defined(${var})
614: MK${var:S/^NO//}:= no
1.230 tv 615: .endif
616: .endfor
1.268 ross 617:
1.341 lukem 618: #
619: # Older-style variables that enabled behaviour when set.
620: #
621: .for var in MANZ UNPRIVED UPDATE
622: .if defined(${var})
623: MK${var}:= yes
1.268 ross 624: .endif
1.341 lukem 625: .endfor
1.230 tv 626:
1.536 mrg 627: #
628: # MK* options which have variable defaults.
629: #
630: .if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64"
631: MKCOMPAT?= yes
632: .else
633: # Don't let this build where it really isn't supported.
634: MKCOMPAT:= no
635: .endif
636:
1.341 lukem 637: #
1.230 tv 638: # MK* options which default to "yes".
1.341 lukem 639: #
1.422 lukem 640: .for var in \
1.514 gmcgarry 641: MKATF \
1.504 lukem 642: MKBFD MKBINUTILS \
1.514 gmcgarry 643: MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \
1.504 lukem 644: MKDOC \
645: MKGCC MKGCCCMDS MKGDB \
1.524 lukem 646: MKHESIOD MKHTML \
1.504 lukem 647: MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
648: MKKERBEROS \
1.513 wiz 649: MKLDAP MKLINKLIB MKLINT \
1.504 lukem 650: MKMAN \
1.525 christos 651: MKNLS \
1.504 lukem 652: MKOBJ \
1.519 gmcgarry 653: MKPAM \
654: MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
1.504 lukem 655: MKSHARE MKSKEY MKSTATICLIB \
656: MKYP
657: ${var}?= yes
1.230 tv 658: .endfor
659:
1.341 lukem 660: #
1.230 tv 661: # MK* options which default to "no".
1.341 lukem 662: #
1.422 lukem 663: .for var in \
1.504 lukem 664: MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
1.552 agc 665: MKLVM \
1.547 ad 666: MKMANZ MKOBJDIRS \
1.514 gmcgarry 667: MKPCC MKPCCCMDS \
1.541 agc 668: MKSOFTFLOAT MKSTRIPIDENT \
1.552 agc 669: MKUNPRIVED MKUPDATE MKX11
1.504 lukem 670: ${var}?=no
1.230 tv 671: .endfor
672:
1.341 lukem 673: #
1.544 mrg 674: # Do we default to XFree86 or Xorg for this platform?
675: #
1.555 ! abs 676: .if ${MACHINE} == "acorn32" || ${MACHINE} == "amiga" || \
! 677: ${MACHINE} == "cats" || ${MACHINE} == "dreamcast" || \
! 678: ${MACHINE} == "ews4800mips" || ${MACHINE} == "hpcarm" || \
! 679: ${MACHINE} == "hpcmips" || ${MACHINE} == "hpcsh" || \
! 680: ${MACHINE} == "mac68k" || ${MACHINE} == "netwinder" || \
! 681: ${MACHINE} == "newsmips" || ${MACHINE} == "ofppc" || \
! 682: ${MACHINE} == "pmax" || ${MACHINE} == "sgimips" || \
! 683: ${MACHINE} == "sparc" || ${MACHINE} == "sun3" || \
! 684: ${MACHINE} == "x68k"
! 685: X11FLAVOUR?= XFree86
! 686: .else
1.544 mrg 687: X11FLAVOUR?= Xorg
688: .endif
689:
690: #
1.230 tv 691: # Force some options off if their dependencies are off.
1.341 lukem 692: #
693:
1.230 tv 694: .if ${MKCRYPTO} == "no"
695: MKKERBEROS:= no
1.340 lukem 696: .endif
697:
698: .if ${MKMAN} == "no"
1.341 lukem 699: MKCATPAGES:= no
1.340 lukem 700: MKHTML:= no
1.116 lukem 701: .endif
702:
1.117 lukem 703: .if ${MKLINKLIB} == "no"
1.507 lukem 704: MKLINT:= no
1.230 tv 705: MKPICINSTALL:= no
706: MKPROFILE:= no
1.327 thorpej 707: .endif
708:
709: .if ${MKPIC} == "no"
710: MKPICLIB:= no
1.116 lukem 711: .endif
712:
1.230 tv 713: .if ${MKOBJ} == "no"
714: MKOBJDIRS:= no
1.116 lukem 715: .endif
716:
1.117 lukem 717: .if ${MKSHARE} == "no"
1.230 tv 718: MKCATPAGES:= no
719: MKDOC:= no
720: MKINFO:= no
1.341 lukem 721: MKHTML:= no
1.230 tv 722: MKMAN:= no
723: MKNLS:= no
1.116 lukem 724: .endif
1.276 thorpej 725:
1.341 lukem 726: #
727: # install(1) parameters.
728: #
729: COPY?= -c
730: .if ${MKUPDATE} == "no"
731: PRESERVE?=
732: .else
733: PRESERVE?= -p
734: .endif
735: RENAME?= -r
736: HRDLINK?= -l h
1.444 christos 737: SYMLINK?= -l s
1.341 lukem 738:
739: METALOG?= ${DESTDIR}/METALOG
740: METALOG.add?= ${TOOL_CAT} -l >> ${METALOG}
741: .if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
742: .if ${MKUNPRIVED} != "no"
1.409 lukem 743: INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha1
1.341 lukem 744: .else
745: INSTPRIV.unpriv=
746: .endif
747: INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
748: .endif
1.410 lukem 749: STRIPFLAG?=
1.341 lukem 750:
1.406 lukem 751: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.341 lukem 752: INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d
753: INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
754: INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
755: INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
756: HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
1.440 dyoung 757: HOST_INSTALL_DIR?= ${INSTALL} -d
758: HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME}
1.341 lukem 759: .endif
760:
761: #
1.351 lukem 762: # Set defaults for the USE_xxx variables.
763: #
764:
765: #
1.433 lukem 766: # USE_* options which default to "no" and will be forced to "no" if their
767: # corresponding MK* variable is set to "no".
768: #
1.505 lukem 769: .for var in USE_SKEY
770: .if (${${var:S/USE_/MK/}} == "no")
771: ${var}:= no
772: .else
773: ${var}?= no
774: .endif
775: .endfor
1.433 lukem 776:
777: #
1.351 lukem 778: # USE_* options which default to "yes" unless their corresponding MK*
779: # variable is set to "no".
1.341 lukem 780: #
1.512 lukem 781: .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
1.504 lukem 782: .if (${${var:S/USE_/MK/}} == "no")
783: ${var}:= no
1.276 thorpej 784: .else
1.504 lukem 785: ${var}?= yes
1.276 thorpej 786: .endif
1.351 lukem 787: .endfor
788:
789: #
790: # USE_* options which default to "yes".
791: #
1.504 lukem 792: .for var in USE_JEMALLOC
793: ${var}?= yes
1.497 ad 794: .endfor
1.300 tron 795:
1.341 lukem 796: #
1.445 jmc 797: # USE_* options which default to "no".
798: #
1.480 mrg 799: #.for var in
1.504 lukem 800: #${var}?= no
1.480 mrg 801: #.endfor
1.357 lukem 802:
803: #
1.522 mrg 804: # Where X11 sources are and where it is installed to.
1.357 lukem 805: #
806: X11SRCDIR?= /usr/xsrc
807: X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc
808: X11SRCDIR.local?= ${X11SRCDIR}/local
1.544 mrg 809: .if ${X11FLAVOUR} == "Xorg"
1.522 mrg 810: X11ROOTDIR?= /usr/X11R7
811: .else
1.357 lukem 812: X11ROOTDIR?= /usr/X11R6
1.522 mrg 813: .endif
1.357 lukem 814: X11BINDIR?= ${X11ROOTDIR}/bin
1.417 lukem 815: X11ETCDIR?= /etc/X11
1.357 lukem 816: X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts
817: X11INCDIR?= ${X11ROOTDIR}/include
818: X11LIBDIR?= ${X11ROOTDIR}/lib/X11
819: X11MANDIR?= ${X11ROOTDIR}/man
820: X11USRLIBDIR?= ${X11ROOTDIR}/lib
1.417 lukem 821:
1.516 mrg 822: #
823: # New modular-xorg based builds
824: #
825: X11SRCDIRMIT?= ${X11SRCDIR}/external/mit
826: .for _lib in \
827: FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
828: Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xp Xpm XprintUtil \
829: Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
830: fontenc xkbfile xkbui Xaw lbxutil Xfontcache XprintAppUtil
831: X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist
832: .endfor
833:
834: .for _proto in \
835: xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
836: xinerama print render resource record video xf86dga xf86misc \
837: xf86vidmode composite damage trap gl randr fontcache xf86dri
838: X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist
839: .endfor
840:
841: .for _dir in \
842: xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
843: xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata \
1.517 mrg 844: xbitmaps appres xeyes xev xedit sessreg pixman \
1.516 mrg 845: beforelight bitmap editres makedepend fonttosfnt fslsfonts \
1.546 cube 846: fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
1.516 mrg 847: luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
848: setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
849: xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
850: xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
851: xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
852: xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
853: xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
854: xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
855: xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
1.526 mrg 856: xkeyboard-config xinput \
1.516 mrg 857: font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
858: font-adobe-utopia-75dpi font-adobe-utopia-type1 \
859: font-alias \
860: font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
861: font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
862: font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
863: font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
864: font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
1.554 tron 865: font-sony-misc font-util ttf-bitstream-vera encodings
1.516 mrg 866: X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist
867: .endfor
868:
1.518 mrg 869: .for _i in \
870: keyboard mouse vmmouse void
871: X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist
872: .endfor
873:
874: .for _v in \
1.545 macallan 875: ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 imstt \
1.543 macallan 876: intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 radeonhd \
877: rendition s3 s3virge savage siliconmotion sis sunffb suncg6 tdfx tga \
878: trident tseng vesa vga via vmware wsfb
879:
1.518 mrg 880: X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist
881: .endfor
882:
1.544 mrg 883: .if ${X11FLAVOUR} == "Xorg"
1.516 mrg 884: X11DRI?= yes
885: .endif
886:
887: X11DRI?= no
888: X11LOADABLE?= yes
1.374 lukem 889:
890:
891: #
1.414 lukem 892: # MAKEDIRTARGET dir target [extra make(1) params]
893: # run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message
894: #
895: MAKEDIRTARGET=\
896: @_makedirtarget() { \
897: dir="$$1"; shift; \
898: target="$$1"; shift; \
899: case "$${dir}" in \
900: /*) this="$${dir}/"; \
901: real="$${dir}" ;; \
902: .) this="${_THISDIR_}"; \
903: real="${.CURDIR}" ;; \
904: *) this="${_THISDIR_}$${dir}/"; \
905: real="${.CURDIR}/$${dir}" ;; \
906: esac; \
907: show=$${this:-.}; \
908: echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
909: cd "$${real}" \
910: && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
911: }; \
912: _makedirtarget
913:
914: #
1.374 lukem 915: # MAKEVERBOSE support. Levels are:
1.549 apb 916: # 0 Minimal output ("quiet")
917: # 1 Describe what is occurring
918: # 2 Describe what is occurring and echo the actual command
919: # 3 Ignore the effect of the "@" prefix in make commands
920: # 4 Trace shell commands using the shell's -x flag
1.374 lukem 921: #
922: MAKEVERBOSE?= 2
923:
924: .if ${MAKEVERBOSE} == 0
925: _MKMSG?= @\#
926: _MKSHMSG?= : echo
927: _MKSHECHO?= : echo
1.380 lukem 928: .SILENT:
1.374 lukem 929: .elif ${MAKEVERBOSE} == 1
930: _MKMSG?= @echo ' '
931: _MKSHMSG?= echo ' '
932: _MKSHECHO?= : echo
1.380 lukem 933: .SILENT:
1.549 apb 934: .else # MAKEVERBOSE >= 2
1.374 lukem 935: _MKMSG?= @echo '\# '
936: _MKSHMSG?= echo '\# '
937: _MKSHECHO?= echo
1.380 lukem 938: .SILENT: __makeverbose_dummy_target__
1.549 apb 939: .endif # MAKEVERBOSE >= 2
940: .if ${MAKEVERBOSE} >= 3
941: .MAKEFLAGS: -dl
942: .endif # ${MAKEVERBOSE} >= 3
943: .if ${MAKEVERBOSE} >= 4
944: .MAKEFLAGS: -dx
945: .endif # ${MAKEVERBOSE} >= 4
1.374 lukem 946:
947: _MKMSG_BUILD?= ${_MKMSG} " build "
948: _MKMSG_CREATE?= ${_MKMSG} " create "
949: _MKMSG_COMPILE?= ${_MKMSG} "compile "
950: _MKMSG_FORMAT?= ${_MKMSG} " format "
951: _MKMSG_INSTALL?= ${_MKMSG} "install "
952: _MKMSG_LINK?= ${_MKMSG} " link "
953: _MKMSG_LEX?= ${_MKMSG} " lex "
954: _MKMSG_REMOVE?= ${_MKMSG} " remove "
955: _MKMSG_YACC?= ${_MKMSG} " yacc "
1.391 lukem 956:
957: _MKSHMSG_CREATE?= ${_MKSHMSG} " create "
958: _MKSHMSG_INSTALL?= ${_MKSHMSG} "install "
1.374 lukem 959:
1.394 lukem 960: _MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
961: _MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
962: _MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
963: _MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
964: _MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET}
965: _MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
966: _MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
967: _MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET}
968: _MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
1.64 lukem 969:
1.347 lukem 970: .endif # !defined(_BSD_OWN_MK_)
CVSweb <webmaster@jp.NetBSD.org>