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

1.564   ! mrg         1: #      $NetBSD: bsd.own.mk,v 1.563 2009/05/04 21:32:31 ad Exp $
1.64      lukem       2:
                      3: .if !defined(_BSD_OWN_MK_)
                      4: _BSD_OWN_MK_=1
1.24      thorpej     5:
1.169     tv          6: MAKECONF?=     /etc/mk.conf
1.205     tv          7: .-include "${MAKECONF}"
1.13      mycroft     8:
1.341     lukem       9: #
1.310     thorpej    10: # CPU model, derived from MACHINE_ARCH
1.341     lukem      11: #
1.495     scw        12: MACHINE_CPU=   ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
1.310     thorpej    13:
1.341     lukem      14: #
1.418     cl         15: # Subdirectory used below ${RELEASEDIR} when building a release
                     16: #
                     17: RELEASEMACHINEDIR?=    ${MACHINE}
                     18:
                     19: #
                     20: # Subdirectory or path component used for the following paths:
                     21: #   distrib/${RELEASEMACHINE}
                     22: #   distrib/notes/${RELEASEMACHINE}
                     23: #   etc/etc.${RELEASEMACHINE}
                     24: # Used when building a release.
                     25: #
                     26: RELEASEMACHINE?=       ${MACHINE}
                     27:
                     28: #
1.209     tv         29: # NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
                     30: # ensure that things defined by <bsd.own.mk> (default targets,
                     31: # INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
1.341     lukem      32: #
1.209     tv         33: NEED_OWN_INSTALL_TARGET?=      yes
                     34:
1.341     lukem      35: #
1.310     thorpej    36: # This lists the platforms which do not have working in-tree toolchains.
1.403     scw        37: # For the in-tree gcc 3.3.2 toolchain, this list is empty.
                     38: # If some future port is not supported by the in-tree toolchain, this
                     39: # should be set to "yes" for that port only.
1.341     lukem      40: #
1.448     mrg        41: TOOLCHAIN_MISSING?=    no
1.221     thorpej    42:
1.477     matt       43: # default to GCC4
1.519     gmcgarry   44: .if !defined(HAVE_GCC) && !defined(HAVE_PCC)
                     45: HAVE_GCC=      4
                     46: .endif
1.395     mrg        47:
1.493     chs        48: # default to GDB6
1.476     christos   49: HAVE_GDB?=     6
1.456     christos   50:
1.221     thorpej    51: CPPFLAG_ISYSTEM=       -isystem
1.519     gmcgarry   52: .if defined(HAVE_GCC)
1.452     mrg        53: .if ${HAVE_GCC} == 3
1.352     mrg        54: CPPFLAG_ISYSTEMXX=     -isystem-cxx
1.452     mrg        55: .else  # GCC 4
1.450     mrg        56: CPPFLAG_ISYSTEMXX=     -cxx-isystem
1.346     mrg        57: .endif
1.519     gmcgarry   58: .endif
1.184     tv         59:
1.222     perry      60: .if empty(.MAKEFLAGS:M-V*)
1.489     dsl        61: .if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
                     62: PRINTOBJDIR=   ${MAKE} -r -V .OBJDIR -f /dev/null xxx
                     63: .else
1.488     drochner   64: PRINTOBJDIR=   ${MAKE} -V .OBJDIR
1.489     dsl        65: .endif
1.222     perry      66: .else
                     67: PRINTOBJDIR=   echo # prevent infinite recursion
                     68: .endif
                     69:
1.341     lukem      70: #
1.286     lukem      71: # Determine if running in the NetBSD source tree by checking for the
                     72: # existence of build.sh and tools/ in the current or a parent directory,
                     73: # and setting _SRC_TOP_ to the result.
                     74: #
1.287     lukem      75: .if !defined(_SRC_TOP_)                        # {
1.199     jmc        76: _SRC_TOP_!= cd ${.CURDIR}; while :; do \
1.200     jmc        77:                here=`pwd`; \
1.199     jmc        78:                [ -f build.sh  ] && [ -d tools ] && { echo $$here; break; }; \
                     79:                case $$here in /) echo ""; break;; esac; \
1.341     lukem      80:                cd ..; done
1.199     jmc        81:
                     82: .MAKEOVERRIDES+=       _SRC_TOP_
                     83:
1.287     lukem      84: .endif                                 # }
1.222     perry      85:
1.341     lukem      86: #
1.322     lukem      87: # If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
1.288     lukem      88: # defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
1.287     lukem      89: #
                     90: .if (${_SRC_TOP_} != "")               # {
                     91:
1.288     lukem      92: NETBSDSRCDIR?= ${_SRC_TOP_}
1.180     tv         93:
1.287     lukem      94: .if !defined(_SRC_TOP_OBJ_)
                     95: _SRC_TOP_OBJ_!=                cd ${_SRC_TOP_} && ${PRINTOBJDIR}
                     96: .MAKEOVERRIDES+=       _SRC_TOP_OBJ_
1.286     lukem      97: .endif
                     98:
1.322     lukem      99: .endif # _SRC_TOP_ != ""               # }
1.286     lukem     100:
                    101:
1.310     thorpej   102: .if (${_SRC_TOP_} != "") && \
1.406     lukem     103:     (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
1.287     lukem     104: USETOOLS?=     yes
1.286     lukem     105: .endif
1.287     lukem     106: USETOOLS?=     no
                    107:
1.286     lukem     108:
1.468     matt      109: .if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
1.495     scw       110:     ${MACHINE_ARCH} == "sh3"
1.180     tv        111: .BEGIN:
                    112:        @echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
                    113:        @false
1.310     thorpej   114: .elif defined(REQUIRETOOLS) && \
1.406     lukem     115:       (${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
1.310     thorpej   116:       ${USETOOLS} == "no"
1.180     tv        117: .BEGIN:
1.203     tv        118:        @echo "USETOOLS=no, but this component requires a version-specific host toolchain"
1.180     tv        119:        @false
                    120: .endif
                    121:
1.341     lukem     122: #
1.204     tv        123: # Host platform information; may be overridden
1.341     lukem     124: #
1.204     tv        125: .if !defined(HOST_OSTYPE)
                    126: _HOST_OSNAME!= uname -s
                    127: _HOST_OSREL!=  uname -r
1.558     apb       128: # For _HOST_ARCH, if uname -p fails, or prints "unknown", or prints
                    129: # something that does not look like an identifier, then use uname -m.
                    130: _HOST_ARCH!=   uname -p 2>/dev/null
1.559     apb       131: _HOST_ARCH:=   ${HOST_ARCH:tW:C/.*[^-_A-Za-z0-9].*//:S/unknown//}
1.558     apb       132: .if empty(_HOST_ARCH)
                    133: _HOST_ARCH!=   uname -m
                    134: .endif
1.421     jmc       135: HOST_OSTYPE:=  ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g}
1.204     tv        136: .MAKEOVERRIDES+= HOST_OSTYPE
1.558     apb       137: .endif # !defined(HOST_OSTYPE)
1.204     tv        138:
1.275     lukem     139: .if ${USETOOLS} == "yes"                                               # {
                    140:
1.341     lukem     141: #
1.204     tv        142: # Provide a default for TOOLDIR.
1.341     lukem     143: #
1.199     jmc       144: .if !defined(TOOLDIR)
1.339     lukem     145: TOOLDIR:=      ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
1.204     tv        146: .MAKEOVERRIDES+= TOOLDIR
1.199     jmc       147: .endif
1.180     tv        148:
1.341     lukem     149: #
1.320     thorpej   150: # This is the prefix used for the NetBSD-sourced tools.
1.341     lukem     151: #
1.320     thorpej   152: _TOOL_PREFIX?= nb
                    153:
1.341     lukem     154: #
1.318     thorpej   155: # If an external toolchain base is specified, use it.
1.341     lukem     156: #
                    157: .if defined(EXTERNAL_TOOLCHAIN)                                                # {
1.318     thorpej   158: AR=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
                    159: AS=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
                    160: LD=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
                    161: NM=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
                    162: OBJCOPY=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
                    163: OBJDUMP=       ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
                    164: RANLIB=                ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
                    165: SIZE=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
                    166: STRIP=         ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
                    167:
                    168: CC=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
                    169: CPP=           ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
                    170: CXX=           ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
                    171: FC=            ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
                    172: OBJC=          ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
1.341     lukem     173: .else                                                                  # } {
1.204     tv        174: # Define default locations for common tools.
1.341     lukem     175: .if ${USETOOLS_BINUTILS:Uyes} == "yes"                                 #  {
1.232     tv        176: AR=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
                    177: AS=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
1.234     thorpej   178: LD=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
                    179: NM=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
                    180: OBJCOPY=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
                    181: OBJDUMP=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
                    182: RANLIB=                ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
                    183: SIZE=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
                    184: STRIP=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
1.341     lukem     185: .endif                                                                 #  }
1.234     thorpej   186:
1.519     gmcgarry  187: .if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes"                 #  {
1.234     thorpej   188: CC=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
                    189: CPP=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
                    190: CXX=           ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
                    191: FC=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
                    192: OBJC=          ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
1.341     lukem     193: .endif                                                                 #  }
1.519     gmcgarry  194:
                    195: .if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes"
                    196: CC=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
                    197: CPP=           ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
                    198: CXX=           false
                    199: FC=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
                    200: OBJC=          false
                    201: .endif
                    202:
1.341     lukem     203: .endif # EXTERNAL_TOOLCHAIN                                            # }
1.234     thorpej   204:
1.338     lukem     205: HOST_MKDEP=    ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
                    206:
1.210     thorpej   207: DBSYM=         ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
1.320     thorpej   208: ELF2ECOFF=     ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
1.496     joerg     209: INSTALL=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
1.320     thorpej   210: LEX=           ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
1.215     tv        211: LINT=          CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
1.338     lukem     212: LORDER=                NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
1.320     thorpej   213: MKDEP=         CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
1.483     christos  214: PAXCTL=                ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
1.320     thorpej   215: TSORT=         ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
                    216: YACC=          ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
1.338     lukem     217:
1.426     jmc       218: TOOL_AMIGAAOUT2BB=     ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
                    219: TOOL_AMIGAELF2BB=      ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
                    220: TOOL_AMIGATXLT=                ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
1.338     lukem     221: TOOL_ASN1_COMPILE=     ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
1.498     jmmv      222: TOOL_ATF_COMPILE=      ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile
1.535     apb       223: TOOL_AWK=              ${TOOLDIR}/bin/${_TOOL_PREFIX}awk
1.338     lukem     224: TOOL_CAP_MKDB=         ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
                    225: TOOL_CAT=              ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
                    226: TOOL_CKSUM=            ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
                    227: TOOL_COMPILE_ET=       ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
                    228: TOOL_CONFIG=           ${TOOLDIR}/bin/${_TOOL_PREFIX}config
                    229: TOOL_CRUNCHGEN=                MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
                    230: TOOL_CTAGS=            ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
                    231: TOOL_DB=               ${TOOLDIR}/bin/${_TOOL_PREFIX}db
1.532     apb       232: TOOL_DISKLABEL=                ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE}
1.338     lukem     233: TOOL_EQN=              ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
1.532     apb       234: TOOL_FDISK=            ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
1.338     lukem     235: TOOL_FGEN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
1.439     thorpej   236: TOOL_GENASSYM=         ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
1.338     lukem     237: TOOL_GENCAT=           ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
1.446     jmc       238: TOOL_GMAKE=            ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
1.557     sketch    239: TOOL_GREP=             ${TOOLDIR}/bin/${_TOOL_PREFIX}grep
1.338     lukem     240: TOOL_GROFF=            PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
                    241: TOOL_HEXDUMP=          ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
1.427     jmc       242: TOOL_HP300MKBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
1.510     skrll     243: TOOL_HP700MKBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot
1.338     lukem     244: TOOL_INDXBIB=          ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
                    245: TOOL_INSTALLBOOT=      ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
                    246: TOOL_INSTALL_INFO=     ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
1.492     apb       247: TOOL_JOIN=             ${TOOLDIR}/bin/${_TOOL_PREFIX}join
1.338     lukem     248: TOOL_M4=               ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
1.405     matt      249: TOOL_MACPPCFIXCOFF=    ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
1.338     lukem     250: TOOL_MAKEFS=           ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
                    251: TOOL_MAKEINFO=         ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
                    252: TOOL_MAKEWHATIS=       ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
                    253: TOOL_MDSETIMAGE=       ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
                    254: TOOL_MENUC=            MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
1.425     jmc       255: TOOL_MIPSELF2ECOFF=    ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
1.338     lukem     256: TOOL_MKCSMAPPER=       ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
                    257: TOOL_MKESDB=           ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
                    258: TOOL_MKLOCALE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
                    259: TOOL_MKMAGIC=          ${TOOLDIR}/bin/${_TOOL_PREFIX}file
                    260: TOOL_MKTEMP=           ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
                    261: TOOL_MSGC=             MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
                    262: TOOL_MTREE=            ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
                    263: TOOL_PAX=              ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
                    264: TOOL_PIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
1.506     garbled   265: TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
1.338     lukem     266: TOOL_PWD_MKDB=         ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
                    267: TOOL_REFER=            ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
                    268: TOOL_ROFF_ASCII=       PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
                    269: TOOL_ROFF_DVI=         ${TOOL_GROFF} -Tdvi
1.340     lukem     270: TOOL_ROFF_HTML=                ${TOOL_GROFF} -Tlatin1 -mdoc2html
1.338     lukem     271: TOOL_ROFF_PS=          ${TOOL_GROFF} -Tps
                    272: TOOL_ROFF_RAW=         ${TOOL_GROFF} -Z
1.501     nakayama  273: TOOL_RPCGEN=           RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
1.454     gdamore   274: TOOL_SED=              ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
1.338     lukem     275: TOOL_SOELIM=           ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
1.532     apb       276: TOOL_SPARKCRC=         ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
1.342     lukem     277: TOOL_STAT=             ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
1.530     apb       278: TOOL_STRFILE=          ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
1.338     lukem     279: TOOL_SUNLABEL=         ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
                    280: TOOL_TBL=              ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
                    281: TOOL_UUDECODE=         ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
                    282: TOOL_VGRIND=           ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
                    283: TOOL_ZIC=              ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
1.180     tv        284:
1.538     apb       285: .else  # USETOOLS != yes                                               # } {
                    286:
                    287: TOOL_AMIGAAOUT2BB=     amiga-aout2bb
                    288: TOOL_AMIGAELF2BB=      amiga-elf2bb
                    289: TOOL_AMIGATXLT=                amiga-txlt
                    290: TOOL_ASN1_COMPILE=     asn1_compile
                    291: TOOL_ATF_COMPILE=      atf-compile
                    292: TOOL_AWK=              awk
                    293: TOOL_CAP_MKDB=         cap_mkdb
                    294: TOOL_CAT=              cat
                    295: TOOL_CKSUM=            cksum
                    296: TOOL_COMPILE_ET=       compile_et
                    297: TOOL_CONFIG=           config
                    298: TOOL_CRUNCHGEN=                crunchgen
                    299: TOOL_CTAGS=            ctags
                    300: TOOL_DB=               db
                    301: TOOL_DISKLABEL=                disklabel
                    302: TOOL_EQN=              eqn
                    303: TOOL_FDISK=            fdisk
                    304: TOOL_FGEN=             fgen
                    305: TOOL_GENASSYM=         genassym
                    306: TOOL_GENCAT=           gencat
                    307: TOOL_GMAKE=            gmake
1.557     sketch    308: TOOL_GREP=             grep
1.538     apb       309: TOOL_GROFF=            groff
                    310: TOOL_HEXDUMP=          hexdump
                    311: TOOL_HP300MKBOOT=      hp300-mkboot
                    312: TOOL_HP700MKBOOT=      hp700-mkboot
                    313: TOOL_INDXBIB=          indxbib
                    314: TOOL_INSTALLBOOT=      installboot
                    315: TOOL_INSTALL_INFO=     install-info
                    316: TOOL_JOIN=             join
                    317: TOOL_M4=               m4
                    318: TOOL_MACPPCFIXCOFF=    macppc-fixcoff
                    319: TOOL_MAKEFS=           makefs
                    320: TOOL_MAKEINFO=         makeinfo
                    321: TOOL_MAKEWHATIS=       /usr/libexec/makewhatis
                    322: TOOL_MDSETIMAGE=       mdsetimage
                    323: TOOL_MENUC=            menuc
                    324: TOOL_MIPSELF2ECOFF=    mips-elf2ecoff
                    325: TOOL_MKCSMAPPER=       mkcsmapper
                    326: TOOL_MKESDB=           mkesdb
                    327: TOOL_MKLOCALE=         mklocale
                    328: TOOL_MKMAGIC=          file
                    329: TOOL_MKTEMP=           mktemp
                    330: TOOL_MSGC=             msgc
                    331: TOOL_MTREE=            mtree
                    332: TOOL_PAX=              pax
                    333: TOOL_PIC=              pic
                    334: TOOL_POWERPCMKBOOTIMAGE=       powerpc-mkbootimage
                    335: TOOL_PWD_MKDB=         pwd_mkdb
                    336: TOOL_REFER=            refer
                    337: TOOL_ROFF_ASCII=       nroff
                    338: TOOL_ROFF_DVI=         ${TOOL_GROFF} -Tdvi
                    339: TOOL_ROFF_HTML=                ${TOOL_GROFF} -Tlatin1 -mdoc2html
                    340: TOOL_ROFF_PS=          ${TOOL_GROFF} -Tps
                    341: TOOL_ROFF_RAW=         ${TOOL_GROFF} -Z
                    342: TOOL_RPCGEN=           rpcgen
                    343: TOOL_SED=              sed
                    344: TOOL_SOELIM=           soelim
                    345: TOOL_SPARKCRC=         sparkcrc
                    346: TOOL_STAT=             stat
                    347: TOOL_STRFILE=          strfile
                    348: TOOL_SUNLABEL=         sunlabel
                    349: TOOL_TBL=              tbl
                    350: TOOL_UUDECODE=         uudecode
                    351: TOOL_VGRIND=           vgrind -f
                    352: TOOL_ZIC=              zic
                    353:
                    354: .endif # USETOOLS != yes                                               # }
1.272     lukem     355:
1.341     lukem     356: #
1.272     lukem     357: # Targets to check if DESTDIR or RELEASEDIR is provided
                    358: #
                    359: .if !target(check_DESTDIR)
                    360: check_DESTDIR: .PHONY .NOTMAIN
                    361: .if !defined(DESTDIR)
                    362:        @echo "setenv DESTDIR before doing that!"
                    363:        @false
                    364: .else
                    365:        @true
                    366: .endif
                    367: .endif
                    368:
                    369: .if !target(check_RELEASEDIR)
                    370: check_RELEASEDIR: .PHONY .NOTMAIN
                    371: .if !defined(RELEASEDIR)
                    372:        @echo "setenv RELEASEDIR before doing that!"
                    373:        @false
                    374: .else
                    375:        @true
                    376: .endif
                    377: .endif
                    378:
                    379:
1.341     lukem     380: .if ${USETOOLS} == "yes"                                               # {
                    381: #
1.180     tv        382: # Make sure DESTDIR is set, so that builds with these tools always
                    383: # get appropriate -nostdinc, -nostdlib, etc. handling.  The default is
                    384: # <empty string>, meaning start from /, the root directory.
1.341     lukem     385: #
1.180     tv        386: DESTDIR?=
1.341     lukem     387: .endif                                                                 # }
1.287     lukem     388:
1.341     lukem     389: #
1.306     lukem     390: # Build a dynamically linked /bin and /sbin, with the necessary shared
                    391: # libraries moved from /usr/lib to /lib and the shared linker moved
                    392: # from /usr/libexec to /lib
                    393: #
1.315     thorpej   394: # Note that if the BINDIR is not /bin or /sbin, then we always use the
                    395: # non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
                    396: # and /sbin).  See <bsd.shlib.mk>.
                    397: #
1.311     lukem     398: MKDYNAMICROOT?=        yes
1.306     lukem     399:
1.341     lukem     400: #
1.287     lukem     401: # Where the system object and source trees are kept; can be configurable
                    402: # by the user in case they want them in ~/foosrc and ~/fooobj (for example).
                    403: #
                    404: BSDSRCDIR?=    /usr/src
                    405: BSDOBJDIR?=    /usr/obj
1.288     lukem     406: NETBSDSRCDIR?= ${BSDSRCDIR}
1.1       cgd       407:
1.61      lukem     408: BINGRP?=       wheel
                    409: BINOWN?=       root
1.1       cgd       410: BINMODE?=      555
1.4       mycroft   411: NONBINMODE?=   444
1.17      brezak    412:
1.31      christos  413: MANDIR?=       /usr/share/man
1.61      lukem     414: MANGRP?=       wheel
                    415: MANOWN?=       root
1.4       mycroft   416: MANMODE?=      ${NONBINMODE}
1.524     lukem     417: MANINSTALL?=   catinstall htmlinstall maninstall
1.115     tv        418:
                    419: INFODIR?=      /usr/share/info
                    420: INFOGRP?=      wheel
                    421: INFOOWN?=      root
                    422: INFOMODE?=     ${NONBINMODE}
1.4       mycroft   423:
                    424: LIBDIR?=       /usr/lib
1.315     thorpej   425:
1.4       mycroft   426: LINTLIBDIR?=   /usr/libdata/lint
                    427: LIBGRP?=       ${BINGRP}
                    428: LIBOWN?=       ${BINOWN}
                    429: LIBMODE?=      ${NONBINMODE}
                    430:
1.135     simonb    431: DOCDIR?=       /usr/share/doc
1.136     simonb    432: HTMLDOCDIR?=   /usr/share/doc/html
1.61      lukem     433: DOCGRP?=       wheel
                    434: DOCOWN?=       root
1.135     simonb    435: DOCMODE?=      ${NONBINMODE}
1.15      jtc       436:
                    437: NLSDIR?=       /usr/share/nls
1.61      lukem     438: NLSGRP?=       wheel
                    439: NLSOWN?=       root
1.15      jtc       440: NLSMODE?=      ${NONBINMODE}
1.25      explorer  441:
1.508     ad        442: KMODULEGRP?=   wheel
                    443: KMODULEOWN?=   root
                    444: KMODULEMODE?=  ${NONBINMODE}
                    445:
1.155     itojun    446: LOCALEDIR?=    /usr/share/locale
                    447: LOCALEGRP?=    wheel
                    448: LOCALEOWN?=    root
                    449: LOCALEMODE?=   ${NONBINMODE}
1.1       cgd       450:
1.453     rpaulo    451: FIRMWAREDIR?=  /libdata/firmware
                    452: FIRMWAREGRP?=  wheel
                    453: FIRMWAREOWN?=  root
                    454: FIRMWAREMODE?= ${NONBINMODE}
                    455:
1.465     lukem     456: DEBUGDIR?=     /usr/libdata/debug
                    457: DEBUGGRP?=     wheel
                    458: DEBUGOWN?=     root
                    459: DEBUGMODE?=    ${NONBINMODE}
                    460:
1.341     lukem     461: #
                    462: # Data-driven table using make variables to control how
1.264     thorpej   463: # toolchain-dependent targets and shared libraries are built
                    464: # for different platforms and object formats.
                    465: #
1.296     thorpej   466: # OBJECT_FMT:          currently either "ELF" or "a.out".
1.264     thorpej   467: #
1.499     simonb    468: # All platforms are ELF.
1.341     lukem     469: #
1.264     thorpej   470: OBJECT_FMT=    ELF
                    471:
1.341     lukem     472: #
1.310     thorpej   473: # If this platform's toolchain is missing, we obviously cannot build it.
1.341     lukem     474: #
1.406     lukem     475: .if ${TOOLCHAIN_MISSING} != "no"
1.310     thorpej   476: MKBFD:= no
                    477: MKGDB:= no
                    478: MKGCC:= no
                    479: .endif
                    480:
1.341     lukem     481: #
1.310     thorpej   482: # If we are using an external toolchain, we can still build the target's
                    483: # BFD stuff, but we cannot build GCC's support libraries, since those are
                    484: # tightly-coupled to the version of GCC being used.
1.341     lukem     485: #
1.310     thorpej   486: .if defined(EXTERNAL_TOOLCHAIN)
                    487: MKGCC:= no
                    488: .endif
                    489:
1.341     lukem     490: #
1.165     fredette  491: # The m68000 port is incomplete.
1.341     lukem     492: #
1.165     fredette  493: .if ${MACHINE_ARCH} == "m68000"
1.230     tv        494: NOPIC=         # defined
1.458     mrg       495: MKISCSI=       no
                    496: # XXX GCC 4 outputs mcount() calling sequences that try to load values
                    497: # from over 64KB away and this fails to assemble.
1.519     gmcgarry  498: .if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
1.458     mrg       499: NOPROFILE=     # defined
                    500: .endif
1.32      thorpej   501: .endif
1.122     simonb    502:
1.341     lukem     503: #
1.441     skrll     504: # The ia64 port is incomplete.
                    505: #
                    506: .if ${MACHINE_ARCH} == "ia64"
                    507: MKLINT=                no
1.472     skrll     508: MKGDB=         no
1.441     skrll     509: .endif
                    510:
                    511: #
1.327     thorpej   512: # On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
                    513: # not just shared libraries, so don't build the _pic version.
1.341     lukem     514: #
1.327     thorpej   515: .if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
                    516: MKPICLIB:=     no
                    517: .endif
                    518:
1.341     lukem     519: #
1.327     thorpej   520: # On VAX using ELF, all objects are PIC, not just shared libraries,
1.401     matt      521: # so don't build the _pic version.  Unless we are using GCC3 which
                    522: # doesn't support PIC yet.
1.341     lukem     523: #
1.494     matt      524: .if ${MACHINE_ARCH} == "vax"
                    525: MKPICLIB=      no
1.327     thorpej   526: .endif
                    527:
1.341     lukem     528: #
1.122     simonb    529: # Location of the file that contains the major and minor numbers of the
                    530: # version of a shared library.  If this file exists a shared library
                    531: # will be built by <bsd.lib.mk>.
1.341     lukem     532: #
1.122     simonb    533: SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
1.69      tv        534:
1.341     lukem     535: #
1.69      tv        536: # GNU sources and packages sometimes see architecture names differently.
1.341     lukem     537: #
1.494     matt      538: GNU_ARCH.coldfire=m68k
1.560     drochner  539: GNU_ARCH.i386=i486
                    540: GCC_CONFIG_ARCH.i386=i486
1.563     ad        541: GCC_CONFIG_TUNE.i386=nocona
                    542: GCC_CONFIG_TUNE.x86_64=nocona
1.261     thorpej   543: GNU_ARCH.m68000=m68010
1.150     itojun    544: GNU_ARCH.sh3eb=sh
1.236     thorpej   545: GNU_ARCH.sh3el=shle
1.468     matt      546: GNU_ARCH.mips64eb=mips64
1.172     tv        547: MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
1.161     tv        548:
1.341     lukem     549: #
1.161     tv        550: # In order to identify NetBSD to GNU packages, we sometimes need
                    551: # an "elf" tag for historically a.out platforms.
1.341     lukem     552: #
1.162     tv        553: .if ${OBJECT_FMT} == "ELF" && \
1.192     thorpej   554:     (${MACHINE_GNU_ARCH} == "arm" || \
1.294     thorpej   555:      ${MACHINE_GNU_ARCH} == "armeb" || \
1.168     matt      556:      ${MACHINE_ARCH} == "i386" || \
1.494     matt      557:      ${MACHINE_CPU} == "m68k" || \
1.235     thorpej   558:      ${MACHINE_GNU_ARCH} == "sh" || \
1.236     thorpej   559:      ${MACHINE_GNU_ARCH} == "shle" || \
1.168     matt      560:      ${MACHINE_ARCH} == "sparc" || \
                    561:      ${MACHINE_ARCH} == "vax")
1.318     thorpej   562: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
1.161     tv        563: .else
1.318     thorpej   564: MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
1.161     tv        565: .endif
1.153     itojun    566:
1.553     pooka     567: #
                    568: # Determine if arch uses native kernel modules with rump
                    569: #
                    570: .if ${MACHINE_ARCH} == "i386" || \
                    571:     ${MACHINE_ARCH} == "x86_64"
                    572: RUMPKMOD=      # defined
                    573: .endif
                    574:
1.160     tv        575: TARGETS+=      all clean cleandir depend dependall includes \
1.521     lukem     576:                install lint obj regress tags html
1.485     dsl       577: PHONY_NOTMAIN =        all clean cleandir depend dependall distclean includes \
1.128     perry     578:                install lint obj regress tags beforedepend afterdepend \
1.142     phil      579:                beforeinstall afterinstall realinstall realdepend realall \
1.521     lukem     580:                html subdir-all subdir-install subdir-depend
1.485     dsl       581: .PHONY:                ${PHONY_NOTMAIN}
                    582: .NOTMAIN:      ${PHONY_NOTMAIN}
1.58      agc       583:
1.406     lukem     584: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.56      drochner  585: .if !target(install)
1.485     dsl       586: install:       beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
                    587: beforeinstall:
                    588: subdir-install:
                    589: realinstall:
                    590: afterinstall:
                    591: .endif
                    592: all:           realall subdir-all
                    593: subdir-all:
                    594: realall:
                    595: depend:                realdepend subdir-depend
                    596: subdir-depend:
                    597: realdepend:
                    598: distclean:     cleandir
                    599: cleandir:      clean
1.205     tv        600:
                    601: dependall:     .NOTMAIN realdepend .MAKE
                    602:        @cd ${.CURDIR}; ${MAKE} realall
1.132     mycroft   603: .endif
1.116     lukem     604:
1.341     lukem     605: #
1.116     lukem     606: # Define MKxxx variables (which are either yes or no) for users
1.350     lukem     607: # to set in /etc/mk.conf and override in the make environment.
1.116     lukem     608: # These should be tested with `== "no"' or `!= "no"'.
1.340     lukem     609: # The NOxxx variables should only be set by Makefiles.
1.116     lukem     610: #
1.466     lukem     611: # Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
                    612: # with changes to the MK* variables here.
                    613: #
1.116     lukem     614:
1.341     lukem     615: #
1.230     tv        616: # Supported NO* options (if defined, MK* will be forced to "no",
                    617: # regardless of user's mk.conf setting).
1.341     lukem     618: #
1.503     dholland  619: # Source makefiles should set NO*, and not MK*, and must do so before
                    620: # including bsd.own.mk.
                    621: #
1.422     lukem     622: .for var in \
1.534     apb       623:        NOCRYPTO NODOC NOHTML NOINFO NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
1.503     dholland  624:        NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
                    625: .if defined(${var})
                    626: MK${var:S/^NO//}:=     no
1.230     tv        627: .endif
                    628: .endfor
1.268     ross      629:
1.341     lukem     630: #
                    631: # Older-style variables that enabled behaviour when set.
                    632: #
                    633: .for var in MANZ UNPRIVED UPDATE
                    634: .if defined(${var})
                    635: MK${var}:=     yes
1.268     ross      636: .endif
1.341     lukem     637: .endfor
1.230     tv        638:
1.536     mrg       639: #
                    640: # MK* options which have variable defaults.
                    641: #
                    642: .if ${MACHINE} == "amd64" || ${MACHINE} == "sparc64"
                    643: MKCOMPAT?=     yes
                    644: .else
                    645: # Don't let this build where it really isn't supported.
                    646: MKCOMPAT:=     no
                    647: .endif
                    648:
1.341     lukem     649: #
1.230     tv        650: # MK* options which default to "yes".
1.341     lukem     651: #
1.422     lukem     652: .for var in \
1.514     gmcgarry  653:        MKATF \
1.504     lukem     654:        MKBFD MKBINUTILS \
1.514     gmcgarry  655:        MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \
1.504     lukem     656:        MKDOC \
                    657:        MKGCC MKGCCCMDS MKGDB \
1.524     lukem     658:        MKHESIOD MKHTML \
1.504     lukem     659:        MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
                    660:        MKKERBEROS \
1.513     wiz       661:        MKLDAP MKLINKLIB MKLINT \
1.504     lukem     662:        MKMAN \
1.525     christos  663:        MKNLS \
1.504     lukem     664:        MKOBJ \
1.519     gmcgarry  665:        MKPAM \
                    666:        MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
1.504     lukem     667:        MKSHARE MKSKEY MKSTATICLIB \
                    668:        MKYP
                    669: ${var}?=       yes
1.230     tv        670: .endfor
                    671:
1.341     lukem     672: #
1.230     tv        673: # MK* options which default to "no".
1.341     lukem     674: #
1.422     lukem     675: .for var in \
1.504     lukem     676:        MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
1.552     agc       677:        MKLVM \
1.547     ad        678:        MKMANZ MKOBJDIRS \
1.514     gmcgarry  679:        MKPCC MKPCCCMDS \
1.541     agc       680:        MKSOFTFLOAT MKSTRIPIDENT \
1.552     agc       681:        MKUNPRIVED MKUPDATE MKX11
1.504     lukem     682: ${var}?=no
1.230     tv        683: .endfor
                    684:
1.341     lukem     685: #
1.544     mrg       686: # Do we default to XFree86 or Xorg for this platform?
                    687: #
1.561     bouyer    688: .if ${MACHINE} == "alpha" || ${MACHINE} == "acorn32" || \
                    689:        ${MACHINE} == "amiga" || ${MACHINE} == "cats" || \
                    690:        ${MACHINE} == "dreamcast" || ${MACHINE} == "ews4800mips" || \
                    691:        ${MACHINE} == "hpcarm" || ${MACHINE} == "hpcmips" || \
                    692:        ${MACHINE} == "hpcsh" || ${MACHINE} == "mac68k" || \
                    693:        ${MACHINE} == "netwinder" || ${MACHINE} == "newsmips" || \
                    694:        ${MACHINE} == "ofppc" || ${MACHINE} == "pmax" || \
                    695:        ${MACHINE} == "sparc" || ${MACHINE} == "sun3" || ${MACHINE} == "x68k"
1.555     abs       696: X11FLAVOUR?=   XFree86
                    697: .else
1.544     mrg       698: X11FLAVOUR?=   Xorg
                    699: .endif
                    700:
                    701: #
1.230     tv        702: # Force some options off if their dependencies are off.
1.341     lukem     703: #
                    704:
1.230     tv        705: .if ${MKCRYPTO} == "no"
                    706: MKKERBEROS:=   no
1.340     lukem     707: .endif
                    708:
                    709: .if ${MKMAN} == "no"
1.341     lukem     710: MKCATPAGES:=   no
1.340     lukem     711: MKHTML:=       no
1.116     lukem     712: .endif
                    713:
1.117     lukem     714: .if ${MKLINKLIB} == "no"
1.507     lukem     715: MKLINT:=       no
1.230     tv        716: MKPICINSTALL:= no
                    717: MKPROFILE:=    no
1.327     thorpej   718: .endif
                    719:
                    720: .if ${MKPIC} == "no"
                    721: MKPICLIB:=     no
1.116     lukem     722: .endif
                    723:
1.230     tv        724: .if ${MKOBJ} == "no"
                    725: MKOBJDIRS:=    no
1.116     lukem     726: .endif
                    727:
1.117     lukem     728: .if ${MKSHARE} == "no"
1.230     tv        729: MKCATPAGES:=   no
                    730: MKDOC:=                no
                    731: MKINFO:=       no
1.341     lukem     732: MKHTML:=       no
1.230     tv        733: MKMAN:=                no
                    734: MKNLS:=                no
1.116     lukem     735: .endif
1.276     thorpej   736:
1.341     lukem     737: #
                    738: # install(1) parameters.
                    739: #
                    740: COPY?=         -c
                    741: .if ${MKUPDATE} == "no"
                    742: PRESERVE?=
                    743: .else
                    744: PRESERVE?=     -p
                    745: .endif
                    746: RENAME?=       -r
                    747: HRDLINK?=      -l h
1.444     christos  748: SYMLINK?=      -l s
1.341     lukem     749:
                    750: METALOG?=      ${DESTDIR}/METALOG
                    751: METALOG.add?=  ${TOOL_CAT} -l >> ${METALOG}
                    752: .if (${_SRC_TOP_} != "")       # only set INSTPRIV if inside ${NETBSDSRCDIR}
                    753: .if ${MKUNPRIVED} != "no"
1.562     apb       754: INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha256
1.341     lukem     755: .else
                    756: INSTPRIV.unpriv=
                    757: .endif
                    758: INSTPRIV?=     ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
                    759: .endif
1.410     lukem     760: STRIPFLAG?=
1.341     lukem     761:
1.406     lukem     762: .if ${NEED_OWN_INSTALL_TARGET} != "no"
1.341     lukem     763: INSTALL_DIR?=          ${INSTALL} ${INSTPRIV} -d
                    764: INSTALL_FILE?=         ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
                    765: INSTALL_LINK?=         ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
                    766: INSTALL_SYMLINK?=      ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
                    767: HOST_INSTALL_FILE?=    ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
1.440     dyoung    768: HOST_INSTALL_DIR?=     ${INSTALL} -d
                    769: HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME}
1.341     lukem     770: .endif
                    771:
                    772: #
1.351     lukem     773: # Set defaults for the USE_xxx variables.
                    774: #
                    775:
                    776: #
1.433     lukem     777: # USE_* options which default to "no" and will be forced to "no" if their
                    778: # corresponding MK* variable is set to "no".
                    779: #
1.505     lukem     780: .for var in USE_SKEY
                    781: .if (${${var:S/USE_/MK/}} == "no")
                    782: ${var}:= no
                    783: .else
                    784: ${var}?= no
                    785: .endif
                    786: .endfor
1.433     lukem     787:
                    788: #
1.351     lukem     789: # USE_* options which default to "yes" unless their corresponding MK*
                    790: # variable is set to "no".
1.341     lukem     791: #
1.512     lukem     792: .for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
1.504     lukem     793: .if (${${var:S/USE_/MK/}} == "no")
                    794: ${var}:= no
1.276     thorpej   795: .else
1.504     lukem     796: ${var}?= yes
1.276     thorpej   797: .endif
1.351     lukem     798: .endfor
                    799:
                    800: #
                    801: # USE_* options which default to "yes".
                    802: #
1.504     lukem     803: .for var in USE_JEMALLOC
                    804: ${var}?= yes
1.497     ad        805: .endfor
1.300     tron      806:
1.341     lukem     807: #
1.445     jmc       808: # USE_* options which default to "no".
                    809: #
1.480     mrg       810: #.for var in
1.504     lukem     811: #${var}?= no
1.480     mrg       812: #.endfor
1.357     lukem     813:
                    814: #
1.522     mrg       815: # Where X11 sources are and where it is installed to.
1.357     lukem     816: #
                    817: X11SRCDIR?=            /usr/xsrc
                    818: X11SRCDIR.xc?=         ${X11SRCDIR}/xfree/xc
                    819: X11SRCDIR.local?=      ${X11SRCDIR}/local
1.544     mrg       820: .if ${X11FLAVOUR} == "Xorg"
1.522     mrg       821: X11ROOTDIR?=           /usr/X11R7
                    822: .else
1.357     lukem     823: X11ROOTDIR?=           /usr/X11R6
1.522     mrg       824: .endif
1.357     lukem     825: X11BINDIR?=            ${X11ROOTDIR}/bin
1.417     lukem     826: X11ETCDIR?=            /etc/X11
1.357     lukem     827: X11FONTDIR?=           ${X11ROOTDIR}/lib/X11/fonts
                    828: X11INCDIR?=            ${X11ROOTDIR}/include
                    829: X11LIBDIR?=            ${X11ROOTDIR}/lib/X11
                    830: X11MANDIR?=            ${X11ROOTDIR}/man
                    831: X11USRLIBDIR?=         ${X11ROOTDIR}/lib
1.417     lukem     832:
1.516     mrg       833: #
                    834: # New modular-xorg based builds
                    835: #
                    836: X11SRCDIRMIT?=         ${X11SRCDIR}/external/mit
                    837: .for _lib in \
                    838:        FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
1.564   ! mrg       839:        Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xpm \
1.516     mrg       840:        Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
1.564   ! mrg       841:        fontenc xkbfile xkbui Xaw lbxutil Xfontcache pciaccess
1.516     mrg       842: X11SRCDIR.${_lib}?=            ${X11SRCDIRMIT}/lib${_lib}/dist
                    843: .endfor
                    844:
                    845: .for _proto in \
                    846:        xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
                    847:        xinerama print render resource record video xf86dga xf86misc \
                    848:        xf86vidmode composite damage trap gl randr fontcache xf86dri
                    849: X11SRCDIR.${_proto}proto?=             ${X11SRCDIRMIT}/${_proto}proto/dist
                    850: .endfor
                    851:
                    852: .for _dir in \
                    853:        xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
                    854:        xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata \
1.517     mrg       855:        xbitmaps appres xeyes xev xedit sessreg pixman \
1.516     mrg       856:        beforelight bitmap editres makedepend fonttosfnt fslsfonts \
1.546     cube      857:        fstobdf MesaDemos MesaGLUT MesaLib ico iceauth lbxproxy listres lndir \
1.516     mrg       858:        luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
                    859:        setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
                    860:        xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
                    861:        xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
                    862:        xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
                    863:        xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
                    864:        xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
                    865:        xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
                    866:        xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
1.526     mrg       867:        xkeyboard-config xinput \
1.516     mrg       868:        font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
                    869:        font-adobe-utopia-75dpi font-adobe-utopia-type1 \
                    870:        font-alias \
                    871:        font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
                    872:        font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
                    873:        font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
                    874:        font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
                    875:        font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
1.554     tron      876:        font-sony-misc font-util ttf-bitstream-vera encodings
1.516     mrg       877: X11SRCDIR.${_dir}?=            ${X11SRCDIRMIT}/${_dir}/dist
                    878: .endfor
                    879:
1.518     mrg       880: .for _i in \
                    881:        keyboard mouse vmmouse void
                    882: X11SRCDIR.xf86-input-${_i}?=   ${X11SRCDIRMIT}/xf86-input-${_i}/dist
                    883: .endfor
                    884:
                    885: .for _v in \
1.545     macallan  886:        ag10e apm ark ast ati chips cirrus crime cyrix glint i128 i740 imstt \
1.543     macallan  887:        intel mach64 mga neomagic newport nsc nv nvxbox pnozz r128 radeonhd \
                    888:        rendition s3 s3virge savage siliconmotion sis sunffb suncg6 tdfx tga \
                    889:        trident tseng vesa vga via vmware wsfb
                    890:
1.518     mrg       891: X11SRCDIR.xf86-video-${_v}?=   ${X11SRCDIRMIT}/xf86-video-${_v}/dist
                    892: .endfor
                    893:
1.544     mrg       894: .if ${X11FLAVOUR} == "Xorg"
1.516     mrg       895: X11DRI?=                       yes
                    896: .endif
                    897:
                    898: X11DRI?=                       no
                    899: X11LOADABLE?=                  yes
1.374     lukem     900:
                    901:
                    902: #
1.414     lukem     903: # MAKEDIRTARGET dir target [extra make(1) params]
                    904: #      run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message
                    905: #
                    906: MAKEDIRTARGET=\
                    907:        @_makedirtarget() { \
                    908:                dir="$$1"; shift; \
                    909:                target="$$1"; shift; \
                    910:                case "$${dir}" in \
                    911:                /*)     this="$${dir}/"; \
                    912:                        real="$${dir}" ;; \
                    913:                .)      this="${_THISDIR_}"; \
                    914:                        real="${.CURDIR}" ;; \
                    915:                *)      this="${_THISDIR_}$${dir}/"; \
                    916:                        real="${.CURDIR}/$${dir}" ;; \
                    917:                esac; \
                    918:                show=$${this:-.}; \
                    919:                echo "$${target} ===> $${show%/}$${1:+  (with: $$@)}"; \
                    920:                cd "$${real}" \
                    921:                && ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
                    922:        }; \
                    923:        _makedirtarget
                    924:
                    925: #
1.374     lukem     926: # MAKEVERBOSE support.  Levels are:
1.549     apb       927: #      0       Minimal output ("quiet")
                    928: #      1       Describe what is occurring
                    929: #      2       Describe what is occurring and echo the actual command
                    930: #      3       Ignore the effect of the "@" prefix in make commands
                    931: #      4       Trace shell commands using the shell's -x flag
1.374     lukem     932: #
                    933: MAKEVERBOSE?=          2
                    934:
                    935: .if ${MAKEVERBOSE} == 0
                    936: _MKMSG?=       @\#
                    937: _MKSHMSG?=     : echo
                    938: _MKSHECHO?=    : echo
1.380     lukem     939: .SILENT:
1.374     lukem     940: .elif ${MAKEVERBOSE} == 1
                    941: _MKMSG?=       @echo '   '
                    942: _MKSHMSG?=     echo '   '
                    943: _MKSHECHO?=    : echo
1.380     lukem     944: .SILENT:
1.549     apb       945: .else  # MAKEVERBOSE >= 2
1.374     lukem     946: _MKMSG?=       @echo '\#  '
                    947: _MKSHMSG?=     echo '\#  '
                    948: _MKSHECHO?=    echo
1.380     lukem     949: .SILENT: __makeverbose_dummy_target__
1.549     apb       950: .endif # MAKEVERBOSE >= 2
                    951: .if ${MAKEVERBOSE} >= 3
                    952: .MAKEFLAGS:    -dl
                    953: .endif # ${MAKEVERBOSE} >= 3
                    954: .if ${MAKEVERBOSE} >= 4
                    955: .MAKEFLAGS:    -dx
                    956: .endif # ${MAKEVERBOSE} >= 4
1.374     lukem     957:
                    958: _MKMSG_BUILD?=         ${_MKMSG} "  build "
                    959: _MKMSG_CREATE?=                ${_MKMSG} " create "
                    960: _MKMSG_COMPILE?=       ${_MKMSG} "compile "
                    961: _MKMSG_FORMAT?=                ${_MKMSG} " format "
                    962: _MKMSG_INSTALL?=       ${_MKMSG} "install "
                    963: _MKMSG_LINK?=          ${_MKMSG} "   link "
                    964: _MKMSG_LEX?=           ${_MKMSG} "    lex "
                    965: _MKMSG_REMOVE?=                ${_MKMSG} " remove "
                    966: _MKMSG_YACC?=          ${_MKMSG} "   yacc "
1.391     lukem     967:
                    968: _MKSHMSG_CREATE?=      ${_MKSHMSG} " create "
                    969: _MKSHMSG_INSTALL?=     ${_MKSHMSG} "install "
1.374     lukem     970:
1.394     lukem     971: _MKTARGET_BUILD?=      ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
                    972: _MKTARGET_CREATE?=     ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
                    973: _MKTARGET_COMPILE?=    ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
                    974: _MKTARGET_FORMAT?=     ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
                    975: _MKTARGET_INSTALL?=    ${_MKMSG_INSTALL} ${.TARGET}
                    976: _MKTARGET_LINK?=       ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
                    977: _MKTARGET_LEX?=                ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
                    978: _MKTARGET_REMOVE?=     ${_MKMSG_REMOVE} ${.TARGET}
                    979: _MKTARGET_YACC?=       ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
1.64      lukem     980:
1.347     lukem     981: .endif # !defined(_BSD_OWN_MK_)

CVSweb <webmaster@jp.NetBSD.org>