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

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

CVSweb <webmaster@jp.NetBSD.org>