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

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

CVSweb <webmaster@jp.NetBSD.org>