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

1.737.2.1! riastrad    1: #      $NetBSD: bsd.own.mk,v 1.739 2013/07/19 16:52:44 matt 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.737.2.1! riastrad   17: MACHINE_CPU=   ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/coldfire/m68k/:S/m68000/m68k/:S/armeb/arm/:C/earm.*/arm/:S/earm/arm/:S/powerpc64/powerpc/}
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.448     mrg        47: TOOLCHAIN_MISSING?=    no
1.221     thorpej    48:
1.676     mrg        49: #
1.699     abs        50: # Platforms still using GCC 4.1
                     51: #
1.705     joerg      52: .if ${MKGCC:Uyes} != "no"
1.699     abs        53: .if ${MACHINE_CPU}  == "vax"
                     54: HAVE_GCC?=    4
                     55: .else
                     56: # Otherwise, default to GCC4.5
1.676     mrg        57: HAVE_GCC?=    45
1.699     abs        58: .endif
1.705     joerg      59: .endif
1.676     mrg        60:
1.643     skrll      61: .if \
1.706     matt       62:     ${MACHINE_CPU} == "arm" || \
1.643     skrll      63:     ${MACHINE_ARCH} == "i386" || \
1.737.2.1! riastrad   64:     ${MACHINE_CPU} == "m68k" || \
1.736     matt       65:     ${MACHINE_CPU} == "mips" || \
1.673     matt       66:     ${MACHINE_ARCH} == "powerpc" || \
1.698     uwe        67:     ${MACHINE_CPU} == "sh3" || \
1.737     martin     68:     ${MACHINE_ARCH} == "sparc" || \
                     69:     ${MACHINE_ARCH} == "sparc64" || \
1.735     matt       70:     ${MACHINE_ARCH} == "x86_64" || \
                     71:     ${MACHINE_ARCH} == "vax"
1.643     skrll      72: USE_COMPILERCRTSTUFF?= no
                     73: .endif
                     74: USE_COMPILERCRTSTUFF?= yes
                     75:
1.688     mrg        76: HAVE_GDB?=     7
1.456     christos   77:
1.721     christos   78: .if (${MACHINE_ARCH} == "alpha") || \
                     79:     (${MACHINE_ARCH} == "hppa") || \
                     80:     (${MACHINE_ARCH} == "ia64") || \
1.736     matt       81:     (${MACHINE_CPU} == "mips")
1.721     christos   82: HAVE_SSP?=     no
                     83: .else
                     84: HAVE_SSP?=     yes
                     85: .if ${USE_FORT:Uno} != "no"
                     86: USE_SSP?=      yes
                     87: .endif
                     88: .endif
                     89:
1.713     apb        90: .if empty(.MAKEFLAGS:tW:M*-V .OBJDIR*)
1.489     dsl        91: .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
                     92: PRINTOBJDIR=   ${MAKE} -r -V .OBJDIR -f /dev/null xxx
                     93: .else
1.488     drochner   94: PRINTOBJDIR=   ${MAKE} -V .OBJDIR
1.489     dsl        95: .endif
1.222     perry      96: .else
1.713     apb        97: PRINTOBJDIR=   echo /error/bsd.own.mk/PRINTOBJDIR # avoid infinite recursion
1.222     perry      98: .endif
                     99:
1.341     lukem     100: #
1.286     lukem     101: # Determine if running in the NetBSD source tree by checking for the
                    102: # existence of build.sh and tools/ in the current or a parent directory,
                    103: # and setting _SRC_TOP_ to the result.
                    104: #
1.287     lukem     105: .if !defined(_SRC_TOP_)                        # {
1.615     christos  106: _SRC_TOP_!= cd "${.CURDIR}"; while :; do \
1.200     jmc       107:                here=`pwd`; \
1.199     jmc       108:                [ -f build.sh  ] && [ -d tools ] && { echo $$here; break; }; \
                    109:                case $$here in /) echo ""; break;; esac; \
1.341     lukem     110:                cd ..; done
1.199     jmc       111:
                    112: .MAKEOVERRIDES+=       _SRC_TOP_
                    113:
1.287     lukem     114: .endif                                 # }
1.222     perry     115:
1.341     lukem     116: #
1.707     apb       117: # If _SRC_TOP_ != "", we're within the NetBSD source tree.
                    118: # * Set defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
                    119: # * Define _NETBSD_VERSION_DEPENDS.  Targets that depend on the
                    120: #   NetBSD version, or on variables defined at build time, can
                    121: #   declare a dependency on ${_NETBSD_VERSION_DEPENDS}.
1.287     lukem     122: #
                    123: .if (${_SRC_TOP_} != "")               # {
                    124:
1.288     lukem     125: NETBSDSRCDIR?= ${_SRC_TOP_}
1.180     tv        126:
1.287     lukem     127: .if !defined(_SRC_TOP_OBJ_)
1.615     christos  128: _SRC_TOP_OBJ_!=                cd "${_SRC_TOP_}" && ${PRINTOBJDIR}
1.287     lukem     129: .MAKEOVERRIDES+=       _SRC_TOP_OBJ_
1.286     lukem     130: .endif
                    131:
1.707     apb       132: _NETBSD_VERSION_DEPENDS=       ${_SRC_TOP_OBJ_}/params
                    133: _NETBSD_VERSION_DEPENDS+=      ${NETBSDSRCDIR}/sys/sys/param.h
                    134: _NETBSD_VERSION_DEPENDS+=      ${NETBSDSRCDIR}/sys/conf/newvers.sh
                    135: _NETBSD_VERSION_DEPENDS+=      ${NETBSDSRCDIR}/sys/conf/osrelease.sh
                    136: ${_SRC_TOP_OBJ_}/params: .NOTMAIN .OPTIONAL # created by top level "make build"
                    137:
1.322     lukem     138: .endif # _SRC_TOP_ != ""               # }
1.286     lukem     139:
                    140:
1.310     thorpej   141: .if (${_SRC_TOP_} != "") && \
1.406     lukem     142:     (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
1.287     lukem     143: USETOOLS?=     yes
1.286     lukem     144: .endif
1.287     lukem     145: USETOOLS?=     no
                    146:
1.286     lukem     147:
1.468     matt      148: .if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
1.495     scw       149:     ${MACHINE_ARCH} == "sh3"
1.180     tv        150: .BEGIN:
                    151:        @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
                    152:        @false
1.310     thorpej   153: .elif defined(REQUIRETOOLS) && \
1.406     lukem     154:       (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
1.310     thorpej   155:       ${USETOOLS} == "no"
1.180     tv        156: .BEGIN:
1.203     tv        157:        @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
1.180     tv        158:        @false
                    159: .endif
                    160:
1.341     lukem     161: #
1.204     tv        162: # Host platform information; may be overridden
1.341     lukem     163: #
1.204     tv        164: .if !defined(HOST_OSTYPE)
                    165: _HOST_OSNAME!= uname -s
                    166: _HOST_OSREL!=  uname -r
1.558     apb       167: # For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints
                    168: # something that does not look like an identifier, then use uname -m.
                    169: _HOST_ARCH!=   uname -p 2>/dev/null
1.559     apb       170: _HOST_ARCH:=   ${HOST_ARCH:tW:C/.*[^-_A-Za-z0-9].*//:S/unknown//}
1.558     apb       171: .if empty(_HOST_ARCH)
                    172: _HOST_ARCH!=   uname -m
                    173: .endif
1.421     jmc       174: HOST_OSTYPE:=  ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g}
1.204     tv        175: .MAKEOVERRIDES+= HOST_OSTYPE
1.558     apb       176: .endif # !defined(HOST_OSTYPE)
1.204     tv        177:
1.275     lukem     178: .if ${USETOOLS} == "yes"                                               # {
                    179:
1.341     lukem     180: #
1.204     tv        181: # Provide a default for TOOLDIR.
1.341     lukem     182: #
1.199     jmc       183: .if !defined(TOOLDIR)
1.339     lukem     184: TOOLDIR:=      ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
1.204     tv        185: .MAKEOVERRIDES+= TOOLDIR
1.199     jmc       186: .endif
1.180     tv        187:
1.341     lukem     188: #
1.320     thorpej   189: # This is the prefix used for the NetBSD-sourced tools.
1.341     lukem     190: #
1.320     thorpej   191: _TOOL_PREFIX?= nb
                    192:
1.341     lukem     193: #
1.318     thorpej   194: # If an external toolchain base is specified, use it.
1.341     lukem     195: #
                    196: .if defined(EXTERNAL_TOOLCHAIN)                                                # {
1.318     thorpej   197: AR=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
                    198: AS=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
                    199: LD=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
                    200: NM=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
                    201: OBJCOPY=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
                    202: OBJDUMP=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
                    203: RANLIB=                ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
                    204: SIZE=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
                    205: STRIP=         ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
                    206:
1.667     joerg     207: TOOL_CC.gcc=           ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
                    208: TOOL_CPP.gcc=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
                    209: TOOL_CXX.gcc=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
                    210: TOOL_FC.gcc=           ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
                    211: TOOL_OBJC.gcc=         ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
1.714     pooka     212:
                    213: TOOL_CC.clang=         ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
                    214: TOOL_CPP.clang=                ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
                    215: TOOL_CXX.clang=                ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang++
                    216: TOOL_OBJC.clang=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-clang
1.341     lukem     217: .else                                                                  # } {
1.204     tv        218: # Define default locations for common tools.
1.341     lukem     219: .if ${USETOOLS_BINUTILS:Uyes} == "yes"                                 #  {
1.232     tv        220: AR=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
                    221: AS=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
1.234     thorpej   222: LD=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
                    223: NM=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
                    224: OBJCOPY=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
                    225: OBJDUMP=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
                    226: RANLIB=                ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
                    227: SIZE=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
                    228: STRIP=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
                    229:
1.667     joerg     230: # GCC supports C, C++, Fortran and Objective C
                    231: TOOL_CC.gcc=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
                    232: TOOL_CPP.gcc=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
                    233: TOOL_CXX.gcc=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
                    234: TOOL_FC.gcc=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
                    235: TOOL_OBJC.gcc=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
1.341     lukem     236: .endif                                                                 #  }
1.519     gmcgarry  237:
1.667     joerg     238: # Clang supports C, C++ and Objective C
                    239: TOOL_CC.clang=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
                    240: TOOL_CPP.clang=                ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang-cpp
                    241: TOOL_CXX.clang=                ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang++
                    242: TOOL_OBJC.clang=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-clang
                    243:
                    244: # PCC supports C and Fortran
                    245: TOOL_CC.pcc=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
                    246: TOOL_CPP.pcc=          ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
1.519     gmcgarry  247:
1.662     joerg     248: #
                    249: # Make sure DESTDIR is set, so that builds with these tools always
                    250: # get appropriate -nostdinc, -nostdlib, etc. handling.  The default is
                    251: # <empty string>, meaning start from /, the root directory.
                    252: #
                    253: DESTDIR?=
                    254:
                    255: .if !defined(HOSTPROG) && !defined(HOSTLIB)
                    256: .  if ${DESTDIR} != ""
1.659     mrg       257: CPPFLAGS+=     --sysroot=${DESTDIR}
1.657     christos  258: LDFLAGS+=      --sysroot=${DESTDIR}
1.662     joerg     259: .  else
1.661     christos  260: CPPFLAGS+=     --sysroot=/
                    261: LDFLAGS+=      --sysroot=/
1.662     joerg     262: .  endif
1.657     christos  263: .endif
1.341     lukem     264: .endif # EXTERNAL_TOOLCHAIN                                            # }
1.234     thorpej   265:
1.338     lukem     266: HOST_MKDEP=    ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
                    267:
1.210     thorpej   268: DBSYM=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
1.675     tsutsui   269: ELF2AOUT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
1.320     thorpej   270: ELF2ECOFF=     ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
1.496     joerg     271: INSTALL=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
1.320     thorpej   272: LEX=           ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
1.215     tv        273: LINT=          CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
1.338     lukem     274: LORDER=                NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
1.320     thorpej   275: MKDEP=         CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
1.483     christos  276: PAXCTL=                ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
1.320     thorpej   277: TSORT=         ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
                    278: YACC=          ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
1.338     lukem     279:
1.426     jmc       280: TOOL_AMIGAAOUT2BB=     ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
                    281: TOOL_AMIGAELF2BB=      ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
                    282: TOOL_AMIGATXLT=                ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
1.338     lukem     283: TOOL_ASN1_COMPILE=     ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
1.535     apb       284: TOOL_AWK=              ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
1.338     lukem     285: TOOL_CAP_MKDB=         ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
                    286: TOOL_CAT=              ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
                    287: TOOL_CKSUM=            ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
1.684     joerg     288: TOOL_CLANG_TBLGEN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}clang-tblgen
1.338     lukem     289: TOOL_COMPILE_ET=       ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
                    290: TOOL_CONFIG=           ${TOOLDIR}/bin/${_TOOL_PREFIX}config
                    291: TOOL_CRUNCHGEN=                MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
                    292: TOOL_CTAGS=            ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
1.620     darran    293: TOOL_CTFCONVERT=       ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfconvert
                    294: TOOL_CTFMERGE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}ctfmerge
1.338     lukem     295: TOOL_DB=               ${TOOLDIR}/bin/${_TOOL_PREFIX}db
1.730     matt      296: TOOL_DISKLABEL=                ${TOOLDIR}/bin/nbdisklabel
1.338     lukem     297: TOOL_EQN=              ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
1.532     apb       298: TOOL_FDISK=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
1.338     lukem     299: TOOL_FGEN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
1.439     thorpej   300: TOOL_GENASSYM=         ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
1.338     lukem     301: TOOL_GENCAT=           ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
1.446     jmc       302: TOOL_GMAKE=            ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
1.557     sketch    303: TOOL_GREP=             ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
1.338     lukem     304: TOOL_GROFF=            PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
                    305: TOOL_HEXDUMP=          ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
1.427     jmc       306: TOOL_HP300MKBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
1.510     skrll     307: TOOL_HP700MKBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot
1.338     lukem     308: TOOL_INDXBIB=          ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
                    309: TOOL_INSTALLBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
                    310: TOOL_INSTALL_INFO=     ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
1.492     apb       311: TOOL_JOIN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}join
1.684     joerg     312: TOOL_LLVM_TBLGEN=              ${TOOLDIR}/bin/${_TOOL_PREFIX}llvm-tblgen
1.338     lukem     313: TOOL_M4=               ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
1.405     matt      314: TOOL_MACPPCFIXCOFF=    ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
1.338     lukem     315: TOOL_MAKEFS=           ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
                    316: TOOL_MAKEINFO=         ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
                    317: TOOL_MAKEWHATIS=       ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
1.588     joerg     318: TOOL_MANDOC_ASCII=     ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tascii
1.653     njoly     319: TOOL_MANDOC_HTML=      ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Thtml
1.588     joerg     320: TOOL_MANDOC_LINT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}mandoc -Tlint
1.338     lukem     321: TOOL_MDSETIMAGE=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
                    322: TOOL_MENUC=            MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
1.675     tsutsui   323: TOOL_M68KELF2AOUT=     ${TOOLDIR}/bin/${_TOOL_PREFIX}m68k-elf2aout
1.425     jmc       324: TOOL_MIPSELF2ECOFF=    ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
1.338     lukem     325: TOOL_MKCSMAPPER=       ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
                    326: TOOL_MKESDB=           ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
                    327: TOOL_MKLOCALE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
                    328: TOOL_MKMAGIC=          ${TOOLDIR}/bin/${_TOOL_PREFIX}file
1.723     jmcneill  329: TOOL_MKNOD=            ${TOOLDIR}/bin/${_TOOL_PREFIX}mknod
1.338     lukem     330: TOOL_MKTEMP=           ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
1.650     matt      331: TOOL_MKUBOOTIMAGE=     ${TOOLDIR}/bin/${_TOOL_PREFIX}mkubootimage
1.712     jkunz     332: TOOL_ELFTOSB=          ${TOOLDIR}/bin/${_TOOL_PREFIX}elftosb
1.338     lukem     333: TOOL_MSGC=             MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
                    334: TOOL_MTREE=            ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
1.690     joerg     335: TOOL_NBPERF=           ${TOOLDIR}/bin/${_TOOL_PREFIX}perf
1.338     lukem     336: TOOL_PAX=              ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
                    337: TOOL_PIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
1.632     mrg       338: TOOL_PIGZ=             ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz
1.599     uebayasi  339: TOOL_PKG_CREATE=       ${TOOLDIR}/bin/${_TOOL_PREFIX}pkg_create
1.506     garbled   340: TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
1.338     lukem     341: TOOL_PWD_MKDB=         ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
                    342: TOOL_REFER=            ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
                    343: TOOL_ROFF_ASCII=       PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
                    344: TOOL_ROFF_DVI=         ${TOOL_GROFF} -Tdvi
1.340     lukem     345: TOOL_ROFF_HTML=                ${TOOL_GROFF} -Tlatin1 -mdoc2html
1.338     lukem     346: TOOL_ROFF_PS=          ${TOOL_GROFF} -Tps
                    347: TOOL_ROFF_RAW=         ${TOOL_GROFF} -Z
1.501     nakayama  348: TOOL_RPCGEN=           RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
1.454     gdamore   349: TOOL_SED=              ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
1.656     elric     350: TOOL_SLC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}slc
1.338     lukem     351: TOOL_SOELIM=           ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
1.532     apb       352: TOOL_SPARKCRC=         ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
1.342     lukem     353: TOOL_STAT=             ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
1.530     apb       354: TOOL_STRFILE=          ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
1.338     lukem     355: TOOL_SUNLABEL=         ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
                    356: TOOL_TBL=              ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
1.616     roy       357: TOOL_TIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}tic
1.338     lukem     358: TOOL_UUDECODE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
                    359: TOOL_VGRIND=           ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
                    360: TOOL_ZIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
1.180     tv        361:
1.538     apb       362: .else  # USETOOLS != yes                                               # } {
                    363:
1.667     joerg     364: # Clang supports C, C++ and Objective C
                    365: TOOL_CC.clang=         clang
                    366: TOOL_CPP.clang=                clang-cpp
                    367: TOOL_CXX.clang=                clang++
                    368: TOOL_OBJC.clang=       clang
                    369:
                    370: # GCC supports C, C++, Fortran and Objective C
                    371: TOOL_CC.gcc=   gcc
                    372: TOOL_CPP.gcc=  cpp
                    373: TOOL_CXX.gcc=  c++
                    374: TOOL_FC.gcc=   g77
                    375: TOOL_OBJC.gcc= gcc
                    376:
                    377: # PCC supports C and Fortran
                    378: TOOL_CC.pcc=           pcc
                    379: TOOL_CPP.pcc=          /usr/libexec/pcpp
                    380:
1.538     apb       381: TOOL_AMIGAAOUT2BB=     amiga-aout2bb
                    382: TOOL_AMIGAELF2BB=      amiga-elf2bb
                    383: TOOL_AMIGATXLT=                amiga-txlt
                    384: TOOL_ASN1_COMPILE=     asn1_compile
                    385: TOOL_AWK=              awk
                    386: TOOL_CAP_MKDB=         cap_mkdb
                    387: TOOL_CAT=              cat
                    388: TOOL_CKSUM=            cksum
1.684     joerg     389: TOOL_CLANG_TBLGEN=     clang-tblgen
1.538     apb       390: TOOL_COMPILE_ET=       compile_et
                    391: TOOL_CONFIG=           config
                    392: TOOL_CRUNCHGEN=                crunchgen
                    393: TOOL_CTAGS=            ctags
1.620     darran    394: TOOL_CTFCONVERT=       ctfconvert
                    395: TOOL_CTFMERGE=         ctfmerge
1.538     apb       396: TOOL_DB=               db
                    397: TOOL_DISKLABEL=                disklabel
                    398: TOOL_EQN=              eqn
                    399: TOOL_FDISK=            fdisk
                    400: TOOL_FGEN=             fgen
                    401: TOOL_GENASSYM=         genassym
                    402: TOOL_GENCAT=           gencat
                    403: TOOL_GMAKE=            gmake
1.557     sketch    404: TOOL_GREP=             grep
1.538     apb       405: TOOL_GROFF=            groff
                    406: TOOL_HEXDUMP=          hexdump
                    407: TOOL_HP300MKBOOT=      hp300-mkboot
                    408: TOOL_HP700MKBOOT=      hp700-mkboot
                    409: TOOL_INDXBIB=          indxbib
                    410: TOOL_INSTALLBOOT=      installboot
                    411: TOOL_INSTALL_INFO=     install-info
                    412: TOOL_JOIN=             join
1.684     joerg     413: TOOL_LLVM_TBLGEN=      llvm-tblgen
1.538     apb       414: TOOL_M4=               m4
                    415: TOOL_MACPPCFIXCOFF=    macppc-fixcoff
                    416: TOOL_MAKEFS=           makefs
                    417: TOOL_MAKEINFO=         makeinfo
                    418: TOOL_MAKEWHATIS=       /usr/libexec/makewhatis
1.629     joerg     419: TOOL_MANDOC_ASCII=     mandoc -Tascii
1.716     joerg     420: TOOL_MANDOC_HTML=      mandoc -Thtml
1.629     joerg     421: TOOL_MANDOC_LINT=      mandoc -Tlint
1.538     apb       422: TOOL_MDSETIMAGE=       mdsetimage
                    423: TOOL_MENUC=            menuc
1.675     tsutsui   424: TOOL_M68KELF2AOUT=     m68k-elf2aout
1.538     apb       425: TOOL_MIPSELF2ECOFF=    mips-elf2ecoff
                    426: TOOL_MKCSMAPPER=       mkcsmapper
                    427: TOOL_MKESDB=           mkesdb
                    428: TOOL_MKLOCALE=         mklocale
                    429: TOOL_MKMAGIC=          file
1.723     jmcneill  430: TOOL_MKNOD=            mknod
1.538     apb       431: TOOL_MKTEMP=           mktemp
1.650     matt      432: TOOL_MKUBOOTIMAGE=     mkubootimage
1.712     jkunz     433: TOOL_ELFTOSB=          elftosb
1.538     apb       434: TOOL_MSGC=             msgc
                    435: TOOL_MTREE=            mtree
1.616     roy       436: TOOL_NBPERF=           nbperf
1.538     apb       437: TOOL_PAX=              pax
                    438: TOOL_PIC=              pic
1.632     mrg       439: TOOL_PIGZ=             pigz
1.599     uebayasi  440: TOOL_PKG_CREATE=       pkg_create
1.538     apb       441: TOOL_POWERPCMKBOOTIMAGE=       powerpc-mkbootimage
                    442: TOOL_PWD_MKDB=         pwd_mkdb
                    443: TOOL_REFER=            refer
                    444: TOOL_ROFF_ASCII=       nroff
                    445: TOOL_ROFF_DVI=         ${TOOL_GROFF} -Tdvi
                    446: TOOL_ROFF_HTML=                ${TOOL_GROFF} -Tlatin1 -mdoc2html
                    447: TOOL_ROFF_PS=          ${TOOL_GROFF} -Tps
                    448: TOOL_ROFF_RAW=         ${TOOL_GROFF} -Z
                    449: TOOL_RPCGEN=           rpcgen
                    450: TOOL_SED=              sed
                    451: TOOL_SOELIM=           soelim
                    452: TOOL_SPARKCRC=         sparkcrc
                    453: TOOL_STAT=             stat
                    454: TOOL_STRFILE=          strfile
                    455: TOOL_SUNLABEL=         sunlabel
                    456: TOOL_TBL=              tbl
1.616     roy       457: TOOL_TIC=              tic
1.538     apb       458: TOOL_UUDECODE=         uudecode
                    459: TOOL_VGRIND=           vgrind -f
                    460: TOOL_ZIC=              zic
                    461:
                    462: .endif # USETOOLS != yes                                               # }
1.272     lukem     463:
1.667     joerg     464: # Fallback to ensure that all variables are defined to something
                    465: TOOL_CC.false=         false
                    466: TOOL_CPP.false=                false
                    467: TOOL_CXX.false=                false
                    468: TOOL_FC.false=         false
                    469: TOOL_OBJC.false=       false
                    470:
                    471: AVAILABLE_COMPILER?=   ${HAVE_PCC:Dpcc} ${HAVE_LLVM:Dclang} ${HAVE_GCC:Dgcc} false
                    472:
                    473: .for _t in CC CPP CXX FC OBJC
                    474: ACTIVE_${_t}=  ${AVAILABLE_COMPILER:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@:[1]}
                    475: SUPPORTED_${_t}=${AVAILABLE_COMPILER:Nfalse:@.c.@ ${ !defined(UNSUPPORTED_COMPILER.${.c.}) && defined(TOOL_${_t}.${.c.}) :? ${.c.} : }@}
                    476: .endfor
                    477: # make bugs prevent moving this into the .for loop
                    478: CC=            ${TOOL_CC.${ACTIVE_CC}}
                    479: CPP=           ${TOOL_CPP.${ACTIVE_CPP}}
                    480: CXX=           ${TOOL_CXX.${ACTIVE_CXX}}
                    481: FC=            ${TOOL_FC.${ACTIVE_FC}}
                    482: OBJC=          ${TOOL_OBJC.${ACTIVE_OBJC}}
                    483:
1.718     christos  484: .if exists(/usr/bin/${TOOL_CTFCONVERT}) || exists(${TOOL_CTFCONVERT})
                    485: CTFCONVERT=    ${TOOL_CTFCONVERT}
                    486: CTFMERGE=      ${TOOL_CTFMERGE}
                    487: .endif
                    488:
1.674     tsutsui   489: # OBJCOPY flags to create a.out binaries for old firmware
                    490: # shared among src/distrib and ${MACHINE}/conf/Makefile.${MACHINE}.inc
                    491: .if ${MACHINE_CPU} == "arm"
                    492: OBJCOPY_ELF2AOUT_FLAGS?=       \
                    493:        -O a.out-arm-netbsd     \
                    494:        -R .ident               \
                    495:        -R .ARM.attributes      \
1.704     matt      496:        -R .ARM.exidx           \
1.674     tsutsui   497:        -R .arm.atpcs           \
                    498:        -R .comment             \
                    499:        -R .debug_abbrev        \
1.735     matt      500:        -R .debug_aranges       \
1.674     tsutsui   501:        -R .debug_info          \
                    502:        -R .debug_line          \
                    503:        -R .debug_frame         \
                    504:        -R .debug_loc           \
                    505:        -R .debug_pubnames      \
1.735     matt      506:        -R .debug_pubtypes      \
1.674     tsutsui   507:        -R .debug_str           \
                    508:        -R .note.netbsd.ident
                    509: .endif
                    510:
1.341     lukem     511: #
1.272     lukem     512: # Targets to check if DESTDIR or RELEASEDIR is provided
                    513: #
                    514: .if !target(check_DESTDIR)
                    515: check_DESTDIR: .PHONY .NOTMAIN
                    516: .if !defined(DESTDIR)
                    517:        @echo "setenv DESTDIR before doing that!"
                    518:        @false
                    519: .else
                    520:        @true
                    521: .endif
                    522: .endif
                    523:
                    524: .if !target(check_RELEASEDIR)
                    525: check_RELEASEDIR: .PHONY .NOTMAIN
                    526: .if !defined(RELEASEDIR)
                    527:        @echo "setenv RELEASEDIR before doing that!"
                    528:        @false
                    529: .else
                    530:        @true
                    531: .endif
                    532: .endif
                    533:
1.341     lukem     534: #
1.306     lukem     535: # Build a dynamically linked /bin and /sbin, with the necessary shared
                    536: # libraries moved from /usr/lib to /lib and the shared linker moved
                    537: # from /usr/libexec to /lib
                    538: #
1.315     thorpej   539: # Note that if the BINDIR is not /bin or /sbin, then we always use the
                    540: # non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
                    541: # and /sbin).  See <bsd.shlib.mk>.
                    542: #
1.311     lukem     543: MKDYNAMICROOT?=        yes
1.306     lukem     544:
1.341     lukem     545: #
1.287     lukem     546: # Where the system object and source trees are kept; can be configurable
                    547: # by the user in case they want them in ~/foosrc and ~/fooobj (for example).
                    548: #
                    549: BSDSRCDIR?=    /usr/src
                    550: BSDOBJDIR?=    /usr/obj
1.288     lukem     551: NETBSDSRCDIR?= ${BSDSRCDIR}
1.1       cgd       552:
1.61      lukem     553: BINGRP?=       wheel
                    554: BINOWN?=       root
1.1       cgd       555: BINMODE?=      555
1.4       mycroft   556: NONBINMODE?=   444
1.17      brezak    557:
1.646     pooka     558: # These are here mainly because we don't want suid root in case
                    559: # a Makefile defines BINMODE.
                    560: RUMPBINGRP?=   wheel
                    561: RUMPBINOWN?=   root
                    562: RUMPBINMODE?=  555
                    563: RUMPNONBINMODE?=444
                    564:
1.31      christos  565: MANDIR?=       /usr/share/man
1.61      lukem     566: MANGRP?=       wheel
                    567: MANOWN?=       root
1.4       mycroft   568: MANMODE?=      ${NONBINMODE}
1.697     joerg     569: MANINSTALL?=   ${_MANINSTALL}
1.115     tv        570:
                    571: INFODIR?=      /usr/share/info
                    572: INFOGRP?=      wheel
                    573: INFOOWN?=      root
                    574: INFOMODE?=     ${NONBINMODE}
1.4       mycroft   575:
                    576: LIBDIR?=       /usr/lib
1.315     thorpej   577:
1.4       mycroft   578: LINTLIBDIR?=   /usr/libdata/lint
                    579: LIBGRP?=       ${BINGRP}
                    580: LIBOWN?=       ${BINOWN}
                    581: LIBMODE?=      ${NONBINMODE}
                    582:
1.135     simonb    583: DOCDIR?=       /usr/share/doc
1.136     simonb    584: HTMLDOCDIR?=   /usr/share/doc/html
1.61      lukem     585: DOCGRP?=       wheel
                    586: DOCOWN?=       root
1.135     simonb    587: DOCMODE?=      ${NONBINMODE}
1.15      jtc       588:
                    589: NLSDIR?=       /usr/share/nls
1.61      lukem     590: NLSGRP?=       wheel
                    591: NLSOWN?=       root
1.15      jtc       592: NLSMODE?=      ${NONBINMODE}
1.25      explorer  593:
1.508     ad        594: KMODULEGRP?=   wheel
                    595: KMODULEOWN?=   root
                    596: KMODULEMODE?=  ${NONBINMODE}
                    597:
1.155     itojun    598: LOCALEDIR?=    /usr/share/locale
                    599: LOCALEGRP?=    wheel
                    600: LOCALEOWN?=    root
                    601: LOCALEMODE?=   ${NONBINMODE}
1.1       cgd       602:
1.453     rpaulo    603: FIRMWAREDIR?=  /libdata/firmware
                    604: FIRMWAREGRP?=  wheel
                    605: FIRMWAREOWN?=  root
                    606: FIRMWAREMODE?= ${NONBINMODE}
                    607:
1.465     lukem     608: DEBUGDIR?=     /usr/libdata/debug
                    609: DEBUGGRP?=     wheel
                    610: DEBUGOWN?=     root
                    611: DEBUGMODE?=    ${NONBINMODE}
                    612:
1.341     lukem     613: #
                    614: # Data-driven table using make variables to control how
1.264     thorpej   615: # toolchain-dependent targets and shared libraries are built
                    616: # for different platforms and object formats.
                    617: #
1.296     thorpej   618: # OBJECT_FMT:          currently either "ELF" or "a.out".
1.264     thorpej   619: #
1.499     simonb    620: # All platforms are ELF.
1.341     lukem     621: #
1.264     thorpej   622: OBJECT_FMT=    ELF
                    623:
1.341     lukem     624: #
1.310     thorpej   625: # If this platform's toolchain is missing, we obviously cannot build it.
1.341     lukem     626: #
1.406     lukem     627: .if ${TOOLCHAIN_MISSING} != "no"
1.572     skrll     628: MKBINUTILS:= no
1.310     thorpej   629: MKGDB:= no
                    630: MKGCC:= no
                    631: .endif
                    632:
1.341     lukem     633: #
1.310     thorpej   634: # If we are using an external toolchain, we can still build the target's
1.572     skrll     635: # binutils, but we cannot build GCC's support libraries, since those are
1.310     thorpej   636: # tightly-coupled to the version of GCC being used.
1.341     lukem     637: #
1.310     thorpej   638: .if defined(EXTERNAL_TOOLCHAIN)
                    639: MKGCC:= no
                    640: .endif
                    641:
1.341     lukem     642: #
1.165     fredette  643: # The m68000 port is incomplete.
1.341     lukem     644: #
1.165     fredette  645: .if ${MACHINE_ARCH} == "m68000"
1.230     tv        646: NOPIC=         # defined
1.458     mrg       647: MKISCSI=       no
                    648: # XXX GCC 4 outputs mcount() calling sequences that try to load values
                    649: # from over 64KB away and this fails to assemble.
1.671     mrg       650: .if defined(HAVE_GCC)
1.458     mrg       651: NOPROFILE=     # defined
                    652: .endif
1.32      thorpej   653: .endif
1.122     simonb    654:
1.341     lukem     655: #
1.441     skrll     656: # The ia64 port is incomplete.
                    657: #
                    658: .if ${MACHINE_ARCH} == "ia64"
                    659: MKLINT=                no
1.472     skrll     660: MKGDB=         no
1.441     skrll     661: .endif
                    662:
                    663: #
1.327     thorpej   664: # On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
                    665: # not just shared libraries, so don't build the _pic version.
1.341     lukem     666: #
1.598     uebayasi  667: .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
                    668:     ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
1.327     thorpej   669: MKPICLIB:=     no
                    670: .endif
                    671:
1.341     lukem     672: #
1.327     thorpej   673: # On VAX using ELF, all objects are PIC, not just shared libraries,
1.613     matt      674: # so don't build the _pic version.
1.341     lukem     675: #
1.494     matt      676: .if ${MACHINE_ARCH} == "vax"
                    677: MKPICLIB=      no
1.327     thorpej   678: .endif
                    679:
1.341     lukem     680: #
1.122     simonb    681: # Location of the file that contains the major and minor numbers of the
                    682: # version of a shared library.  If this file exists a shared library
                    683: # will be built by <bsd.lib.mk>.
1.341     lukem     684: #
1.122     simonb    685: SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
1.69      tv        686:
1.341     lukem     687: #
1.69      tv        688: # GNU sources and packages sometimes see architecture names differently.
1.341     lukem     689: #
1.737.2.1! riastrad  690: GNU_ARCH.coldfire=m5407
1.702     matt      691: GNU_ARCH.earm=arm
                    692: GNU_ARCH.earmeb=armeb
1.722     matt      693: GNU_ARCH.earmhf=arm
                    694: GNU_ARCH.earmhfeb=armeb
1.560     drochner  695: GNU_ARCH.i386=i486
                    696: GCC_CONFIG_ARCH.i386=i486
1.563     ad        697: GCC_CONFIG_TUNE.i386=nocona
                    698: GCC_CONFIG_TUNE.x86_64=nocona
1.261     thorpej   699: GNU_ARCH.m68000=m68010
1.150     itojun    700: GNU_ARCH.sh3eb=sh
1.236     thorpej   701: GNU_ARCH.sh3el=shle
1.468     matt      702: GNU_ARCH.mips64eb=mips64
1.172     tv        703: MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
1.161     tv        704:
1.341     lukem     705: #
1.161     tv        706: # In order to identify NetBSD to GNU packages, we sometimes need
                    707: # an "elf" tag for historically a.out platforms.
1.341     lukem     708: #
1.729     matt      709: .if (!empty(MACHINE_ARCH:Mearm*))
1.722     matt      710: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf-${MACHINE_ARCH:C/eb//:S/earm/eabi/}
1.702     matt      711: .elif (${MACHINE_GNU_ARCH} == "arm" || \
1.294     thorpej   712:      ${MACHINE_GNU_ARCH} == "armeb" || \
1.168     matt      713:      ${MACHINE_ARCH} == "i386" || \
1.494     matt      714:      ${MACHINE_CPU} == "m68k" || \
1.235     thorpej   715:      ${MACHINE_GNU_ARCH} == "sh" || \
1.236     thorpej   716:      ${MACHINE_GNU_ARCH} == "shle" || \
1.168     matt      717:      ${MACHINE_ARCH} == "sparc" || \
                    718:      ${MACHINE_ARCH} == "vax")
1.318     thorpej   719: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
1.161     tv        720: .else
1.318     thorpej   721: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
1.161     tv        722: .endif
1.153     itojun    723:
1.553     pooka     724: #
                    725: # Determine if arch uses native kernel modules with rump
                    726: #
                    727: .if ${MACHINE_ARCH} == "i386" || \
                    728:     ${MACHINE_ARCH} == "x86_64"
                    729: RUMPKMOD=      # defined
                    730: .endif
                    731:
1.160     tv        732: TARGETS+=      all clean cleandir depend dependall includes \
1.681     joerg     733:                install lint obj regress tags html analyze
1.485     dsl       734: PHONY_NOTMAIN =        all clean cleandir depend dependall distclean includes \
1.669     drochner  735:                install lint obj regress beforedepend afterdepend \
1.142     phil      736:                beforeinstall afterinstall realinstall realdepend realall \
1.681     joerg     737:                html subdir-all subdir-install subdir-depend analyze
1.485     dsl       738: .PHONY:                ${PHONY_NOTMAIN}
                    739: .NOTMAIN:      ${PHONY_NOTMAIN}
1.58      agc       740:
1.406     lukem     741: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.56      drochner  742: .if !target(install)
1.485     dsl       743: install:       beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
                    744: beforeinstall:
                    745: subdir-install:
                    746: realinstall:
                    747: afterinstall:
                    748: .endif
                    749: all:           realall subdir-all
                    750: subdir-all:
                    751: realall:
                    752: depend:                realdepend subdir-depend
                    753: subdir-depend:
                    754: realdepend:
                    755: distclean:     cleandir
                    756: cleandir:      clean
1.205     tv        757:
                    758: dependall:     .NOTMAIN realdepend .MAKE
1.615     christos  759:        @cd "${.CURDIR}"; ${MAKE} realall
1.132     mycroft   760: .endif
1.116     lukem     761:
1.341     lukem     762: #
1.116     lukem     763: # Define MKxxx variables (which are either yes or no) for users
1.350     lukem     764: # to set in /etc/mk.conf and override in the make environment.
1.116     lukem     765: # These should be tested with `== "no"' or `!= "no"'.
1.340     lukem     766: # The NOxxx variables should only be set by Makefiles.
1.116     lukem     767: #
1.466     lukem     768: # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
                    769: # with changes to the MK* variables here.
                    770: #
1.116     lukem     771:
1.341     lukem     772: #
1.230     tv        773: # Supported NO* options (if defined, MK* will be forced to "no",
                    774: # regardless of user's mk.conf setting).
1.341     lukem     775: #
1.503     dholland  776: # Source makefiles should set NO*, and not MK*, and must do so before
                    777: # including bsd.own.mk.
                    778: #
1.422     lukem     779: .for var in \
1.534     apb       780:        NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
1.503     dholland  781:        NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
                    782: .if defined(${var})
                    783: MK${var:S/^NO//}:=     no
1.230     tv        784: .endif
                    785: .endfor
1.268     ross      786:
1.341     lukem     787: #
                    788: # Older-style variables that enabled behaviour when set.
                    789: #
                    790: .for var in MANZ UNPRIVED UPDATE
                    791: .if defined(${var})
                    792: MK${var}:=     yes
1.268     ross      793: .endif
1.341     lukem     794: .endfor
1.230     tv        795:
1.536     mrg       796: #
                    797: # MK* options which have variable defaults.
                    798: #
1.613     matt      799: .if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" || \
                    800:     ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el"
1.536     mrg       801: MKCOMPAT?=     yes
1.726     matt      802: .elif !empty(MACHINE_ARCH:Mearm*)
                    803: MKCOMPAT?=     no
1.536     mrg       804: .else
                    805: # Don't let this build where it really isn't supported.
                    806: MKCOMPAT:=     no
                    807: .endif
                    808:
1.670     mrg       809: #.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "i386" || \
                    810:
                    811: .if ${MACHINE} == "evbppc"
                    812: MKCOMPATMODULES?=      yes
                    813: .else
                    814: MKCOMPATMODULES:=      no
                    815: .endif
                    816:
1.341     lukem     817: #
1.647     matt      818: # Default mips64 to softfloat now.
1.737.2.1! riastrad  819: # arm is always softfloat unless it isn't
1.649     pooka     820: # emips is always softfloat.
1.737.2.1! riastrad  821: # coldfire is always softfloat
1.647     matt      822: #
1.649     pooka     823: .if ${MACHINE_ARCH} == "mips64eb" || ${MACHINE_ARCH} == "mips64el" || \
1.722     matt      824:     (${MACHINE_CPU} == "arm" && ${MACHINE_ARCH:M*hf*} == "") || \
1.737.2.1! riastrad  825:     ${MACHINE_ARCH} == "coldfire" || \
1.722     matt      826:     ${MACHINE} == "emips"
1.647     matt      827: MKSOFTFLOAT?=  yes
                    828: .endif
                    829:
1.649     pooka     830: .if ${MACHINE} == "emips"
                    831: SOFTFLOAT_BITS=        32
                    832: .endif
                    833:
1.709     alnsn     834: .if ${MACHINE_ARCH} == "i386" || \
1.710     alnsn     835:     ${MACHINE_ARCH} == "x86_64" || \
                    836:     ${MACHINE_ARCH} == "sparc"
1.709     alnsn     837: MKSLJIT?=      yes
                    838: .else
1.715     alnsn     839: MKSLJIT?=      no
1.709     alnsn     840: .endif
                    841:
1.647     matt      842: #
1.572     skrll     843: # MK* backward compatibility.
                    844: #
                    845: .if defined(MKBFD)
                    846: MKBINUTILS?=   ${MKBFD}
                    847: .endif
                    848:
                    849: #
1.603     uebayasi  850: # We want to build zfs only for i386 and amd64 by default for now.
                    851: #
                    852: .if ${MACHINE} == "amd64" || ${MACHINE} == "i386"
1.621     he        853: MKZFS?=                yes
1.603     uebayasi  854: .endif
                    855:
                    856: #
1.230     tv        857: # MK* options which default to "yes".
1.341     lukem     858: #
1.600     uebayasi  859: _MKVARS.yes= \
1.514     gmcgarry  860:        MKATF \
1.572     skrll     861:        MKBINUTILS \
1.695     joerg     862:        MKCRYPTO MKCOMPLEX MKCVS MKCXX \
1.504     lukem     863:        MKDOC \
1.613     matt      864:        MKGCC MKGCCCMDS MKGDB MKGROFF \
1.524     lukem     865:        MKHESIOD MKHTML \
1.504     lukem     866:        MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
                    867:        MKKERBEROS \
1.570     dyoung    868:        MKKMOD \
1.728     joerg     869:        MKLDAP MKLIBSTDCXX MKLINKLIB MKLINT MKLVM \
1.695     joerg     870:        MKMAN MKMANDOC \
1.583     tsarna    871:        MKMDNS \
1.694     joerg     872:        MKMAKEMANDB \
1.525     christos  873:        MKNLS \
1.640     rmind     874:        MKNPF \
1.504     lukem     875:        MKOBJ \
1.664     haad      876:        MKPAM MKPERFUSE \
1.519     gmcgarry  877:        MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
1.703     christos  878:        MKRUMP \
1.504     lukem     879:        MKSHARE MKSKEY MKSTATICLIB \
1.567     mrg       880:        MKX11FONTS \
1.504     lukem     881:        MKYP
1.600     uebayasi  882: .for var in ${_MKVARS.yes}
1.504     lukem     883: ${var}?=       yes
1.230     tv        884: .endfor
                    885:
1.341     lukem     886: #
1.606     he        887: # Exceptions to the above:
                    888: #
1.670     mrg       889: #.if ${MACHINE} == "evbppc"
                    890: #MKKMOD=               no
                    891: #.endif
1.606     he        892:
                    893: #
1.623     mrg       894: # MK* options which default to "no".  Note that MKZFS has a different
                    895: # default for some platforms, see above.
1.341     lukem     896: #
1.600     uebayasi  897: _MKVARS.no= \
1.695     joerg     898:        MKBSDGREP MKBSDTAR \
1.700     spz       899:        MKCATPAGES MKCRYPTO_RC5 MKDEBUG \
1.663     joerg     900:        MKDEBUGLIB MKDTRACE MKEXTSRC \
1.724     jmmv      901:        MKKYUA \
1.725     joerg     902:        MKMANZ MKMCLINKER MKOBJDIRS \
1.727     joerg     903:        MKLIBCXX MKLLVM MKPCC \
1.631     mrg       904:        MKPIGZGZIP \
1.648     he        905:        MKREPRO \
1.708     christos  906:        MKSOFTFLOAT MKSTRIPIDENT MKTPM \
1.731     mbalmer   907:        MKUNPRIVED MKUPDATE MKX11 MKX11MOTIF MKZFS
1.600     uebayasi  908: .for var in ${_MKVARS.no}
1.504     lukem     909: ${var}?=no
1.230     tv        910: .endfor
                    911:
1.341     lukem     912: #
1.544     mrg       913: # Do we default to XFree86 or Xorg for this platform?
                    914: #
1.637     tsutsui   915: .if \
                    916:     ${MACHINE} == "acorn32"    || \
                    917:     ${MACHINE} == "alpha"      || \
                    918:     ${MACHINE} == "amiga"      || \
                    919:     ${MACHINE} == "ews4800mips"        || \
                    920:     ${MACHINE} == "mac68k"     || \
                    921:     ${MACHINE} == "newsmips"   || \
                    922:     ${MACHINE} == "pmax"       || \
                    923:     ${MACHINE} == "sun3"       || \
                    924:     ${MACHINE} == "x68k"
1.555     abs       925: X11FLAVOUR?=   XFree86
                    926: .else
1.544     mrg       927: X11FLAVOUR?=   Xorg
                    928: .endif
                    929:
                    930: #
1.733     mrg       931: # Which platforms build the xorg-server drivers (as opposed
                    932: # to just Xnest and Xvfb.)
                    933: #
1.734     mrg       934: .if ${X11FLAVOUR} == "Xorg"    && \
                    935:     ${MACHINE} == "alpha"      || \
                    936:     ${MACHINE} == "amd64"      || \
                    937:     ${MACHINE} == "bebox"      || \
                    938:     ${MACHINE} == "cats"       || \
                    939:     ${MACHINE} == "dreamcast"  || \
                    940:     ${MACHINE} == "ews4800mips"        || \
                    941:     ${MACHINE} == "evbarm"     || \
                    942:     ${MACHINE} == "evbmips"    || \
                    943:     ${MACHINE} == "hp300"      || \
                    944:     ${MACHINE} == "hpcarm"     || \
                    945:     ${MACHINE} == "hpcmips"    || \
                    946:     ${MACHINE} == "hpcsh"      || \
                    947:     ${MACHINE} == "i386"       || \
                    948:     ${MACHINE} == "luna68k"    || \
                    949:     ${MACHINE} == "macppc"     || \
                    950:     ${MACHINE} == "netwinder"  || \
                    951:     ${MACHINE} == "newsmips"   || \
                    952:     ${MACHINE} == "prep"       || \
                    953:     ${MACHINE} == "ofppc"      || \
                    954:     ${MACHINE} == "sgimips"    || \
                    955:     ${MACHINE} == "shark"      || \
                    956:     ${MACHINE} == "sparc"      || \
                    957:     ${MACHINE} == "sparc64"    || \
                    958:     ${MACHINE} == "vax"                || \
                    959:     ${MACHINE} == "zaurus"
                    960: MKXORG_SERVER?=yes
1.733     mrg       961: .else
1.734     mrg       962: MKXORG_SERVER?=no
1.733     mrg       963: .endif
                    964:
                    965: #
1.230     tv        966: # Force some options off if their dependencies are off.
1.341     lukem     967: #
                    968:
1.613     matt      969: .if ${MKCXX} == "no"
                    970: MKATF:=                no
                    971: MKGROFF:=      no
1.724     jmmv      972: MKKYUA:=       no
1.613     matt      973: .endif
                    974:
1.230     tv        975: .if ${MKCRYPTO} == "no"
                    976: MKKERBEROS:=   no
1.634     mrg       977: MKLDAP:=       no
1.340     lukem     978: .endif
                    979:
                    980: .if ${MKMAN} == "no"
1.341     lukem     981: MKCATPAGES:=   no
1.340     lukem     982: MKHTML:=       no
1.116     lukem     983: .endif
                    984:
1.697     joerg     985: _MANINSTALL=   maninstall
                    986: .if ${MKCATPAGES} != "no"
                    987: _MANINSTALL+=  catinstall
                    988: .endif
                    989: .if ${MKHTML} != "no"
                    990: _MANINSTALL+=  htmlinstall
                    991: .endif
                    992:
1.117     lukem     993: .if ${MKLINKLIB} == "no"
1.507     lukem     994: MKLINT:=       no
1.230     tv        995: MKPICINSTALL:= no
                    996: MKPROFILE:=    no
1.327     thorpej   997: .endif
                    998:
                    999: .if ${MKPIC} == "no"
                   1000: MKPICLIB:=     no
1.116     lukem    1001: .endif
                   1002:
1.230     tv       1003: .if ${MKOBJ} == "no"
                   1004: MKOBJDIRS:=    no
1.116     lukem    1005: .endif
                   1006:
1.117     lukem    1007: .if ${MKSHARE} == "no"
1.230     tv       1008: MKCATPAGES:=   no
                   1009: MKDOC:=                no
                   1010: MKINFO:=       no
1.341     lukem    1011: MKHTML:=       no
1.230     tv       1012: MKMAN:=                no
                   1013: MKNLS:=                no
1.116     lukem    1014: .endif
1.276     thorpej  1015:
1.341     lukem    1016: #
                   1017: # install(1) parameters.
                   1018: #
                   1019: COPY?=         -c
                   1020: .if ${MKUPDATE} == "no"
                   1021: PRESERVE?=
                   1022: .else
                   1023: PRESERVE?=     -p
                   1024: .endif
                   1025: RENAME?=       -r
                   1026: HRDLINK?=      -l h
1.444     christos 1027: SYMLINK?=      -l s
1.341     lukem    1028:
                   1029: METALOG?=      ${DESTDIR}/METALOG
                   1030: METALOG.add?=  ${TOOL_CAT} -l >> ${METALOG}
                   1031: .if (${_SRC_TOP_} != "")       # only set INSTPRIV if inside ${NETBSDSRCDIR}
                   1032: .if ${MKUNPRIVED} != "no"
1.562     apb      1033: INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256
1.341     lukem    1034: .else
                   1035: INSTPRIV.unpriv=
                   1036: .endif
                   1037: INSTPRIV?=     ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
                   1038: .endif
1.410     lukem    1039: STRIPFLAG?=
1.341     lukem    1040:
1.406     lukem    1041: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.341     lukem    1042: INSTALL_DIR?=          ${INSTALL} ${INSTPRIV} -d
                   1043: INSTALL_FILE?=         ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
                   1044: INSTALL_LINK?=         ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
                   1045: INSTALL_SYMLINK?=      ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
                   1046: HOST_INSTALL_FILE?=    ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
1.440     dyoung   1047: HOST_INSTALL_DIR?=     ${INSTALL} -d
                   1048: HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME}
1.341     lukem    1049: .endif
                   1050:
                   1051: #
1.351     lukem    1052: # Set defaults for the USE_xxx variables.
                   1053: #
                   1054:
                   1055: #
1.433     lukem    1056: # USE_* options which default to "no" and will be forced to "no" if their
                   1057: # corresponding MK* variable is set to "no".
                   1058: #
1.505     lukem    1059: .for var in USE_SKEY
                   1060: .if (${${var:S/USE_/MK/}} == "no")
                   1061: ${var}:= no
                   1062: .else
                   1063: ${var}?= no
                   1064: .endif
                   1065: .endfor
1.433     lukem    1066:
                   1067: #
1.351     lukem    1068: # USE_* options which default to "yes" unless their corresponding MK*
                   1069: # variable is set to "no".
1.341     lukem    1070: #
1.512     lukem    1071: .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
1.504     lukem    1072: .if (${${var:S/USE_/MK/}} == "no")
                   1073: ${var}:= no
1.276     thorpej  1074: .else
1.504     lukem    1075: ${var}?= yes
1.276     thorpej  1076: .endif
1.351     lukem    1077: .endfor
                   1078:
                   1079: #
                   1080: # USE_* options which default to "yes".
                   1081: #
1.504     lukem    1082: .for var in USE_JEMALLOC
                   1083: ${var}?= yes
1.497     ad       1084: .endfor
1.300     tron     1085:
1.341     lukem    1086: #
1.445     jmc      1087: # USE_* options which default to "no".
                   1088: #
1.639     mrg      1089: # For now, disable pigz as compressor by default
1.641     ahoka    1090: .for var in USE_PIGZGZIP USE_LIBTRE
1.639     mrg      1091: ${var}?= no
                   1092: .endfor
1.357     lukem    1093:
1.672     matt     1094: .if ${USE_PIGZGZIP} != "no"
                   1095: TOOL_GZIP=             ${TOOL_PIGZ}
                   1096: .else
                   1097: TOOL_GZIP=             gzip
                   1098: .endif
                   1099:
1.357     lukem    1100: #
1.522     mrg      1101: # Where X11 sources are and where it is installed to.
1.357     lukem    1102: #
1.587     apb      1103: .if !defined(X11SRCDIR)
                   1104: .if exists(${NETBSDSRCDIR}/../xsrc)
1.615     christos 1105: X11SRCDIR!=            cd "${NETBSDSRCDIR}/../xsrc" && pwd
1.587     apb      1106: .else
                   1107: X11SRCDIR=             /usr/xsrc
                   1108: .endif
                   1109: .endif # !defined(X11SRCDIR)
                   1110:
1.357     lukem    1111: X11SRCDIR.xc?=         ${X11SRCDIR}/xfree/xc
                   1112: X11SRCDIR.local?=      ${X11SRCDIR}/local
1.544     mrg      1113: .if ${X11FLAVOUR} == "Xorg"
1.522     mrg      1114: X11ROOTDIR?=           /usr/X11R7
                   1115: .else
1.357     lukem    1116: X11ROOTDIR?=           /usr/X11R6
1.522     mrg      1117: .endif
1.357     lukem    1118: X11BINDIR?=            ${X11ROOTDIR}/bin
1.417     lukem    1119: X11ETCDIR?=            /etc/X11
1.357     lukem    1120: X11FONTDIR?=           ${X11ROOTDIR}/lib/X11/fonts
                   1121: X11INCDIR?=            ${X11ROOTDIR}/include
                   1122: X11LIBDIR?=            ${X11ROOTDIR}/lib/X11
                   1123: X11MANDIR?=            ${X11ROOTDIR}/man
1.635     mrg      1124: X11SHAREDIR?=          ${X11ROOTDIR}/share
1.357     lukem    1125: X11USRLIBDIR?=         ${X11ROOTDIR}/lib
1.417     lukem    1126:
1.516     mrg      1127: #
                   1128: # New modular-xorg based builds
                   1129: #
                   1130: X11SRCDIRMIT?=         ${X11SRCDIR}/external/mit
                   1131: .for _lib in \
                   1132:        FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
1.564     mrg      1133:        Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xpm \
1.516     mrg      1134:        Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
1.635     mrg      1135:        fontenc xkbfile xkbui Xaw lbxutil Xfontcache pciaccess xcb
1.516     mrg      1136: X11SRCDIR.${_lib}?=            ${X11SRCDIRMIT}/lib${_lib}/dist
                   1137: .endfor
                   1138:
                   1139: .for _proto in \
                   1140:        xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
1.565     mrg      1141:        xinerama dri2 render resource record video xf86dga xf86misc \
1.635     mrg      1142:        xf86vidmode composite damage trap gl randr fontcache xf86dri \
                   1143:        xcb-
1.516     mrg      1144: X11SRCDIR.${_proto}proto?=             ${X11SRCDIRMIT}/${_proto}proto/dist
                   1145: .endfor
                   1146:
                   1147: .for _dir in \
                   1148:        xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
1.566     mrg      1149:        xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata xkeyboard-config \
1.517     mrg      1150:        xbitmaps appres xeyes xev xedit sessreg pixman \
1.516     mrg      1151:        beforelight bitmap editres makedepend fonttosfnt fslsfonts \
1.546     cube     1152:        fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
1.516     mrg      1153:        luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
                   1154:        setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
                   1155:        xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
                   1156:        xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
                   1157:        xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
                   1158:        xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
                   1159:        xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
                   1160:        xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
                   1161:        xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
1.732     mrg      1162:        xkeyboard-config xinput xcb-util xorg-docs \
1.516     mrg      1163:        font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
                   1164:        font-adobe-utopia-75dpi font-adobe-utopia-type1 \
                   1165:        font-alias \
                   1166:        font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
                   1167:        font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
                   1168:        font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
                   1169:        font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
                   1170:        font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
1.554     tron     1171:        font-sony-misc font-util ttf-bitstream-vera encodings
1.516     mrg      1172: X11SRCDIR.${_dir}?=            ${X11SRCDIRMIT}/${_dir}/dist
                   1173: .endfor
                   1174:
1.518     mrg      1175: .for _i in \
1.652     mrg      1176:        elographics keyboard mouse synaptics vmmouse void ws
1.518     mrg      1177: X11SRCDIR.xf86-input-${_i}?=   ${X11SRCDIRMIT}/xf86-input-${_i}/dist
                   1178: .endfor
                   1179:
                   1180: .for _v in \
1.626     mrg      1181:        ag10e apm ark ast ati chips cirrus crime \
                   1182:        geode glint i128 i740 igs imstt intel mach64 mga \
                   1183:        neomagic newport nsc nv nvxbox openchrome pnozz \
                   1184:        r128 radeonhd rendition \
                   1185:        s3 s3virge savage siliconmotion sis suncg14 \
                   1186:        suncg6 sunffb sunleo suntcx \
1.701     macallan 1187:        tdfx tga trident tseng vesa vga via vmware wsfb xgi
1.518     mrg      1188: X11SRCDIR.xf86-video-${_v}?=   ${X11SRCDIRMIT}/xf86-video-${_v}/dist
                   1189: .endfor
                   1190:
1.544     mrg      1191: .if ${X11FLAVOUR} == "Xorg"
1.516     mrg      1192: X11DRI?=                       yes
                   1193: .endif
                   1194:
                   1195: X11DRI?=                       no
                   1196: X11LOADABLE?=                  yes
1.374     lukem    1197:
                   1198:
                   1199: #
1.598     uebayasi 1200: # Where extsrc sources are and where it is installed to.
                   1201: #
                   1202: .if !defined(EXTSRCSRCDIR)
                   1203: .if exists(${NETBSDSRCDIR}/../extsrc)
1.615     christos 1204: EXTSRCSRCDIR!=         cd "${NETBSDSRCDIR}/../extsrc" && pwd
1.598     uebayasi 1205: .else
                   1206: EXTSRCSRCDIR=          /usr/extsrc
                   1207: .endif
                   1208: .endif # !defined(EXTSRCSRCDIR)
                   1209:
                   1210: EXTSRCROOTDIR?=                /usr/ext
                   1211: EXTSRCBINDIR?=         ${EXTSRCROOTDIR}/bin
                   1212: EXTSRCETCDIR?=         /etc/ext
                   1213: EXTSRCINCDIR?=         ${EXTSRCROOTDIR}/include
                   1214: EXTSRCLIBDIR?=         ${EXTSRCROOTDIR}/lib/ext
                   1215: EXTSRCMANDIR?=         ${EXTSRCROOTDIR}/man
                   1216: EXTSRCUSRLIBDIR?=      ${EXTSRCROOTDIR}/lib
                   1217:
                   1218: #
1.414     lukem    1219: # MAKEDIRTARGET dir target [extra make(1) params]
1.612     mrg      1220: #      run "cd $${dir} && ${MAKEDIRTARGETENV} ${MAKE} [params] $${target}", with a pretty message
1.414     lukem    1221: #
1.612     mrg      1222: MAKEDIRTARGETENV?=
1.414     lukem    1223: MAKEDIRTARGET=\
                   1224:        @_makedirtarget() { \
                   1225:                dir="$$1"; shift; \
                   1226:                target="$$1"; shift; \
                   1227:                case "$${dir}" in \
                   1228:                /*)     this="$${dir}/"; \
                   1229:                        real="$${dir}" ;; \
                   1230:                .)      this="${_THISDIR_}"; \
                   1231:                        real="${.CURDIR}" ;; \
                   1232:                *)      this="${_THISDIR_}$${dir}/"; \
                   1233:                        real="${.CURDIR}/$${dir}" ;; \
                   1234:                esac; \
                   1235:                show=$${this:-.}; \
                   1236:                echo "$${target} ===> $${show%/}$${1:+  (with: $$@)}"; \
                   1237:                cd "$${real}" \
1.612     mrg      1238:                && ${MAKEDIRTARGETENV} ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
1.414     lukem    1239:        }; \
                   1240:        _makedirtarget
                   1241:
                   1242: #
1.374     lukem    1243: # MAKEVERBOSE support.  Levels are:
1.549     apb      1244: #      0       Minimal output ("quiet")
                   1245: #      1       Describe what is occurring
                   1246: #      2       Describe what is occurring and echo the actual command
                   1247: #      3       Ignore the effect of the "@" prefix in make commands
                   1248: #      4       Trace shell commands using the shell's -x flag
1.374     lukem    1249: #
                   1250: MAKEVERBOSE?=          2
                   1251:
                   1252: .if ${MAKEVERBOSE} == 0
                   1253: _MKMSG?=       @\#
                   1254: _MKSHMSG?=     : echo
                   1255: _MKSHECHO?=    : echo
1.380     lukem    1256: .SILENT:
1.374     lukem    1257: .elif ${MAKEVERBOSE} == 1
                   1258: _MKMSG?=       @echo '   '
                   1259: _MKSHMSG?=     echo '   '
                   1260: _MKSHECHO?=    : echo
1.380     lukem    1261: .SILENT:
1.549     apb      1262: .else  # MAKEVERBOSE >= 2
1.374     lukem    1263: _MKMSG?=       @echo '\#  '
                   1264: _MKSHMSG?=     echo '\#  '
                   1265: _MKSHECHO?=    echo
1.380     lukem    1266: .SILENT: __makeverbose_dummy_target__
1.549     apb      1267: .endif # MAKEVERBOSE >= 2
                   1268: .if ${MAKEVERBOSE} >= 3
                   1269: .MAKEFLAGS:    -dl
                   1270: .endif # ${MAKEVERBOSE} >= 3
                   1271: .if ${MAKEVERBOSE} >= 4
                   1272: .MAKEFLAGS:    -dx
                   1273: .endif # ${MAKEVERBOSE} >= 4
1.374     lukem    1274:
                   1275: _MKMSG_BUILD?=         ${_MKMSG} "  build "
                   1276: _MKMSG_CREATE?=                ${_MKMSG} " create "
                   1277: _MKMSG_COMPILE?=       ${_MKMSG} "compile "
                   1278: _MKMSG_FORMAT?=                ${_MKMSG} " format "
                   1279: _MKMSG_INSTALL?=       ${_MKMSG} "install "
                   1280: _MKMSG_LINK?=          ${_MKMSG} "   link "
                   1281: _MKMSG_LEX?=           ${_MKMSG} "    lex "
                   1282: _MKMSG_REMOVE?=                ${_MKMSG} " remove "
                   1283: _MKMSG_YACC?=          ${_MKMSG} "   yacc "
1.391     lukem    1284:
                   1285: _MKSHMSG_CREATE?=      ${_MKSHMSG} " create "
                   1286: _MKSHMSG_INSTALL?=     ${_MKSHMSG} "install "
1.374     lukem    1287:
1.394     lukem    1288: _MKTARGET_BUILD?=      ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
                   1289: _MKTARGET_CREATE?=     ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
                   1290: _MKTARGET_COMPILE?=    ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
                   1291: _MKTARGET_FORMAT?=     ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
                   1292: _MKTARGET_INSTALL?=    ${_MKMSG_INSTALL} ${.TARGET}
                   1293: _MKTARGET_LINK?=       ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
                   1294: _MKTARGET_LEX?=                ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
                   1295: _MKTARGET_REMOVE?=     ${_MKMSG_REMOVE} ${.TARGET}
                   1296: _MKTARGET_YACC?=       ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
1.64      lukem    1297:
1.592     joerg    1298: .if ${MKMANDOC} == "yes"
                   1299: TARGETS+=      lintmanpages
                   1300: .endif
                   1301:
1.638     jmmv     1302: TESTSBASE=     /usr/tests
                   1303:
1.347     lukem    1304: .endif # !defined(_BSD_OWN_MK_)

CVSweb <webmaster@jp.NetBSD.org>