[BACK]Return to bsd.own.mk CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / share / mk

Annotation of src/share/mk/bsd.own.mk, Revision 1.542.2.13

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

CVSweb <webmaster@jp.NetBSD.org>