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

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

CVSweb <webmaster@jp.NetBSD.org>