[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.1045

1.1045  ! mrg         1: #      $NetBSD: bsd.own.mk,v 1.1044 2018/03/05 08:08:06 mrg Exp $
1.611     mrg         2:
                      3: # This needs to be before bsd.init.mk
                      4: .if defined(BSD_MK_COMPAT_FILE)
                      5: .include <${BSD_MK_COMPAT_FILE}>
                      6: .endif
1.64      lukem       7:
                      8: .if !defined(_BSD_OWN_MK_)
                      9: _BSD_OWN_MK_=1
1.24      thorpej    10:
1.169     tv         11: MAKECONF?=     /etc/mk.conf
1.205     tv         12: .-include "${MAKECONF}"
1.13      mycroft    13:
1.341     lukem      14: #
1.310     thorpej    15: # CPU model, derived from MACHINE_ARCH
1.341     lukem      16: #
1.835     matt       17: MACHINE_CPU=   ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:C/arm.*/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/:S/aarch64eb/aarch64/:S/or1knd/or1k/:C/riscv../riscv/}
1.310     thorpej    18:
1.341     lukem      19: #
1.418     cl         20: # Subdirectory used below ${RELEASEDIR} when building a release
                     21: #
                     22: RELEASEMACHINEDIR?=    ${MACHINE}
                     23:
                     24: #
                     25: # Subdirectory or path component used for the following paths:
                     26: #   distrib/${RELEASEMACHINE}
                     27: #   distrib/notes/${RELEASEMACHINE}
                     28: #   etc/etc.${RELEASEMACHINE}
                     29: # Used when building a release.
                     30: #
                     31: RELEASEMACHINE?=       ${MACHINE}
                     32:
                     33: #
1.209     tv         34: # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
                     35: # ensure that things defined by <bsd.own.mk> (default targets,
                     36: # INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
1.341     lukem      37: #
1.209     tv         38: NEED_OWN_INSTALL_TARGET?=      yes
                     39:
1.341     lukem      40: #
1.644     skrll      41: # This lists the platforms which do not have working in-tree toolchains.  For
                     42: # the in-tree gcc toolchain, this list is empty.
                     43: #
                     44: # If some future port is not supported by the in-tree toolchain, this should
                     45: # be set to "yes" for that port only.
1.341     lukem      46: #
1.911     martin     47: # .if ${MACHINE} == "playstation2"
                     48: # TOOLCHAIN_MISSING?=  yes
                     49: # .endif
1.817     mrg        50:
1.448     mrg        51: TOOLCHAIN_MISSING?=    no
1.221     thorpej    52:
1.831     justin     53: .if ${MACHINE_CPU} == "aarch64" && !defined(EXTERNAL_TOOLCHAIN) && ${MKLLVM:Uyes} != "no"
1.827     matt       54: MKLLVM?=       yes
                     55: HAVE_LLVM?=    yes
                     56: MKGCC?=                no
                     57: .endif
                     58:
1.676     mrg        59: #
1.770     mrg        60: # GCC Using platforms.
                     61: #
                     62: .if ${MKGCC:Uyes} != "no"
                     63:
1.916     mrg        64: #
                     65: # What GCC is used?
                     66: #
1.1041    mrg        67: .if \
                     68:     ${MACHINE_CPU} == "aarch64"
1.908     christos   69: HAVE_GCC?=     0
1.1034    mrg        70: .elif \
1.1045  ! mrg        71:     ${MACHINE_CPU} == "m68000" || \
        !            72:     ${MACHINE_CPU} == "m68k" || \
        !            73:     ${MACHINE_CPU} == "vax"
        !            74: HAVE_GCC?=     5
        !            75: .else
1.1033    christos   76: HAVE_GCC?=     6
1.699     abs        77: .endif
1.676     mrg        78:
1.768     mrg        79: #
1.840     mrg        80: # Platforms that can't run a modern GCC natively
                     81: .if ${MACHINE_ARCH} == "m68000"
                     82: MKGCCCMDS?=    no
                     83: .endif
                     84:
                     85: #
1.768     mrg        86: # We import the old gcc as "gcc.old" when upgrading.  EXTERNAL_GCC_SUBDIR is
                     87: # set to the relevant subdirectory in src/external/gpl3 for his HAVE_GCC.
                     88: #
1.1030    mrg        89: .if ${HAVE_GCC} == 6
                     90: EXTERNAL_GCC_SUBDIR?=  gcc
                     91: .elif ${HAVE_GCC} == 5
1.1025    mrg        92: EXTERNAL_GCC_SUBDIR?=  gcc.old
1.768     mrg        93: .else
1.1025    mrg        94: EXTERNAL_GCC_SUBDIR=?  /does/not/exist
1.768     mrg        95: .endif
1.859     matt       96: .else
                     97: MKGCCCMDS?=    no
1.770     mrg        98: .endif
                     99:
1.1031    christos  100: #
                    101: # What OpenSSL is used?
                    102: #
1.1032    christos  103: .if ${MACHINE} == "amd64" || \
1.1039    christos  104:     ${MACHINE} == "arm" || \
1.1035    christos  105:     ${MACHINE} == "i386" || \
1.1042    christos  106:     ${MACHINE_CPU} == "powerpc" || \
                    107:     ${MACHINE_CPU} == "sh3" || \
1.1038    martin    108:     ${MACHINE} == "sparc" || \
1.1036    martin    109:     ${MACHINE} == "sparc64"
1.1032    christos  110: HAVE_OPENSSL?=  11
1.1031    christos  111: .else
                    112: HAVE_OPENSSL?=  10
                    113: .endif
                    114:
                    115: .if ${HAVE_OPENSSL} == 11
                    116: EXTERNAL_OPENSSL_SUBDIR=openssl
                    117: .elif ${HAVE_OPENSSL} == 10
                    118: EXTERNAL_OPENSSL_SUBDIR=openssl.old
                    119: .else
                    120: EXTERNAL_OPENSSL_SUBDIR=/does/not/exist
                    121: .endif
                    122:
1.805     joerg     123: .if !empty(MACHINE_ARCH:Mearm*)
1.806     joerg     124: _LIBC_COMPILER_RT.${MACHINE_ARCH}=     yes
1.805     joerg     125: .endif
                    126:
1.827     matt      127: _LIBC_COMPILER_RT.aarch64=     yes
1.977     mrg       128: _LIBC_COMPILER_RT.aarch64eb=   yes
1.805     joerg     129: _LIBC_COMPILER_RT.i386=                yes
1.828     joerg     130: _LIBC_COMPILER_RT.powerpc=     yes
1.832     joerg     131: _LIBC_COMPILER_RT.powerpc64=   yes
1.903     joerg     132: _LIBC_COMPILER_RT.sparc=       yes
                    133: _LIBC_COMPILER_RT.sparc64=     yes
1.805     joerg     134: _LIBC_COMPILER_RT.x86_64=      yes
                    135:
1.836     apb       136: .if ${HAVE_LLVM:Uno} == "yes" && ${_LIBC_COMPILER_RT.${MACHINE_ARCH}:Uno} == "yes"
1.753     joerg     137: HAVE_LIBGCC?=  no
1.752     joerg     138: .else
1.753     joerg     139: HAVE_LIBGCC?=  yes
1.752     joerg     140: .endif
                    141:
1.827     matt      142:
1.810     joerg     143: # ia64 is not support
1.836     apb       144: .if ${HAVE_LLVM:Uno} == "yes" || !empty(MACHINE_ARCH:Mearm*)
1.763     joerg     145: HAVE_LIBGCC_EH?=       no
                    146: .else
                    147: HAVE_LIBGCC_EH?=       yes
                    148: .endif
                    149:
1.1027    christos  150: # Coverity does not like SSP
                    151: .if defined(COVERITY_TOP_CONFIG) || \
                    152:     ${MACHINE} == "alpha" || \
1.916     mrg       153:     ${MACHINE} == "hppa" || \
                    154:     ${MACHINE} == "ia64" || \
                    155:     ${MACHINE_CPU} == "mips"
1.721     christos  156: HAVE_SSP?=     no
                    157: .else
                    158: HAVE_SSP?=     yes
1.907     christos  159: .if !defined(NOFORT) && ${USE_FORT:Uno} != "no"
1.721     christos  160: USE_SSP?=      yes
                    161: .endif
                    162: .endif
                    163:
1.916     mrg       164: #
                    165: # What GDB is used?
                    166: #
1.1024    christos  167: HAVE_GDB?=     801
1.886     christos  168:
1.1020    christos  169: .if ${HAVE_GDB} == 801
1.967     christos  170: EXTERNAL_GDB_SUBDIR=           gdb
1.1020    christos  171: .elif ${HAVE_GDB} == 712
1.969     christos  172: EXTERNAL_GDB_SUBDIR=           gdb.old
1.894     christos  173: .else
1.967     christos  174: EXTERNAL_GDB_SUBDIR=           /does/not/exist
1.886     christos  175: .endif
                    176:
1.916     mrg       177: #
                    178: # What binutils is used?
                    179: #
1.983     christos  180: HAVE_BINUTILS?=        227
1.886     christos  181:
1.999     christos  182: .if ${HAVE_BINUTILS} == 227
                    183: EXTERNAL_BINUTILS_SUBDIR=      binutils
1.886     christos  184: .else
                    185: EXTERNAL_BINUTILS_SUBDIR=      /does/not/exist
                    186: .endif
                    187:
1.713     apb       188: .if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*)
1.489     dsl       189: .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
                    190: PRINTOBJDIR=   ${MAKE} -r -V .OBJDIR -f /dev/null xxx
                    191: .else
1.488     drochner  192: PRINTOBJDIR=   ${MAKE} -V .OBJDIR
1.489     dsl       193: .endif
1.222     perry     194: .else
1.713     apb       195: PRINTOBJDIR=   echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion
1.222     perry     196: .endif
                    197:
1.341     lukem     198: #
1.286     lukem     199: # Determine if running in the NetBSD source tree by checking for the
                    200: # existence of build.sh and tools/ in the current or a parent directory,
                    201: # and setting _SRC_TOP_ to the result.
                    202: #
1.287     lukem     203: .if !defined(_SRC_TOP_)                        # {
1.615     christos  204: _SRC_TOP_!= cd "${.CURDIR}"; while :; do \
1.200     jmc       205:                here=`pwd`; \
1.199     jmc       206:                [ -f build.sh  ] && [ -d tools ] && { echo $$here; break; }; \
                    207:                case $$here in /) echo ""; break;; esac; \
1.341     lukem     208:                cd ..; done
1.199     jmc       209:
                    210: .MAKEOVERRIDES+=       _SRC_TOP_
                    211:
1.287     lukem     212: .endif                                 # }
1.222     perry     213:
1.341     lukem     214: #
1.707     apb       215: # If _SRC_TOP_ != "", we're within the NetBSD source tree.
                    216: # * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
                    217: # * Define _NETBSD_VERSION_DEPENDS.  Targets that depend on the
                    218: #   NetBSD version, or on variables defined at build time, can
                    219: #   declare a dependency on ${_NETBSD_VERSION_DEPENDS}.
1.287     lukem     220: #
                    221: .if (${_SRC_TOP_} != "")               # {
                    222:
1.288     lukem     223: NETBSDSRCDIR?= ${_SRC_TOP_}
1.180     tv        224:
1.287     lukem     225: .if !defined(_SRC_TOP_OBJ_)
1.615     christos  226: _SRC_TOP_OBJ_!=                cd "${_SRC_TOP_}" && ${PRINTOBJDIR}
1.287     lukem     227: .MAKEOVERRIDES+=       _SRC_TOP_OBJ_
1.286     lukem     228: .endif
                    229:
1.707     apb       230: _NETBSD_VERSION_DEPENDS=       ${_SRC_TOP_OBJ_}/params
                    231: _NETBSD_VERSION_DEPENDS+=      ${NETBSDSRCDIR}/sys/sys/param.h
                    232: _NETBSD_VERSION_DEPENDS+=      ${NETBSDSRCDIR}/sys/conf/newvers.sh
                    233: _NETBSD_VERSION_DEPENDS+=      ${NETBSDSRCDIR}/sys/conf/osrelease.sh
                    234: ${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build"
                    235:
1.322     lukem     236: .endif # _SRC_TOP_ != ""               # }
1.286     lukem     237:
                    238:
1.310     thorpej   239: .if (${_SRC_TOP_} != "") && \
1.406     lukem     240:     (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
1.287     lukem     241: USETOOLS?=     yes
1.286     lukem     242: .endif
1.287     lukem     243: USETOOLS?=     no
                    244:
1.286     lukem     245:
1.468     matt      246: .if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
1.495     scw       247:     ${MACHINE_ARCH} == "sh3"
1.180     tv        248: .BEGIN:
                    249:        @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
                    250:        @false
1.310     thorpej   251: .elif defined(REQUIRETOOLS) && \
1.406     lukem     252:       (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
1.310     thorpej   253:       ${USETOOLS} == "no"
1.180     tv        254: .BEGIN:
1.203     tv        255:        @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
1.180     tv        256:        @false
                    257: .endif
                    258:
1.341     lukem     259: #
1.204     tv        260: # Host platform information; may be overridden
1.341     lukem     261: #
1.762     christos  262: .include <bsd.host.mk>
1.204     tv        263:
1.275     lukem     264: .if ${USETOOLS} == "yes"                                               # {
                    265:
1.341     lukem     266: #
1.204     tv        267: # Provide a default for TOOLDIR.
1.341     lukem     268: #
1.199     jmc       269: .if !defined(TOOLDIR)
1.339     lukem     270: TOOLDIR:=      ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
1.204     tv        271: .MAKEOVERRIDES+= TOOLDIR
1.199     jmc       272: .endif
1.180     tv        273:
1.341     lukem     274: #
1.320     thorpej   275: # This is the prefix used for the NetBSD-sourced tools.
1.341     lukem     276: #
1.320     thorpej   277: _TOOL_PREFIX?= nb
                    278:
1.341     lukem     279: #
1.318     thorpej   280: # If an external toolchain base is specified, use it.
1.341     lukem     281: #
                    282: .if defined(EXTERNAL_TOOLCHAIN)                                                # {
1.318     thorpej   283: AR=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
                    284: AS=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
                    285: LD=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
                    286: NM=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
                    287: OBJCOPY=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
                    288: OBJDUMP=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
                    289: RANLIB=                ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
1.854     pooka     290: READELF=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-readelf
1.318     thorpej   291: SIZE=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
1.854     pooka     292: STRINGS=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strings
1.318     thorpej   293: STRIP=         ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
                    294:
1.667     joerg     295: TOOL_CC.gcc=           ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
                    296: TOOL_CPP.gcc=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
                    297: TOOL_CXX.gcc=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
                    298: TOOL_FC.gcc=           ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
                    299: TOOL_OBJC.gcc=         ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
1.714     pooka     300:
                    301: TOOL_CC.clang=         ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
                    302: TOOL_CPP.clang=                ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
                    303: TOOL_CXX.clang=                ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++
                    304: TOOL_OBJC.clang=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
1.341     lukem     305: .else                                                                  # } {
1.204     tv        306: # Define default locations for common tools.
1.341     lukem     307: .if ${USETOOLS_BINUTILS:Uyes} == "yes"                                 #  {
1.232     tv        308: AR=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
                    309: AS=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
1.234     thorpej   310: LD=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
                    311: NM=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
                    312: OBJCOPY=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
                    313: OBJDUMP=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
                    314: RANLIB=                ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
1.854     pooka     315: READELF=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-readelf
1.234     thorpej   316: SIZE=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
1.854     pooka     317: STRINGS=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strings
1.234     thorpej   318: STRIP=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
                    319:
1.667     joerg     320: # GCC supports C, C++, Fortran and Objective C
                    321: TOOL_CC.gcc=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
                    322: TOOL_CPP.gcc=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
                    323: TOOL_CXX.gcc=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
                    324: TOOL_FC.gcc=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
                    325: TOOL_OBJC.gcc=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
1.341     lukem     326: .endif                                                                 #  }
1.519     gmcgarry  327:
1.667     joerg     328: # Clang supports C, C++ and Objective C
                    329: TOOL_CC.clang=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
                    330: TOOL_CPP.clang=                ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
                    331: TOOL_CXX.clang=                ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
                    332: TOOL_OBJC.clang=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
                    333:
                    334: # PCC supports C and Fortran
                    335: TOOL_CC.pcc=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
1.900     plunky    336: TOOL_CPP.pcc=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcpp
1.824     plunky    337: TOOL_CXX.pcc=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-p++
1.519     gmcgarry  338:
1.662     joerg     339: #
                    340: # Make sure DESTDIR is set, so that builds with these tools always
                    341: # get appropriate -nostdinc, -nostdlib, etc. handling.  The default is
                    342: # <empty string>, meaning start from /, the root directory.
                    343: #
                    344: DESTDIR?=
                    345:
1.1029    christos  346: # Don't append another copy of sysroot (coming from COMPATCPPFLAGS etc.
                    347: # because it confuses Coverity. Still we need to cov-configure specially
                    348: # for each specific sysroot argument.
1.662     joerg     349: .if !defined(HOSTPROG) && !defined(HOSTLIB)
                    350: .  if ${DESTDIR} != ""
1.1029    christos  351: .      if empty(CPPFLAGS:M*--sysroot=*)
1.659     mrg       352: CPPFLAGS+=     --sysroot=${DESTDIR}
1.1027    christos  353: .      endif
1.657     christos  354: LDFLAGS+=      --sysroot=${DESTDIR}
1.662     joerg     355: .  else
1.1029    christos  356: .      if empty(CPPFLAGS:M*--sysroot=*)
1.661     christos  357: CPPFLAGS+=     --sysroot=/
1.1027    christos  358: .      endif
1.661     christos  359: LDFLAGS+=      --sysroot=/
1.662     joerg     360: .  endif
1.657     christos  361: .endif
1.341     lukem     362: .endif # EXTERNAL_TOOLCHAIN                                            # }
1.234     thorpej   363:
1.210     thorpej   364: DBSYM=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
1.675     tsutsui   365: ELF2AOUT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
1.320     thorpej   366: ELF2ECOFF=     ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
1.496     joerg     367: INSTALL=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
1.320     thorpej   368: LEX=           ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
1.215     tv        369: LINT=          CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
1.338     lukem     370: LORDER=                NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
1.320     thorpej   371: MKDEP=         CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
1.754     mrg       372: MKDEPCXX=      CC=${CXX:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
1.483     christos  373: PAXCTL=                ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
1.320     thorpej   374: TSORT=         ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
                    375: YACC=          ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
1.338     lukem     376:
1.426     jmc       377: TOOL_AMIGAAOUT2BB=     ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
                    378: TOOL_AMIGAELF2BB=      ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
                    379: TOOL_AMIGATXLT=                ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
1.338     lukem     380: TOOL_ASN1_COMPILE=     ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
1.535     apb       381: TOOL_AWK=              ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
1.338     lukem     382: TOOL_CAP_MKDB=         ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
                    383: TOOL_CAT=              ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
                    384: TOOL_CKSUM=            ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
1.684     joerg     385: TOOL_CLANG_TBLGEN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen
1.338     lukem     386: TOOL_COMPILE_ET=       ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
                    387: TOOL_CONFIG=           ${TOOLDIR}/bin/${_TOOL_PREFIX}config
                    388: TOOL_CRUNCHGEN=                MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
                    389: TOOL_CTAGS=            ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
1.620     darran    390: TOOL_CTFCONVERT=       ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
                    391: TOOL_CTFMERGE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
1.885     christos  392: TOOL_CVSLATEST=                ${TOOLDIR}/bin/${_TOOL_PREFIX}cvslatest
1.338     lukem     393: TOOL_DB=               ${TOOLDIR}/bin/${_TOOL_PREFIX}db
1.730     matt      394: TOOL_DISKLABEL=                ${TOOLDIR}/bin/nbdisklabel
1.1010    christos  395: TOOL_DTC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}dtc
1.338     lukem     396: TOOL_EQN=              ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
1.532     apb       397: TOOL_FDISK=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
1.338     lukem     398: TOOL_FGEN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
1.439     thorpej   399: TOOL_GENASSYM=         ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
1.338     lukem     400: TOOL_GENCAT=           ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
1.446     jmc       401: TOOL_GMAKE=            ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
1.947     nonaka    402: TOOL_GPT=              ${TOOLDIR}/bin/${_TOOL_PREFIX}gpt
1.881     joerg     403: # grep exists in src/tools, but is not hooked up into the build.
                    404: #TOOL_GREP=            ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
                    405: TOOL_GREP=             grep
1.338     lukem     406: TOOL_GROFF=            PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
                    407: TOOL_HEXDUMP=          ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
1.427     jmc       408: TOOL_HP300MKBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
1.767     skrll     409: TOOL_HPPAMKBOOT=       ${TOOLDIR}/bin/${_TOOL_PREFIX}hppa-mkboot
1.338     lukem     410: TOOL_INDXBIB=          ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
                    411: TOOL_INSTALLBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
                    412: TOOL_INSTALL_INFO=     ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
1.492     apb       413: TOOL_JOIN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}join
1.684     joerg     414: TOOL_LLVM_TBLGEN=              ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
1.338     lukem     415: TOOL_M4=               ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
1.405     matt      416: TOOL_MACPPCFIXCOFF=    ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
1.338     lukem     417: TOOL_MAKEFS=           ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
                    418: TOOL_MAKEINFO=         ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
1.858     matt      419: TOOL_MAKEKEYS=         ${TOOLDIR}/bin/${_TOOL_PREFIX}makekeys
                    420: TOOL_MAKESTRS=         ${TOOLDIR}/bin/${_TOOL_PREFIX}makestrs
1.338     lukem     421: TOOL_MAKEWHATIS=       ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
1.588     joerg     422: TOOL_MANDOC_ASCII=     ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii
1.653     njoly     423: TOOL_MANDOC_HTML=      ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml
1.588     joerg     424: TOOL_MANDOC_LINT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint
1.338     lukem     425: TOOL_MDSETIMAGE=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
                    426: TOOL_MENUC=            MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
1.675     tsutsui   427: TOOL_M68KELF2AOUT=     ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
1.425     jmc       428: TOOL_MIPSELF2ECOFF=    ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
1.338     lukem     429: TOOL_MKCSMAPPER=       ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
                    430: TOOL_MKESDB=           ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
                    431: TOOL_MKLOCALE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
                    432: TOOL_MKMAGIC=          ${TOOLDIR}/bin/${_TOOL_PREFIX}file
1.723     jmcneill  433: TOOL_MKNOD=            ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod
1.338     lukem     434: TOOL_MKTEMP=           ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
1.650     matt      435: TOOL_MKUBOOTIMAGE=     ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage
1.712     jkunz     436: TOOL_ELFTOSB=          ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb
1.338     lukem     437: TOOL_MSGC=             MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
                    438: TOOL_MTREE=            ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
1.690     joerg     439: TOOL_NBPERF=           ${TOOLDIR}/bin/${_TOOL_PREFIX}perf
1.803     phx       440: TOOL_NCDCS=            ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs
1.338     lukem     441: TOOL_PAX=              ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
                    442: TOOL_PIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
1.632     mrg       443: TOOL_PIGZ=             ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz
1.599     uebayasi  444: TOOL_PKG_CREATE=       ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create
1.506     garbled   445: TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
1.338     lukem     446: TOOL_PWD_MKDB=         ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
                    447: TOOL_REFER=            ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
                    448: TOOL_ROFF_ASCII=       PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
1.818     dholland  449: TOOL_ROFF_DOCASCII=    ${TOOL_GROFF} -Tascii
                    450: TOOL_ROFF_DOCHTML=     ${TOOL_GROFF} -Thtml
1.338     lukem     451: TOOL_ROFF_DVI=         ${TOOL_GROFF} -Tdvi
1.340     lukem     452: TOOL_ROFF_HTML=                ${TOOL_GROFF} -Tlatin1 -mdoc2html
1.338     lukem     453: TOOL_ROFF_PS=          ${TOOL_GROFF} -Tps
                    454: TOOL_ROFF_RAW=         ${TOOL_GROFF} -Z
1.501     nakayama  455: TOOL_RPCGEN=           RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
1.454     gdamore   456: TOOL_SED=              ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
1.656     elric     457: TOOL_SLC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}slc
1.338     lukem     458: TOOL_SOELIM=           ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
1.882     christos  459: TOOL_SORTINFO=         ${TOOLDIR}/bin/${_TOOL_PREFIX}sortinfo
1.532     apb       460: TOOL_SPARKCRC=         ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
1.342     lukem     461: TOOL_STAT=             ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
1.530     apb       462: TOOL_STRFILE=          ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
1.338     lukem     463: TOOL_SUNLABEL=         ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
                    464: TOOL_TBL=              ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
1.616     roy       465: TOOL_TIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}tic
1.338     lukem     466: TOOL_UUDECODE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
                    467: TOOL_VGRIND=           ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
1.823     christos  468: TOOL_VFONTEDPR=                ${TOOLDIR}/libexec/${_TOOL_PREFIX}vfontedpr
1.338     lukem     469: TOOL_ZIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
1.180     tv        470:
1.538     apb       471: .else  # USETOOLS != yes                                               # } {
                    472:
1.667     joerg     473: # Clang supports C, C++ and Objective C
                    474: TOOL_CC.clang=         clang
                    475: TOOL_CPP.clang=                clang-cpp
                    476: TOOL_CXX.clang=                clang++
                    477: TOOL_OBJC.clang=       clang
                    478:
                    479: # GCC supports C, C++, Fortran and Objective C
                    480: TOOL_CC.gcc=   gcc
                    481: TOOL_CPP.gcc=  cpp
                    482: TOOL_CXX.gcc=  c++
                    483: TOOL_FC.gcc=   g77
                    484: TOOL_OBJC.gcc= gcc
                    485:
                    486: # PCC supports C and Fortran
                    487: TOOL_CC.pcc=           pcc
1.900     plunky    488: TOOL_CPP.pcc=          pcpp
1.824     plunky    489: TOOL_CXX.pcc=          p++
1.667     joerg     490:
1.538     apb       491: TOOL_AMIGAAOUT2BB=     amiga-aout2bb
                    492: TOOL_AMIGAELF2BB=      amiga-elf2bb
                    493: TOOL_AMIGATXLT=                amiga-txlt
                    494: TOOL_ASN1_COMPILE=     asn1_compile
                    495: TOOL_AWK=              awk
                    496: TOOL_CAP_MKDB=         cap_mkdb
                    497: TOOL_CAT=              cat
                    498: TOOL_CKSUM=            cksum
1.684     joerg     499: TOOL_CLANG_TBLGEN=     clang-tblgen
1.538     apb       500: TOOL_COMPILE_ET=       compile_et
                    501: TOOL_CONFIG=           config
                    502: TOOL_CRUNCHGEN=                crunchgen
                    503: TOOL_CTAGS=            ctags
1.620     darran    504: TOOL_CTFCONVERT=       ctfconvert
                    505: TOOL_CTFMERGE=         ctfmerge
1.885     christos  506: TOOL_CVSLATEST=                cvslatest
1.538     apb       507: TOOL_DB=               db
                    508: TOOL_DISKLABEL=                disklabel
                    509: TOOL_EQN=              eqn
                    510: TOOL_FDISK=            fdisk
                    511: TOOL_FGEN=             fgen
                    512: TOOL_GENASSYM=         genassym
                    513: TOOL_GENCAT=           gencat
                    514: TOOL_GMAKE=            gmake
1.947     nonaka    515: TOOL_GPT=              gpt
1.557     sketch    516: TOOL_GREP=             grep
1.538     apb       517: TOOL_GROFF=            groff
                    518: TOOL_HEXDUMP=          hexdump
                    519: TOOL_HP300MKBOOT=      hp300-mkboot
1.767     skrll     520: TOOL_HPPAMKBOOT=       hppa-mkboot
1.538     apb       521: TOOL_INDXBIB=          indxbib
                    522: TOOL_INSTALLBOOT=      installboot
                    523: TOOL_INSTALL_INFO=     install-info
                    524: TOOL_JOIN=             join
1.684     joerg     525: TOOL_LLVM_TBLGEN=      llvm-tblgen
1.538     apb       526: TOOL_M4=               m4
                    527: TOOL_MACPPCFIXCOFF=    macppc-fixcoff
                    528: TOOL_MAKEFS=           makefs
                    529: TOOL_MAKEINFO=         makeinfo
1.858     matt      530: TOOL_MAKEKEYS=         makekeys
                    531: TOOL_MAKESTRS=         makestrs
1.538     apb       532: TOOL_MAKEWHATIS=       /usr/libexec/makewhatis
1.629     joerg     533: TOOL_MANDOC_ASCII=     mandoc -Tascii
1.716     joerg     534: TOOL_MANDOC_HTML=      mandoc -Thtml
1.629     joerg     535: TOOL_MANDOC_LINT=      mandoc -Tlint
1.538     apb       536: TOOL_MDSETIMAGE=       mdsetimage
                    537: TOOL_MENUC=            menuc
1.675     tsutsui   538: TOOL_M68KELF2AOUT=     m68k-elf2aout
1.538     apb       539: TOOL_MIPSELF2ECOFF=    mips-elf2ecoff
                    540: TOOL_MKCSMAPPER=       mkcsmapper
                    541: TOOL_MKESDB=           mkesdb
                    542: TOOL_MKLOCALE=         mklocale
                    543: TOOL_MKMAGIC=          file
1.723     jmcneill  544: TOOL_MKNOD=            mknod
1.538     apb       545: TOOL_MKTEMP=           mktemp
1.650     matt      546: TOOL_MKUBOOTIMAGE=     mkubootimage
1.712     jkunz     547: TOOL_ELFTOSB=          elftosb
1.538     apb       548: TOOL_MSGC=             msgc
                    549: TOOL_MTREE=            mtree
1.616     roy       550: TOOL_NBPERF=           nbperf
1.803     phx       551: TOOL_NCDCS=            ncdcs
1.538     apb       552: TOOL_PAX=              pax
                    553: TOOL_PIC=              pic
1.632     mrg       554: TOOL_PIGZ=             pigz
1.599     uebayasi  555: TOOL_PKG_CREATE=       pkg_create
1.538     apb       556: TOOL_POWERPCMKBOOTIMAGE=       powerpc-mkbootimage
                    557: TOOL_PWD_MKDB=         pwd_mkdb
                    558: TOOL_REFER=            refer
                    559: TOOL_ROFF_ASCII=       nroff
1.818     dholland  560: TOOL_ROFF_DOCASCII=    ${TOOL_GROFF} -Tascii
                    561: TOOL_ROFF_DOCHTML=     ${TOOL_GROFF} -Thtml
1.538     apb       562: TOOL_ROFF_DVI=         ${TOOL_GROFF} -Tdvi
                    563: TOOL_ROFF_HTML=                ${TOOL_GROFF} -Tlatin1 -mdoc2html
                    564: TOOL_ROFF_PS=          ${TOOL_GROFF} -Tps
                    565: TOOL_ROFF_RAW=         ${TOOL_GROFF} -Z
                    566: TOOL_RPCGEN=           rpcgen
                    567: TOOL_SED=              sed
                    568: TOOL_SOELIM=           soelim
1.883     wiz       569: TOOL_SORTINFO=         sortinfo
1.538     apb       570: TOOL_SPARKCRC=         sparkcrc
                    571: TOOL_STAT=             stat
                    572: TOOL_STRFILE=          strfile
                    573: TOOL_SUNLABEL=         sunlabel
                    574: TOOL_TBL=              tbl
1.616     roy       575: TOOL_TIC=              tic
1.538     apb       576: TOOL_UUDECODE=         uudecode
                    577: TOOL_VGRIND=           vgrind -f
1.822     christos  578: TOOL_VFONTEDPR=                /usr/libexec/vfontedpr
1.538     apb       579: TOOL_ZIC=              zic
                    580:
                    581: .endif # USETOOLS != yes                                               # }
1.272     lukem     582:
1.890     christos  583: # Standalone code should not be compiled with PIE or CTF
                    584: # Should create a better test
                    585: .if defined(BINDIR) && ${BINDIR} == "/usr/mdec"
                    586: NOPIE=                 # defined
                    587: NOCTF=                 # defined
1.946     christos  588: .elif ${MACHINE} == "sun2"
                    589: NOPIE=                 # we don't have PIC, so no PIE
1.890     christos  590: .endif
                    591:
1.667     joerg     592: # Fallback to ensure that all variables are defined to something
                    593: TOOL_CC.false=         false
                    594: TOOL_CPP.false=                false
                    595: TOOL_CXX.false=                false
                    596: TOOL_FC.false=         false
                    597: TOOL_OBJC.false=       false
                    598:
1.817     mrg       599: AVAILABLE_COMPILER?=   ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} ${EXTERNAL_TOOLCHAIN:Dgcc} false
1.667     joerg     600:
                    601: .for _t in CC CPP CXX FC OBJC
                    602: ACTIVE_${_t}=  ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]}
                    603: SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@}
                    604: .endfor
                    605: # make bugs prevent moving this into the .for loop
                    606: CC=            ${TOOL_CC.${ACTIVE_CC}}
                    607: CPP=           ${TOOL_CPP.${ACTIVE_CPP}}
                    608: CXX=           ${TOOL_CXX.${ACTIVE_CXX}}
                    609: FC=            ${TOOL_FC.${ACTIVE_FC}}
                    610: OBJC=          ${TOOL_OBJC.${ACTIVE_OBJC}}
                    611:
1.756     matt      612: # For each ${MACHINE_CPU}, list the ports that use it.
1.827     matt      613: MACHINES.aarch64=      evbarm64
1.756     matt      614: MACHINES.alpha=                alpha
1.1028    skrll     615: MACHINES.arm=          acorn32 cats epoc32 evbarm hpcarm \
1.756     matt      616:                        iyonix netwinder shark zaurus
                    617: MACHINES.coldfire=     evbcf
                    618: MACHINES.i386=         i386
                    619: MACHINES.ia64=         ia64
1.767     skrll     620: MACHINES.hppa=         hppa
1.756     matt      621: MACHINES.m68000=       sun2
                    622: MACHINES.m68k=         amiga atari cesfic hp300 luna68k mac68k \
                    623:                        news68k next68k sun3 x68k
                    624: MACHINES.mips=         arc cobalt algor cobalt emips evbmips ews4800mips \
                    625:                        hpcmips mipsco newsmips pmax sbmips sgimips
1.835     matt      626: MACHINES.or1k=         or1k
1.756     matt      627: MACHINES.powerpc=      amigappc bebox evbppc ibmnws macppc mvmeppc \
                    628:                        ofppc prep rs6000 sandpoint
1.835     matt      629: MACHINES.riscv=                riscv
1.756     matt      630: MACHINES.sh3=          dreamcast evbsh3 hpcsh landisk mmeye
1.757     matt      631: MACHINES.sparc=                sparc sparc64
1.756     matt      632: MACHINES.sparc64=      sparc64
                    633: MACHINES.vax=          vax
                    634: MACHINES.x86_64=       amd64
                    635:
1.775     matt      636: # for crunchide & ldd, define the OBJECT_FMTS used by a MACHINE_ARCH
                    637: #
                    638: OBJECT_FMTS=
1.939     scole     639: .if    ${MACHINE_ARCH} != "alpha" && ${MACHINE_ARCH} != "ia64"
1.775     matt      640: OBJECT_FMTS+=  elf32
                    641: .endif
                    642: .if    ${MACHINE_ARCH} == "alpha" || ${MACHINE_ARCH:M*64*} != ""
                    643: OBJECT_FMTS+=  elf64
                    644: .endif
                    645:
1.674     tsutsui   646: # OBJCOPY flags to create a.out binaries for old firmware
                    647: # shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
                    648: .if ${MACHINE_CPU} == "arm"
                    649: OBJCOPY_ELF2AOUT_FLAGS?=       \
                    650:        -O a.out-arm-netbsd     \
                    651:        -R .ident               \
                    652:        -R .ARM.attributes      \
1.704     matt      653:        -R .ARM.exidx           \
1.748     martin    654:        -R .ARM.extab           \
1.899     skrll     655:        -R .SUNW_ctf            \
1.674     tsutsui   656:        -R .arm.atpcs           \
                    657:        -R .comment             \
                    658:        -R .debug_abbrev        \
1.735     matt      659:        -R .debug_aranges       \
1.674     tsutsui   660:        -R .debug_info          \
                    661:        -R .debug_line          \
                    662:        -R .debug_frame         \
                    663:        -R .debug_loc           \
                    664:        -R .debug_pubnames      \
1.735     matt      665:        -R .debug_pubtypes      \
1.837     skrll     666:        -R .debug_ranges        \
1.674     tsutsui   667:        -R .debug_str           \
1.1016    joerg     668:        -R .debug_macinfo       \
1.745     joerg     669:        -R .eh_frame            \
1.674     tsutsui   670:        -R .note.netbsd.ident
                    671: .endif
                    672:
1.341     lukem     673: #
1.272     lukem     674: # Targets to check if DESTDIR or RELEASEDIR is provided
                    675: #
                    676: .if !target(check_DESTDIR)
                    677: check_DESTDIR: .PHONY .NOTMAIN
                    678: .if !defined(DESTDIR)
                    679:        @echo "setenv DESTDIR before doing that!"
                    680:        @false
                    681: .else
                    682:        @true
                    683: .endif
                    684: .endif
                    685:
                    686: .if !target(check_RELEASEDIR)
                    687: check_RELEASEDIR: .PHONY .NOTMAIN
                    688: .if !defined(RELEASEDIR)
                    689:        @echo "setenv RELEASEDIR before doing that!"
                    690:        @false
                    691: .else
                    692:        @true
                    693: .endif
                    694: .endif
                    695:
1.341     lukem     696: #
1.287     lukem     697: # Where the system object and source trees are kept; can be configurable
                    698: # by the user in case they want them in ~/foosrc and ~/fooobj (for example).
                    699: #
                    700: BSDSRCDIR?=    /usr/src
                    701: BSDOBJDIR?=    /usr/obj
1.288     lukem     702: NETBSDSRCDIR?= ${BSDSRCDIR}
1.1       cgd       703:
1.61      lukem     704: BINGRP?=       wheel
                    705: BINOWN?=       root
1.1       cgd       706: BINMODE?=      555
1.4       mycroft   707: NONBINMODE?=   444
1.17      brezak    708:
1.646     pooka     709: # These are here mainly because we don't want suid root in case
                    710: # a Makefile defines BINMODE.
                    711: RUMPBINGRP?=   wheel
                    712: RUMPBINOWN?=   root
                    713: RUMPBINMODE?=  555
                    714: RUMPNONBINMODE?=444
                    715:
1.31      christos  716: MANDIR?=       /usr/share/man
1.61      lukem     717: MANGRP?=       wheel
                    718: MANOWN?=       root
1.4       mycroft   719: MANMODE?=      ${NONBINMODE}
1.697     joerg     720: MANINSTALL?=   ${_MANINSTALL}
1.115     tv        721:
                    722: INFODIR?=      /usr/share/info
                    723: INFOGRP?=      wheel
                    724: INFOOWN?=      root
                    725: INFOMODE?=     ${NONBINMODE}
1.4       mycroft   726:
                    727: LIBDIR?=       /usr/lib
1.315     thorpej   728:
1.4       mycroft   729: LINTLIBDIR?=   /usr/libdata/lint
                    730: LIBGRP?=       ${BINGRP}
                    731: LIBOWN?=       ${BINOWN}
                    732: LIBMODE?=      ${NONBINMODE}
                    733:
1.135     simonb    734: DOCDIR?=       /usr/share/doc
1.61      lukem     735: DOCGRP?=       wheel
                    736: DOCOWN?=       root
1.135     simonb    737: DOCMODE?=      ${NONBINMODE}
1.15      jtc       738:
                    739: NLSDIR?=       /usr/share/nls
1.61      lukem     740: NLSGRP?=       wheel
                    741: NLSOWN?=       root
1.15      jtc       742: NLSMODE?=      ${NONBINMODE}
1.25      explorer  743:
1.508     ad        744: KMODULEGRP?=   wheel
                    745: KMODULEOWN?=   root
                    746: KMODULEMODE?=  ${NONBINMODE}
                    747:
1.155     itojun    748: LOCALEDIR?=    /usr/share/locale
                    749: LOCALEGRP?=    wheel
                    750: LOCALEOWN?=    root
                    751: LOCALEMODE?=   ${NONBINMODE}
1.1       cgd       752:
1.453     rpaulo    753: FIRMWAREDIR?=  /libdata/firmware
                    754: FIRMWAREGRP?=  wheel
                    755: FIRMWAREOWN?=  root
                    756: FIRMWAREMODE?= ${NONBINMODE}
                    757:
1.465     lukem     758: DEBUGDIR?=     /usr/libdata/debug
                    759: DEBUGGRP?=     wheel
                    760: DEBUGOWN?=     root
                    761: DEBUGMODE?=    ${NONBINMODE}
                    762:
1.1004    christos  763: MKDIRMODE?=    0755
1.1005    christos  764: MKDIRPERM?=    -m ${MKDIRMODE}
1.1004    christos  765:
1.341     lukem     766: #
                    767: # Data-driven table using make variables to control how
1.264     thorpej   768: # toolchain-dependent targets and shared libraries are built
                    769: # for different platforms and object formats.
                    770: #
1.296     thorpej   771: # OBJECT_FMT:          currently either "ELF" or "a.out".
1.264     thorpej   772: #
1.499     simonb    773: # All platforms are ELF.
1.341     lukem     774: #
1.264     thorpej   775: OBJECT_FMT=    ELF
                    776:
1.341     lukem     777: #
1.310     thorpej   778: # If this platform's toolchain is missing, we obviously cannot build it.
1.341     lukem     779: #
1.406     lukem     780: .if ${TOOLCHAIN_MISSING} != "no"
1.572     skrll     781: MKBINUTILS:= no
1.310     thorpej   782: MKGDB:= no
                    783: MKGCC:= no
                    784: .endif
                    785:
1.341     lukem     786: #
1.310     thorpej   787: # If we are using an external toolchain, we can still build the target's
1.572     skrll     788: # binutils, but we cannot build GCC's support libraries, since those are
1.310     thorpej   789: # tightly-coupled to the version of GCC being used.
1.341     lukem     790: #
1.310     thorpej   791: .if defined(EXTERNAL_TOOLCHAIN)
                    792: MKGCC:= no
                    793: .endif
                    794:
1.830     matt      795: # No GDB support for aarch64
                    796: MKGDB.aarch64= no
1.977     mrg       797: MKGDB.aarch64eb=no
1.834     matt      798: MKGDB.or1k=    no
1.835     matt      799: MKGDB.riscv32= no
                    800: MKGDB.riscv64= no
1.834     matt      801:
                    802: # No kernel modules for or1k (yet)
                    803: MKKMOD.or1k=   no
1.835     matt      804: MKKMOD.riscv32=        no
                    805: MKKMOD.riscv64=        no
1.834     matt      806:
                    807: # No profiling for or1k (yet)
                    808: MKPROFILE.or1k=        no
1.835     matt      809: MKPROFILE.riscv32=no
                    810: MKPROFILE.riscv64=no
1.830     matt      811:
1.341     lukem     812: #
1.165     fredette  813: # The m68000 port is incomplete.
1.341     lukem     814: #
1.165     fredette  815: .if ${MACHINE_ARCH} == "m68000"
1.230     tv        816: NOPIC=         # defined
1.458     mrg       817: MKISCSI=       no
                    818: # XXX GCC 4 outputs mcount() calling sequences that try to load values
                    819: # from over 64KB away and this fails to assemble.
1.671     mrg       820: .if defined(HAVE_GCC)
1.458     mrg       821: NOPROFILE=     # defined
                    822: .endif
1.32      thorpej   823: .endif
1.122     simonb    824:
1.341     lukem     825: #
1.441     skrll     826: # The ia64 port is incomplete.
                    827: #
1.830     matt      828: MKLINT.ia64=   no
                    829: MKGDB.ia64=    no
1.441     skrll     830:
                    831: #
1.327     thorpej   832: # On VAX using ELF, all objects are PIC, not just shared libraries,
1.1011    joerg     833: # so don't build the _pic version. VAX has no native TLS support either,
                    834: # so differences between TLS models are not relevant.
1.341     lukem     835: #
1.830     matt      836: MKPICLIB.vax=  no
1.327     thorpej   837:
1.341     lukem     838: #
1.122     simonb    839: # Location of the file that contains the major and minor numbers of the
                    840: # version of a shared library.  If this file exists a shared library
                    841: # will be built by <bsd.lib.mk>.
1.341     lukem     842: #
1.122     simonb    843: SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
1.69      tv        844:
1.341     lukem     845: #
1.69      tv        846: # GNU sources and packages sometimes see architecture names differently.
1.341     lukem     847: #
1.827     matt      848: GNU_ARCH.aarch64eb=aarch64_be
1.739     matt      849: GNU_ARCH.coldfire=m5407
1.702     matt      850: GNU_ARCH.earm=arm
1.741     matt      851: GNU_ARCH.earmhf=arm
1.702     matt      852: GNU_ARCH.earmeb=armeb
1.722     matt      853: GNU_ARCH.earmhfeb=armeb
1.741     matt      854: GNU_ARCH.earmv4=armv4
1.742     matt      855: GNU_ARCH.earmv4eb=armv4eb
                    856: GNU_ARCH.earmv5=arm
                    857: GNU_ARCH.earmv5eb=armeb
                    858: GNU_ARCH.earmv6=armv6
                    859: GNU_ARCH.earmv6hf=armv6
                    860: GNU_ARCH.earmv6eb=armv6eb
                    861: GNU_ARCH.earmv6hfeb=armv6eb
                    862: GNU_ARCH.earmv7=armv7
                    863: GNU_ARCH.earmv7hf=armv7
1.741     matt      864: GNU_ARCH.earmv7eb=armv7eb
                    865: GNU_ARCH.earmv7hfeb=armv7eb
1.560     drochner  866: GNU_ARCH.i386=i486
                    867: GCC_CONFIG_ARCH.i386=i486
1.563     ad        868: GCC_CONFIG_TUNE.i386=nocona
                    869: GCC_CONFIG_TUNE.x86_64=nocona
1.261     thorpej   870: GNU_ARCH.m68000=m68010
1.150     itojun    871: GNU_ARCH.sh3eb=sh
1.236     thorpej   872: GNU_ARCH.sh3el=shle
1.468     matt      873: GNU_ARCH.mips64eb=mips64
1.172     tv        874: MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
1.161     tv        875:
1.341     lukem     876: #
1.161     tv        877: # In order to identify NetBSD to GNU packages, we sometimes need
                    878: # an "elf" tag for historically a.out platforms.
1.341     lukem     879: #
1.729     matt      880: .if (!empty(MACHINE_ARCH:Mearm*))
1.742     matt      881: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:C/v[4-7]//:S/earm/eabi/}
1.702     matt      882: .elif (${MACHINE_GNU_ARCH} == "arm" || \
1.294     thorpej   883:      ${MACHINE_GNU_ARCH} == "armeb" || \
1.168     matt      884:      ${MACHINE_ARCH} == "i386" || \
1.494     matt      885:      ${MACHINE_CPU} == "m68k" || \
1.235     thorpej   886:      ${MACHINE_GNU_ARCH} == "sh" || \
1.236     thorpej   887:      ${MACHINE_GNU_ARCH} == "shle" || \
1.168     matt      888:      ${MACHINE_ARCH} == "sparc" || \
                    889:      ${MACHINE_ARCH} == "vax")
1.318     thorpej   890: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
1.161     tv        891: .else
1.318     thorpej   892: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
1.161     tv        893: .endif
1.153     itojun    894:
1.759     skrll     895: .if !empty(MACHINE_ARCH:M*arm*)
1.758     joerg     896: # Flags to pass to CC for using the old APCS ABI on ARM for compat or stand.
                    897: ARM_APCS_FLAGS=        -mabi=apcs-gnu -mfloat-abi=soft
1.850     matt      898: ARM_APCS_FLAGS+=${${ACTIVE_CC} == "gcc":? -marm :}
1.758     joerg     899: ARM_APCS_FLAGS+=${${ACTIVE_CC} == "clang":? -target ${MACHINE_GNU_ARCH}--netbsdelf -B ${TOOLDIR}/${MACHINE_GNU_PLATFORM}/bin :}
                    900: .endif
                    901:
1.776     joerg     902: GENASSYM_CPPFLAGS+=    ${${ACTIVE_CC} == "clang":? -no-integrated-as :}
                    903:
1.160     tv        904: TARGETS+=      all clean cleandir depend dependall includes \
1.880     pooka     905:                install lint obj regress tags html analyze describe \
                    906:                rumpdescribe
1.485     dsl       907: PHONY_NOTMAIN =        all clean cleandir depend dependall distclean includes \
1.669     drochner  908:                install lint obj regress beforedepend afterdepend \
1.142     phil      909:                beforeinstall afterinstall realinstall realdepend realall \
1.880     pooka     910:                html subdir-all subdir-install subdir-depend analyze describe \
                    911:                rumpdescribe
1.485     dsl       912: .PHONY:                ${PHONY_NOTMAIN}
                    913: .NOTMAIN:      ${PHONY_NOTMAIN}
1.58      agc       914:
1.406     lukem     915: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.56      drochner  916: .if !target(install)
1.485     dsl       917: install:       beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
                    918: beforeinstall:
                    919: subdir-install:
                    920: realinstall:
                    921: afterinstall:
                    922: .endif
                    923: all:           realall subdir-all
                    924: subdir-all:
                    925: realall:
                    926: depend:                realdepend subdir-depend
                    927: subdir-depend:
                    928: realdepend:
                    929: distclean:     cleandir
                    930: cleandir:      clean
1.205     tv        931:
                    932: dependall:     .NOTMAIN realdepend .MAKE
1.615     christos  933:        @cd "${.CURDIR}"; ${MAKE} realall
1.132     mycroft   934: .endif
1.116     lukem     935:
1.341     lukem     936: #
1.116     lukem     937: # Define MKxxx variables (which are either yes or no) for users
1.350     lukem     938: # to set in /etc/mk.conf and override in the make environment.
1.116     lukem     939: # These should be tested with `== "no"' or `!= "no"'.
1.340     lukem     940: # The NOxxx variables should only be set by Makefiles.
1.116     lukem     941: #
1.466     lukem     942: # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
                    943: # with changes to the MK* variables here.
                    944: #
1.116     lukem     945:
1.341     lukem     946: #
1.230     tv        947: # Supported NO* options (if defined, MK* will be forced to "no",
                    948: # regardless of user's mk.conf setting).
1.341     lukem     949: #
1.503     dholland  950: # Source makefiles should set NO*, and not MK*, and must do so before
                    951: # including bsd.own.mk.
                    952: #
1.422     lukem     953: .for var in \
1.534     apb       954:        NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
1.984     christos  955:        NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB NODEBUGLIB
1.503     dholland  956: .if defined(${var})
                    957: MK${var:S/^NO//}:=     no
1.230     tv        958: .endif
                    959: .endfor
1.268     ross      960:
1.341     lukem     961: #
                    962: # Older-style variables that enabled behaviour when set.
                    963: #
                    964: .for var in MANZ UNPRIVED UPDATE
                    965: .if defined(${var})
                    966: MK${var}:=     yes
1.268     ross      967: .endif
1.341     lukem     968: .endfor
1.230     tv        969:
1.536     mrg       970: #
                    971: # MK* options which have variable defaults.
                    972: #
1.978     mrg       973: # aarch64eb is not yet supported.
                    974: #
1.779     matt      975: .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" \
                    976:     || ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" \
1.978     mrg       977:     || ${MACHINE_ARCH} == "powerpc64" || ${MACHINE_ARCH} == "aarch64" \
1.929     mrg       978:     || ${MACHINE_ARCH} == "riscv64" || !empty(MACHINE_ARCH:Mearm*)
1.852     martin    979: MKCOMPAT?=     yes
1.536     mrg       980: .else
                    981: # Don't let this build where it really isn't supported.
                    982: MKCOMPAT:=     no
1.934     mrg       983: .endif
                    984:
                    985: .if ${MKCOMPAT} == "no"
1.859     matt      986: MKCOMPATTESTS:=        no
                    987: MKCOMPATX11:=  no
1.536     mrg       988: .endif
                    989:
1.856     matt      990: .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" \
                    991:     || ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" \
                    992:     || (${MACHINE} == "evbppc" && ${MACHINE_ARCH} == "powerpc")
1.670     mrg       993: MKCOMPATMODULES?=      yes
                    994: .else
                    995: MKCOMPATMODULES:=      no
                    996: .endif
                    997:
1.341     lukem     998: #
1.1007    chs       999: # These platforms use softfloat by default.
1.647     matt     1000: #
1.1007    chs      1001: .if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
                   1002: MKSOFTFLOAT?=  yes
                   1003: .endif
                   1004:
                   1005: #
                   1006: # These platforms always use softfloat.
                   1007: #
                   1008: .if (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
1.834     matt     1009:     ${MACHINE_ARCH} == "coldfire" || ${MACHINE_CPU} == "or1k" || \
1.1007    chs      1010:     ${MACHINE} == "emips" || ${MACHINE_CPU} == "sh3"
                   1011: MKSOFTFLOAT=   yes
1.647     matt     1012: .endif
                   1013:
1.649     pooka    1014: .if ${MACHINE} == "emips"
                   1015: SOFTFLOAT_BITS=        32
                   1016: .endif
                   1017:
1.572     skrll    1018: #
1.846     pooka    1019: # We want to build zfs only for amd64 by default for now.
1.603     uebayasi 1020: #
1.846     pooka    1021: .if ${MACHINE} == "amd64"
1.621     he       1022: MKZFS?=                yes
1.603     uebayasi 1023: .endif
                   1024:
                   1025: #
1.884     riz      1026: # DTrace works on amd64, i386 and earm*
                   1027: #
                   1028: .if ${MACHINE_ARCH} == "i386" || \
                   1029:     ${MACHINE_ARCH} == "x86_64" || \
                   1030:     !empty(MACHINE_ARCH:Mearm*)
                   1031: MKDTRACE?=     yes
                   1032: MKCTF?=                yes
                   1033: .endif
1.1007    chs      1034:
1.884     riz      1035: #
1.1007    chs      1036: # PIE is enabled on many platforms by default.
1.919     christos 1037: #
1.1027    christos 1038: # Coverity does not like PIE
                   1039: .if !defined(COVERITY_TOP_CONFIG) && \
                   1040:     (${MACHINE_ARCH} == "i386" || \
1.925     christos 1041:     ${MACHINE_ARCH} == "x86_64" || \
1.948     christos 1042:     ${MACHINE_CPU} == "arm" || \
1.957     christos 1043:     ${MACHINE_CPU} == "m68k" || \
1.966     christos 1044:     ${MACHINE_CPU} == "mips" || \
1.948     christos 1045:     ${MACHINE_CPU} == "sh3" || \
1.1027    christos 1046:     ${MACHINE} == "sparc64")
1.919     christos 1047: MKPIE?=                yes
1.920     martin   1048: .else
                   1049: MKPIE?=                no
                   1050: .endif
                   1051:
1.919     christos 1052: #
1.936     christos 1053: # RELRO is enabled on i386 and amd64 by default
                   1054: #
                   1055: .if ${MACHINE_ARCH} == "i386" || \
                   1056:     ${MACHINE_ARCH} == "x86_64"
                   1057: MKRELRO?=      partial
                   1058: .else
                   1059: MKRELRO?=      no
                   1060: .endif
                   1061:
1.1018    christos 1062: .if ${MACHINE_ARCH} == "x86_64"
1.1019    christos 1063: MKSTATICPIE?=  no
1.1018    christos 1064: .else
                   1065: MKSTATICPIE?=  no
                   1066: .endif
                   1067:
1.936     christos 1068: #
1.230     tv       1069: # MK* options which default to "yes".
1.341     lukem    1070: #
1.600     uebayasi 1071: _MKVARS.yes= \
1.514     gmcgarry 1072:        MKATF \
1.572     skrll    1073:        MKBINUTILS \
1.1009    riastrad 1074:        MKCOMPLEX MKCVS MKCXX \
1.1010    christos 1075:        MKDOC MKDTC \
1.1001    christos 1076:        MKDYNAMICROOT \
1.764     matt     1077:        MKGCC MKGDB MKGROFF \
1.524     lukem    1078:        MKHESIOD MKHTML \
1.504     lukem    1079:        MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
                   1080:        MKKERBEROS \
1.570     dyoung   1081:        MKKMOD \
1.749     matt     1082:        MKLDAP MKLIBSTDCXX MKLINKLIB MKLVM \
1.695     joerg    1083:        MKMAN MKMANDOC \
1.583     tsarna   1084:        MKMDNS \
1.694     joerg    1085:        MKMAKEMANDB \
1.525     christos 1086:        MKNLS \
1.640     rmind    1087:        MKNPF \
1.504     lukem    1088:        MKOBJ \
1.664     haad     1089:        MKPAM MKPERFUSE \
1.519     gmcgarry 1090:        MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
1.703     christos 1091:        MKRUMP \
1.504     lukem    1092:        MKSHARE MKSKEY MKSTATICLIB \
1.945     christos 1093:        MKUNBOUND \
1.567     mrg      1094:        MKX11FONTS \
1.504     lukem    1095:        MKYP
1.600     uebayasi 1096: .for var in ${_MKVARS.yes}
1.830     matt     1097: ${var}?=       ${${var}.${MACHINE_ARCH}:Uyes}
1.230     tv       1098: .endfor
                   1099:
1.341     lukem    1100: #
1.764     matt     1101: # MKGCCCMDS is only valid if we are building GCC so make it dependent on that.
                   1102: #
1.765     matt     1103: _MKVARS.yes += MKGCCCMDS
1.764     matt     1104: MKGCCCMDS?=    ${MKGCC}
                   1105:
                   1106: #
1.606     he       1107: # Exceptions to the above:
                   1108: #
                   1109:
1.939     scole    1110: # Rump doesn't work yet on ia64
                   1111: .if ${MACHINE} == "ia64"
                   1112: MKRUMP=                no
                   1113: .endif
                   1114:
1.1027    christos 1115: # RUMP uses -nostdinc which coverity does not like
                   1116: # It also does not use many new files, so disable it
                   1117: .if defined(COVERITY_TOP_CONFIG)
                   1118: MKRUMP=                no
                   1119: .endif
                   1120:
1.606     he       1121: #
1.1001    christos 1122: # Build a dynamically linked /bin and /sbin, with the necessary shared
                   1123: # libraries moved from /usr/lib to /lib and the shared linker moved
                   1124: # from /usr/libexec to /lib
                   1125: #
                   1126: # Note that if the BINDIR is not /bin or /sbin, then we always use the
                   1127: # non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
                   1128: # and /sbin).  See <bsd.shlib.mk>.
                   1129: #
                   1130: # For ia64, ld.elf_so not yet implemented
                   1131: .if ${MACHINE_ARCH} == "ia64"
                   1132: MKDYNAMICROOT= no
                   1133: .endif
                   1134:
                   1135: .if defined(MKREPRO)
                   1136: MKARZERO ?= ${MKREPRO}
                   1137: .endif
                   1138:
                   1139: #
1.623     mrg      1140: # MK* options which default to "no".  Note that MKZFS has a different
1.1003    matt     1141: # default for some platforms, see above.  Please keep alphabetically
                   1142: # sorted with at most one letter per line.
1.341     lukem    1143: #
1.600     uebayasi 1144: _MKVARS.no= \
1.1001    christos 1145:        MKARZERO \
1.695     joerg    1146:        MKBSDGREP MKBSDTAR \
1.1008    riastrad 1147:        MKCATPAGES MKCOMPATTESTS MKCOMPATX11 MKCTF \
1.1003    matt     1148:        MKDEBUG MKDEBUGLIB MKDTRACE \
                   1149:        MKEXTSRC \
                   1150:        MKGROFFHTMLDOC \
                   1151:        MKKYUA \
                   1152:        MKLIBCXX MKLLD MKLLDB MKLLVM MKLINT \
                   1153:        MKMANZ MKMCLINKER \
                   1154:        MKNSD \
                   1155:        MKOBJDIRS \
                   1156:        MKPCC MKPIGZGZIP \
                   1157:        MKRADEONFIRMWARE MKREPRO \
                   1158:        MKSLJIT MKSOFTFLOAT MKSTRIPIDENT \
1.1026    jmcneill 1159:        MKTEGRAFIRMWARE MKTPM \
1.1003    matt     1160:        MKUNPRIVED MKUPDATE \
                   1161:        MKX11 MKX11MOTIF MKXORG_SERVER \
                   1162:        MKZFS
1.600     uebayasi 1163: .for var in ${_MKVARS.no}
1.830     matt     1164: ${var}?=       ${${var}.${MACHINE_ARCH}:Uno}
1.230     tv       1165: .endfor
                   1166:
1.1001    christos 1167: .if ${MACHINE_ARCH} == "i386" || \
                   1168:     ${MACHINE_ARCH} == "x86_64" || \
                   1169:     ${MACHINE_ARCH} == "sparc"
                   1170: MKSLJIT=       yes
                   1171: .endif
                   1172:
1.341     lukem    1173: #
1.733     mrg      1174: # Which platforms build the xorg-server drivers (as opposed
                   1175: # to just Xnest and Xvfb.)
                   1176: #
1.862     mrg      1177: .if ${MACHINE} == "alpha"      || \
1.734     mrg      1178:     ${MACHINE} == "amd64"      || \
1.878     phx      1179:     ${MACHINE} == "amiga"      || \
1.734     mrg      1180:     ${MACHINE} == "bebox"      || \
                   1181:     ${MACHINE} == "cats"       || \
                   1182:     ${MACHINE} == "dreamcast"  || \
                   1183:     ${MACHINE} == "ews4800mips"        || \
                   1184:     ${MACHINE} == "evbarm"     || \
                   1185:     ${MACHINE} == "evbmips"    || \
                   1186:     ${MACHINE} == "hp300"      || \
                   1187:     ${MACHINE} == "hpcarm"     || \
                   1188:     ${MACHINE} == "hpcmips"    || \
                   1189:     ${MACHINE} == "hpcsh"      || \
                   1190:     ${MACHINE} == "i386"       || \
1.876     rjs      1191:     ${MACHINE} == "ibmnws"     || \
1.734     mrg      1192:     ${MACHINE} == "luna68k"    || \
1.874     rjs      1193:     ${MACHINE} == "mac68k"     || \
1.734     mrg      1194:     ${MACHINE} == "macppc"     || \
                   1195:     ${MACHINE} == "netwinder"  || \
                   1196:     ${MACHINE} == "newsmips"   || \
                   1197:     ${MACHINE} == "prep"       || \
                   1198:     ${MACHINE} == "ofppc"      || \
                   1199:     ${MACHINE} == "sgimips"    || \
                   1200:     ${MACHINE} == "shark"      || \
                   1201:     ${MACHINE} == "sparc"      || \
                   1202:     ${MACHINE} == "sparc64"    || \
                   1203:     ${MACHINE} == "vax"                || \
1.862     mrg      1204:     ${MACHINE} == "zaurus"
1.1001    christos 1205: MKXORG_SERVER=yes
1.733     mrg      1206: .else
1.1001    christos 1207: .endif
                   1208:
                   1209: # Only install the radeon firmware on DRM-happy systems.
                   1210: .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386"
                   1211: MKRADEONFIRMWARE=              yes
1.733     mrg      1212: .endif
                   1213:
1.1026    jmcneill 1214: # Only install the tegra firmware on evbarm and evbarm64.
                   1215: .if ${MACHINE} == "evbarm" || ${MACHINE} == "evbarm64"
                   1216: MKTEGRAFIRMWARE=               yes
                   1217: .endif
                   1218:
1.733     mrg      1219: #
1.230     tv       1220: # Force some options off if their dependencies are off.
1.341     lukem    1221: #
                   1222:
1.613     matt     1223: .if ${MKCXX} == "no"
                   1224: MKATF:=                no
                   1225: MKGROFF:=      no
1.724     jmmv     1226: MKKYUA:=       no
1.613     matt     1227: .endif
                   1228:
1.340     lukem    1229: .if ${MKMAN} == "no"
1.341     lukem    1230: MKCATPAGES:=   no
1.340     lukem    1231: MKHTML:=       no
1.116     lukem    1232: .endif
                   1233:
1.697     joerg    1234: _MANINSTALL=   maninstall
                   1235: .if ${MKCATPAGES} != "no"
                   1236: _MANINSTALL+=  catinstall
                   1237: .endif
                   1238: .if ${MKHTML} != "no"
                   1239: _MANINSTALL+=  htmlinstall
                   1240: .endif
                   1241:
1.117     lukem    1242: .if ${MKLINKLIB} == "no"
1.507     lukem    1243: MKLINT:=       no
1.230     tv       1244: MKPICINSTALL:= no
                   1245: MKPROFILE:=    no
1.327     thorpej  1246: .endif
                   1247:
                   1248: .if ${MKPIC} == "no"
                   1249: MKPICLIB:=     no
1.116     lukem    1250: .endif
                   1251:
1.230     tv       1252: .if ${MKOBJ} == "no"
                   1253: MKOBJDIRS:=    no
1.116     lukem    1254: .endif
                   1255:
1.117     lukem    1256: .if ${MKSHARE} == "no"
1.230     tv       1257: MKCATPAGES:=   no
                   1258: MKDOC:=                no
                   1259: MKINFO:=       no
1.341     lukem    1260: MKHTML:=       no
1.230     tv       1261: MKMAN:=                no
                   1262: MKNLS:=                no
1.116     lukem    1263: .endif
1.276     thorpej  1264:
1.812     joerg    1265: .if !empty(MACHINE_ARCH:Mearm*)
                   1266: _NEEDS_LIBCXX.${MACHINE_ARCH}= yes
                   1267: .endif
1.903     joerg    1268: _NEEDS_LIBCXX.aarch64=         yes
1.977     mrg      1269: _NEEDS_LIBCXX.aarch64eb=       yes
1.832     joerg    1270: _NEEDS_LIBCXX.i386=            yes
                   1271: _NEEDS_LIBCXX.powerpc=         yes
                   1272: _NEEDS_LIBCXX.powerpc64=       yes
1.903     joerg    1273: _NEEDS_LIBCXX.sparc=           yes
                   1274: _NEEDS_LIBCXX.sparc64=         yes
1.832     joerg    1275: _NEEDS_LIBCXX.x86_64=          yes
1.812     joerg    1276:
                   1277: .if ${MKLLVM} == "yes" && ${_NEEDS_LIBCXX.${MACHINE_ARCH}:Uno} == "yes"
                   1278: MKLIBCXX:=     yes
                   1279: .endif
                   1280:
1.341     lukem    1281: #
                   1282: # install(1) parameters.
                   1283: #
                   1284: COPY?=         -c
                   1285: .if ${MKUPDATE} == "no"
                   1286: PRESERVE?=
                   1287: .else
                   1288: PRESERVE?=     -p
                   1289: .endif
                   1290: RENAME?=       -r
                   1291: HRDLINK?=      -l h
1.444     christos 1292: SYMLINK?=      -l s
1.341     lukem    1293:
                   1294: METALOG?=      ${DESTDIR}/METALOG
                   1295: METALOG.add?=  ${TOOL_CAT} -l >> ${METALOG}
                   1296: .if (${_SRC_TOP_} != "")       # only set INSTPRIV if inside ${NETBSDSRCDIR}
                   1297: .if ${MKUNPRIVED} != "no"
1.562     apb      1298: INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256
1.341     lukem    1299: .else
                   1300: INSTPRIV.unpriv=
                   1301: .endif
                   1302: INSTPRIV?=     ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
                   1303: .endif
1.410     lukem    1304: STRIPFLAG?=
1.341     lukem    1305:
1.406     lukem    1306: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.341     lukem    1307: INSTALL_DIR?=          ${INSTALL} ${INSTPRIV} -d
                   1308: INSTALL_FILE?=         ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
                   1309: INSTALL_LINK?=         ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
                   1310: INSTALL_SYMLINK?=      ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
                   1311: .endif
                   1312:
                   1313: #
1.351     lukem    1314: # Set defaults for the USE_xxx variables.
                   1315: #
                   1316:
                   1317: #
1.433     lukem    1318: # USE_* options which default to "no" and will be forced to "no" if their
                   1319: # corresponding MK* variable is set to "no".
                   1320: #
1.505     lukem    1321: .for var in USE_SKEY
                   1322: .if (${${var:S/USE_/MK/}} == "no")
                   1323: ${var}:= no
                   1324: .else
                   1325: ${var}?= no
                   1326: .endif
                   1327: .endfor
1.433     lukem    1328:
                   1329: #
1.351     lukem    1330: # USE_* options which default to "yes" unless their corresponding MK*
                   1331: # variable is set to "no".
1.341     lukem    1332: #
1.512     lukem    1333: .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
1.504     lukem    1334: .if (${${var:S/USE_/MK/}} == "no")
                   1335: ${var}:= no
1.276     thorpej  1336: .else
1.504     lukem    1337: ${var}?= yes
1.276     thorpej  1338: .endif
1.351     lukem    1339: .endfor
                   1340:
                   1341: #
                   1342: # USE_* options which default to "yes".
                   1343: #
1.504     lukem    1344: .for var in USE_JEMALLOC
                   1345: ${var}?= yes
1.497     ad       1346: .endfor
1.300     tron     1347:
1.341     lukem    1348: #
1.445     jmc      1349: # USE_* options which default to "no".
                   1350: #
1.639     mrg      1351: # For now, disable pigz as compressor by default
1.641     ahoka    1352: .for var in USE_PIGZGZIP USE_LIBTRE
1.639     mrg      1353: ${var}?= no
                   1354: .endfor
1.357     lukem    1355:
1.825     apb      1356: #
1.826     apb      1357: # TOOL_GZIP and friends.  These might refer to TOOL_PIGZ or to the host gzip.
1.825     apb      1358: #
1.672     matt     1359: .if ${USE_PIGZGZIP} != "no"
                   1360: TOOL_GZIP=             ${TOOL_PIGZ}
1.825     apb      1361: GZIP_N_FLAG?=          -nT
1.672     matt     1362: .else
                   1363: TOOL_GZIP=             gzip
1.825     apb      1364: GZIP_N_FLAG?=          -n
1.672     matt     1365: .endif
1.825     apb      1366: TOOL_GZIP_N=           ${TOOL_GZIP} ${GZIP_N_FLAG}
1.672     matt     1367:
1.357     lukem    1368: #
1.522     mrg      1369: # Where X11 sources are and where it is installed to.
1.357     lukem    1370: #
1.587     apb      1371: .if !defined(X11SRCDIR)
                   1372: .if exists(${NETBSDSRCDIR}/../xsrc)
1.615     christos 1373: X11SRCDIR!=            cd "${NETBSDSRCDIR}/../xsrc" && pwd
1.587     apb      1374: .else
                   1375: X11SRCDIR=             /usr/xsrc
                   1376: .endif
                   1377: .endif # !defined(X11SRCDIR)
                   1378:
1.357     lukem    1379: X11SRCDIR.local?=      ${X11SRCDIR}/local
1.522     mrg      1380: X11ROOTDIR?=           /usr/X11R7
1.357     lukem    1381: X11BINDIR?=            ${X11ROOTDIR}/bin
1.417     lukem    1382: X11ETCDIR?=            /etc/X11
1.357     lukem    1383: X11FONTDIR?=           ${X11ROOTDIR}/lib/X11/fonts
                   1384: X11INCDIR?=            ${X11ROOTDIR}/include
                   1385: X11LIBDIR?=            ${X11ROOTDIR}/lib/X11
                   1386: X11MANDIR?=            ${X11ROOTDIR}/man
1.635     mrg      1387: X11SHAREDIR?=          ${X11ROOTDIR}/share
1.858     matt     1388: X11USRLIBDIR?=         ${X11ROOTDIR}/lib${MLIBDIR:D/${MLIBDIR}}
1.417     lukem    1389:
1.516     mrg      1390: #
                   1391: # New modular-xorg based builds
                   1392: #
                   1393: X11SRCDIRMIT?=         ${X11SRCDIR}/external/mit
                   1394: .for _lib in \
                   1395:        FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
1.1012    mrg      1396:        Xdmcp Xevie Xext Xfixes Xfont Xfont2 Xft Xi Xinerama Xmu Xpresent Xpm \
1.516     mrg      1397:        Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
1.942     mrg      1398:        epoxy fontenc xkbfile xkbui Xaw Xfontcache pciaccess xcb xshmfence \
1.789     mrg      1399:        pthread-stubs
1.516     mrg      1400: X11SRCDIR.${_lib}?=            ${X11SRCDIRMIT}/lib${_lib}/dist
                   1401: .endfor
                   1402:
                   1403: .for _proto in \
                   1404:        xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
1.788     mrg      1405:        xinerama dri2 dri3 render resource record video xf86dga xf86misc \
1.635     mrg      1406:        xf86vidmode composite damage trap gl randr fontcache xf86dri \
1.788     mrg      1407:        present xcb-
1.516     mrg      1408: X11SRCDIR.${_proto}proto?=             ${X11SRCDIRMIT}/${_proto}proto/dist
                   1409: .endfor
                   1410:
1.931     mrg      1411: # During transition from xorg-server 1.10 to 1.18
1.956     mrg      1412: .if \
1.980     mrg      1413:     ${MACHINE} == "alpha"      || \
                   1414:     ${MACHINE} == "amiga"      || \
                   1415:     ${MACHINE} == "ews4800mips"        || \
                   1416:     ${MACHINE} == "hpcarm"     || \
                   1417:     ${MACHINE} == "hpcmips"    || \
                   1418:     ${MACHINE} == "hpcsh"      || \
                   1419:     ${MACHINE} == "mac68k"     || \
                   1420:     ${MACHINE} == "netwinder"  || \
                   1421:     ${MACHINE} == "newsmips"   || \
                   1422:     ${MACHINE} == "sgimips"    || \
                   1423:     ${MACHINE} == "vax"                || \
                   1424:     ${MACHINE} == "zaurus"
                   1425: HAVE_XORG_SERVER_VER?=110
                   1426: .else
1.952     jakllsch 1427: HAVE_XORG_SERVER_VER?=118
                   1428: .endif
1.941     mrg      1429:
1.944     mrg      1430: .if ${HAVE_XORG_SERVER_VER} == "118"
1.931     mrg      1431: XORG_SERVER_SUBDIR?=xorg-server
1.943     mrg      1432: . if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
                   1433: HAVE_XORG_GLAMOR?=     yes
                   1434: . endif
1.931     mrg      1435: .else
                   1436: XORG_SERVER_SUBDIR?=xorg-server.old
                   1437: .endif
                   1438:
                   1439: X11SRCDIR.xorg-server?=                ${X11SRCDIRMIT}/${XORG_SERVER_SUBDIR}/dist
1.943     mrg      1440: HAVE_XORG_GLAMOR?=     no
                   1441:
                   1442: # Build glamor extension?
1.931     mrg      1443:
1.516     mrg      1444: .for _dir in \
1.843     snj      1445:        xtrans fontconfig freetype evieext mkfontscale bdftopcf \
1.1006    snj      1446:        xorg-cf-files imake xbiff xkeyboard-config \
1.517     mrg      1447:        xbitmaps appres xeyes xev xedit sessreg pixman \
1.838     mrg      1448:        beforelight bitmap editres makedepend fonttosfnt fslsfonts fstobdf \
1.843     snj      1449:        glu glw mesa-demos MesaGLUT MesaLib MesaLib7 \
                   1450:        ico iceauth listres lndir \
1.516     mrg      1451:        luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
1.861     mrg      1452:        rstart setxkbmap showfont smproxy twm viewres \
                   1453:        x11perf xauth xcalc xclipboard \
1.843     snj      1454:        xclock xcmsdb xconsole xditview xdpyinfo xdriinfo xdm \
1.516     mrg      1455:        xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
                   1456:        xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
                   1457:        xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
                   1458:        xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
1.843     snj      1459:        xwininfo xwud xkbprint xkbevd \
                   1460:        xterm xwd xfs xfsinfo xtrap xkbutils xkbcomp \
1.1006    snj      1461:        xinput xcb-util xorg-docs \
1.516     mrg      1462:        font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
                   1463:        font-adobe-utopia-75dpi font-adobe-utopia-type1 \
                   1464:        font-alias \
                   1465:        font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
                   1466:        font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
                   1467:        font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
                   1468:        font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
                   1469:        font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
1.554     tron     1470:        font-sony-misc font-util ttf-bitstream-vera encodings
1.516     mrg      1471: X11SRCDIR.${_dir}?=            ${X11SRCDIRMIT}/${_dir}/dist
                   1472: .endfor
                   1473:
1.518     mrg      1474: .for _i in \
1.652     mrg      1475:        elographics keyboard mouse synaptics vmmouse void ws
1.518     mrg      1476: X11SRCDIR.xf86-input-${_i}?=   ${X11SRCDIRMIT}/xf86-input-${_i}/dist
                   1477: .endfor
                   1478:
1.963     mrg      1479: # xf86-video-modesetting move into the server build.
                   1480: EXTRA_DRIVERS=
                   1481: .if ${HAVE_XORG_SERVER_VER} == "118"
                   1482: X11SRCDIR.xf86-video-modesetting=${X11SRCDIR.xorg-server}/hw/xfree86/drivers/modesetting
                   1483: .else
                   1484: EXTRA_DRIVERS= modesetting
                   1485: .endif
                   1486:
1.518     mrg      1487: .for _v in \
1.942     mrg      1488:        ag10e amdgpu apm ark ast ati ati-kms chips cirrus crime \
1.879     jmcneill 1489:        geode glint i128 i740 igs imstt intel intel-old \
1.963     mrg      1490:        ${EXTRA_DRIVERS} mach64 mga \
1.988     snj      1491:        neomagic newport nouveau nsc nv openchrome pnozz \
1.942     mrg      1492:        r128 rendition \
1.626     mrg      1493:        s3 s3virge savage siliconmotion sis suncg14 \
                   1494:        suncg6 sunffb sunleo suntcx \
1.843     snj      1495:        tdfx tga trident tseng vesa vga vmware wsfb xgi
1.518     mrg      1496: X11SRCDIR.xf86-video-${_v}?=   ${X11SRCDIRMIT}/xf86-video-${_v}/dist
                   1497: .endfor
                   1498:
1.847     mrg      1499:
1.516     mrg      1500: X11DRI?=                       yes
                   1501: X11LOADABLE?=                  yes
1.374     lukem    1502:
                   1503:
                   1504: #
1.598     uebayasi 1505: # Where extsrc sources are and where it is installed to.
                   1506: #
                   1507: .if !defined(EXTSRCSRCDIR)
                   1508: .if exists(${NETBSDSRCDIR}/../extsrc)
1.615     christos 1509: EXTSRCSRCDIR!=         cd "${NETBSDSRCDIR}/../extsrc" && pwd
1.598     uebayasi 1510: .else
                   1511: EXTSRCSRCDIR=          /usr/extsrc
                   1512: .endif
                   1513: .endif # !defined(EXTSRCSRCDIR)
                   1514:
                   1515: EXTSRCROOTDIR?=                /usr/ext
                   1516: EXTSRCBINDIR?=         ${EXTSRCROOTDIR}/bin
                   1517: EXTSRCETCDIR?=         /etc/ext
                   1518: EXTSRCINCDIR?=         ${EXTSRCROOTDIR}/include
                   1519: EXTSRCLIBDIR?=         ${EXTSRCROOTDIR}/lib/ext
                   1520: EXTSRCMANDIR?=         ${EXTSRCROOTDIR}/man
                   1521: EXTSRCUSRLIBDIR?=      ${EXTSRCROOTDIR}/lib
                   1522:
                   1523: #
1.414     lukem    1524: # MAKEDIRTARGET dir target [extra make(1) params]
1.612     mrg      1525: #      run "cd $${dir} && ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}", with a pretty message
1.414     lukem    1526: #
1.612     mrg      1527: MAKEDIRTARGETENV?=
1.414     lukem    1528: MAKEDIRTARGET=\
                   1529:        @_makedirtarget() { \
                   1530:                dir="$$1"; shift; \
                   1531:                target="$$1"; shift; \
                   1532:                case "$${dir}" in \
                   1533:                /*)     this="$${dir}/"; \
                   1534:                        real="$${dir}" ;; \
                   1535:                .)      this="${_THISDIR_}"; \
                   1536:                        real="${.CURDIR}" ;; \
                   1537:                *)      this="${_THISDIR_}$${dir}/"; \
                   1538:                        real="${.CURDIR}/$${dir}" ;; \
                   1539:                esac; \
                   1540:                show=$${this:-.}; \
                   1541:                echo "$${target} ===> $${show%/}$${1:+  (with: $$@)}"; \
                   1542:                cd "$${real}" \
1.612     mrg      1543:                && ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
1.414     lukem    1544:        }; \
                   1545:        _makedirtarget
                   1546:
                   1547: #
1.374     lukem    1548: # MAKEVERBOSE support.  Levels are:
1.549     apb      1549: #      0       Minimal output ("quiet")
                   1550: #      1       Describe what is occurring
                   1551: #      2       Describe what is occurring and echo the actual command
                   1552: #      3       Ignore the effect of the "@" prefix in make commands
                   1553: #      4       Trace shell commands using the shell's -x flag
1.374     lukem    1554: #
                   1555: MAKEVERBOSE?=          2
                   1556:
                   1557: .if ${MAKEVERBOSE} == 0
                   1558: _MKMSG?=       @\#
                   1559: _MKSHMSG?=     : echo
                   1560: _MKSHECHO?=    : echo
1.380     lukem    1561: .SILENT:
1.374     lukem    1562: .elif ${MAKEVERBOSE} == 1
                   1563: _MKMSG?=       @echo '   '
                   1564: _MKSHMSG?=     echo '   '
                   1565: _MKSHECHO?=    : echo
1.380     lukem    1566: .SILENT:
1.549     apb      1567: .else  # MAKEVERBOSE >= 2
1.374     lukem    1568: _MKMSG?=       @echo '\#  '
                   1569: _MKSHMSG?=     echo '\#  '
                   1570: _MKSHECHO?=    echo
1.380     lukem    1571: .SILENT: __makeverbose_dummy_target__
1.549     apb      1572: .endif # MAKEVERBOSE >= 2
                   1573: .if ${MAKEVERBOSE} >= 3
                   1574: .MAKEFLAGS:    -dl
                   1575: .endif # ${MAKEVERBOSE} >= 3
                   1576: .if ${MAKEVERBOSE} >= 4
                   1577: .MAKEFLAGS:    -dx
                   1578: .endif # ${MAKEVERBOSE} >= 4
1.374     lukem    1579:
                   1580: _MKMSG_BUILD?=         ${_MKMSG} "  build "
                   1581: _MKMSG_CREATE?=                ${_MKMSG} " create "
                   1582: _MKMSG_COMPILE?=       ${_MKMSG} "compile "
                   1583: _MKMSG_FORMAT?=                ${_MKMSG} " format "
                   1584: _MKMSG_INSTALL?=       ${_MKMSG} "install "
                   1585: _MKMSG_LINK?=          ${_MKMSG} "   link "
                   1586: _MKMSG_LEX?=           ${_MKMSG} "    lex "
                   1587: _MKMSG_REMOVE?=                ${_MKMSG} " remove "
                   1588: _MKMSG_YACC?=          ${_MKMSG} "   yacc "
1.391     lukem    1589:
                   1590: _MKSHMSG_CREATE?=      ${_MKSHMSG} " create "
                   1591: _MKSHMSG_INSTALL?=     ${_MKSHMSG} "install "
1.374     lukem    1592:
1.394     lukem    1593: _MKTARGET_BUILD?=      ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
                   1594: _MKTARGET_CREATE?=     ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
                   1595: _MKTARGET_COMPILE?=    ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
                   1596: _MKTARGET_FORMAT?=     ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
                   1597: _MKTARGET_INSTALL?=    ${_MKMSG_INSTALL} ${.TARGET}
                   1598: _MKTARGET_LINK?=       ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
                   1599: _MKTARGET_LEX?=                ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
                   1600: _MKTARGET_REMOVE?=     ${_MKMSG_REMOVE} ${.TARGET}
                   1601: _MKTARGET_YACC?=       ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
1.64      lukem    1602:
1.592     joerg    1603: .if ${MKMANDOC} == "yes"
                   1604: TARGETS+=      lintmanpages
                   1605: .endif
                   1606:
1.855     matt     1607: TESTSBASE=     /usr/tests${MLIBDIR:D/${MLIBDIR}}
1.638     jmmv     1608:
1.897     riz      1609: # Override with tools versions if needed
                   1610: .if ${MKCTF:Uno} != "no" && !defined(NOCTF)
                   1611: CTFCONVERT=    ${TOOL_CTFCONVERT}
                   1612: CTFMERGE=      ${TOOL_CTFMERGE}
                   1613: .endif
                   1614:
1.347     lukem    1615: .endif # !defined(_BSD_OWN_MK_)

CVSweb <webmaster@jp.NetBSD.org>