2008-09-26 22:23:09 +04:00
|
|
|
# $NetBSD: bsd.own.mk,v 1.530 2008/09/26 18:23:09 apb Exp $
|
1998-04-13 16:03:07 +04:00
|
|
|
|
|
|
|
.if !defined(_BSD_OWN_MK_)
|
|
|
|
_BSD_OWN_MK_=1
|
1996-04-13 06:08:08 +04:00
|
|
|
|
2001-08-14 09:55:27 +04:00
|
|
|
MAKECONF?= /etc/mk.conf
|
2001-11-02 08:21:47 +03:00
|
|
|
.-include "${MAKECONF}"
|
1994-09-28 18:59:28 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
# CPU model, derived from MACHINE_ARCH
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2007-04-08 13:35:21 +04:00
|
|
|
MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/mips64e[bl]/mips/:C/sh3e[bl]/sh3/:S/m68000/m68k/:S/armeb/arm/}
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
|
2004-05-12 20:56:41 +04:00
|
|
|
#
|
|
|
|
# Subdirectory used below ${RELEASEDIR} when building a release
|
|
|
|
#
|
|
|
|
RELEASEMACHINEDIR?= ${MACHINE}
|
|
|
|
|
|
|
|
#
|
|
|
|
# Subdirectory or path component used for the following paths:
|
|
|
|
# distrib/${RELEASEMACHINE}
|
|
|
|
# distrib/notes/${RELEASEMACHINE}
|
|
|
|
# etc/etc.${RELEASEMACHINE}
|
|
|
|
# Used when building a release.
|
|
|
|
#
|
|
|
|
RELEASEMACHINE?= ${MACHINE}
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-11-05 22:45:25 +03:00
|
|
|
# NEED_OWN_INSTALL_TARGET is set to "no" by pkgsrc/mk/bsd.pkg.mk to
|
|
|
|
# ensure that things defined by <bsd.own.mk> (default targets,
|
|
|
|
# INSTALL_FILE, etc.) are not conflicting with bsd.pkg.mk.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-11-05 22:45:25 +03:00
|
|
|
NEED_OWN_INSTALL_TARGET?= yes
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
# This lists the platforms which do not have working in-tree toolchains.
|
2003-12-08 01:52:56 +03:00
|
|
|
# For the in-tree gcc 3.3.2 toolchain, this list is empty.
|
|
|
|
# If some future port is not supported by the in-tree toolchain, this
|
|
|
|
# should be set to "yes" for that port only.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2006-04-07 23:38:58 +04:00
|
|
|
TOOLCHAIN_MISSING?= no
|
2001-10-04 19:52:59 +04:00
|
|
|
|
2006-09-27 02:11:32 +04:00
|
|
|
# default to GCC4
|
2008-08-24 10:27:00 +04:00
|
|
|
.if !defined(HAVE_GCC) && !defined(HAVE_PCC)
|
|
|
|
HAVE_GCC= 4
|
|
|
|
.endif
|
2006-05-12 06:04:55 +04:00
|
|
|
|
2007-02-19 21:31:21 +03:00
|
|
|
# default to GDB6
|
2006-09-26 23:33:02 +04:00
|
|
|
HAVE_GDB?= 6
|
2006-06-24 01:51:02 +04:00
|
|
|
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
CPPFLAG_ISYSTEM= -isystem
|
2008-08-24 10:27:00 +04:00
|
|
|
.if defined(HAVE_GCC)
|
2006-06-03 02:21:34 +04:00
|
|
|
.if ${HAVE_GCC} == 3
|
2003-08-02 02:51:34 +04:00
|
|
|
CPPFLAG_ISYSTEMXX= -isystem-cxx
|
2006-06-03 02:21:34 +04:00
|
|
|
.else # GCC 4
|
2006-05-12 06:04:55 +04:00
|
|
|
CPPFLAG_ISYSTEMXX= -cxx-isystem
|
2003-07-27 18:49:22 +04:00
|
|
|
.endif
|
2008-08-24 10:27:00 +04:00
|
|
|
.endif
|
2001-11-19 05:46:50 +03:00
|
|
|
|
2001-11-19 07:44:32 +03:00
|
|
|
.if empty(.MAKEFLAGS:M-V*)
|
2006-11-30 00:49:39 +03:00
|
|
|
.if defined(MAKEOBJDIRPREFIX) || defined(MAKEOBJDIR)
|
|
|
|
PRINTOBJDIR= ${MAKE} -r -V .OBJDIR -f /dev/null xxx
|
|
|
|
.else
|
2006-11-26 16:59:49 +03:00
|
|
|
PRINTOBJDIR= ${MAKE} -V .OBJDIR
|
2006-11-30 00:49:39 +03:00
|
|
|
.endif
|
2001-11-19 07:44:32 +03:00
|
|
|
.else
|
|
|
|
PRINTOBJDIR= echo # prevent infinite recursion
|
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-04-23 11:20:22 +04:00
|
|
|
# Determine if running in the NetBSD source tree by checking for the
|
|
|
|
# existence of build.sh and tools/ in the current or a parent directory,
|
|
|
|
# and setting _SRC_TOP_ to the result.
|
|
|
|
#
|
2002-04-26 18:27:23 +04:00
|
|
|
.if !defined(_SRC_TOP_) # {
|
2001-10-26 08:59:10 +04:00
|
|
|
_SRC_TOP_!= cd ${.CURDIR}; while :; do \
|
2001-10-26 10:41:46 +04:00
|
|
|
here=`pwd`; \
|
2001-10-26 08:59:10 +04:00
|
|
|
[ -f build.sh ] && [ -d tools ] && { echo $$here; break; }; \
|
|
|
|
case $$here in /) echo ""; break;; esac; \
|
2003-07-18 12:26:01 +04:00
|
|
|
cd ..; done
|
2001-10-26 08:59:10 +04:00
|
|
|
|
|
|
|
.MAKEOVERRIDES+= _SRC_TOP_
|
|
|
|
|
2002-04-26 18:27:23 +04:00
|
|
|
.endif # }
|
2001-11-19 07:44:32 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-12-23 05:01:29 +03:00
|
|
|
# If _SRC_TOP_ != "", we're within the NetBSD source tree, so set
|
2002-04-26 19:02:02 +04:00
|
|
|
# defaults for NETBSDSRCDIR and _SRC_TOP_OBJ_.
|
2002-04-23 11:20:22 +04:00
|
|
|
#
|
2002-04-26 18:27:23 +04:00
|
|
|
.if (${_SRC_TOP_} != "") # {
|
2002-04-23 11:20:22 +04:00
|
|
|
|
2002-04-26 19:02:02 +04:00
|
|
|
NETBSDSRCDIR?= ${_SRC_TOP_}
|
2002-04-23 11:20:22 +04:00
|
|
|
|
|
|
|
.if !defined(_SRC_TOP_OBJ_)
|
|
|
|
_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR}
|
|
|
|
.MAKEOVERRIDES+= _SRC_TOP_OBJ_
|
|
|
|
.endif
|
|
|
|
|
2002-12-23 05:01:29 +03:00
|
|
|
.endif # _SRC_TOP_ != "" # }
|
2002-04-26 18:27:23 +04:00
|
|
|
|
|
|
|
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
.if (${_SRC_TOP_} != "") && \
|
2004-01-02 19:12:36 +03:00
|
|
|
(${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN))
|
2002-04-26 18:27:23 +04:00
|
|
|
USETOOLS?= yes
|
|
|
|
.endif
|
|
|
|
USETOOLS?= no
|
|
|
|
|
|
|
|
|
2006-08-26 03:35:04 +04:00
|
|
|
.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "mips64" || \
|
2007-04-08 13:35:21 +04:00
|
|
|
${MACHINE_ARCH} == "sh3"
|
2001-09-22 09:45:50 +04:00
|
|
|
.BEGIN:
|
|
|
|
@echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
|
|
|
|
@false
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
.elif defined(REQUIRETOOLS) && \
|
2004-01-02 19:12:36 +03:00
|
|
|
(${TOOLCHAIN_MISSING} == "no" || defined(EXTERNAL_TOOLCHAIN)) && \
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
${USETOOLS} == "no"
|
2001-09-22 09:45:50 +04:00
|
|
|
.BEGIN:
|
2001-10-31 19:25:21 +03:00
|
|
|
@echo "USETOOLS=no, but this component requires a version-specific host toolchain"
|
2001-09-22 09:45:50 +04:00
|
|
|
@false
|
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-10-31 20:46:08 +03:00
|
|
|
# Host platform information; may be overridden
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-10-31 20:46:08 +03:00
|
|
|
.if !defined(HOST_OSTYPE)
|
|
|
|
_HOST_OSNAME!= uname -s
|
|
|
|
_HOST_OSREL!= uname -r
|
|
|
|
_HOST_ARCH!= uname -p 2>/dev/null || uname -m
|
2004-06-11 11:14:16 +04:00
|
|
|
HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//g:[*]:C/ /_/g}-${_HOST_ARCH:C/\([^\)]*\)//g:[*]:C/ /_/g}
|
2001-10-31 20:46:08 +03:00
|
|
|
.MAKEOVERRIDES+= HOST_OSTYPE
|
|
|
|
.endif
|
2003-05-09 00:39:00 +04:00
|
|
|
HOST_CYGWIN= ${HOST_OSTYPE:MCYGWIN*}
|
2001-10-31 20:46:08 +03:00
|
|
|
|
2002-03-19 14:03:05 +03:00
|
|
|
.if ${USETOOLS} == "yes" # {
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-10-31 20:46:08 +03:00
|
|
|
# Provide a default for TOOLDIR.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-10-26 08:59:10 +04:00
|
|
|
.if !defined(TOOLDIR)
|
2003-07-16 17:19:49 +04:00
|
|
|
TOOLDIR:= ${_SRC_TOP_OBJ_}/tooldir.${HOST_OSTYPE}
|
2001-10-31 20:46:08 +03:00
|
|
|
.MAKEOVERRIDES+= TOOLDIR
|
2001-10-26 08:59:10 +04:00
|
|
|
.endif
|
2001-09-22 09:45:50 +04:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-12-08 23:19:56 +03:00
|
|
|
# This is the prefix used for the NetBSD-sourced tools.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-12-08 23:19:56 +03:00
|
|
|
_TOOL_PREFIX?= nb
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-11-26 22:51:16 +03:00
|
|
|
# If an external toolchain base is specified, use it.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
|
|
|
.if defined(EXTERNAL_TOOLCHAIN) # {
|
2002-11-26 22:51:16 +03:00
|
|
|
AR= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ar
|
|
|
|
AS= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-as
|
|
|
|
LD= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ld
|
|
|
|
NM= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-nm
|
|
|
|
OBJCOPY= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objcopy
|
|
|
|
OBJDUMP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-objdump
|
|
|
|
RANLIB= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-ranlib
|
|
|
|
SIZE= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-size
|
|
|
|
STRIP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-strip
|
|
|
|
|
|
|
|
CC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
|
|
|
|
CPP= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-cpp
|
|
|
|
CXX= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-c++
|
|
|
|
FC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-g77
|
|
|
|
OBJC= ${EXTERNAL_TOOLCHAIN}/bin/${MACHINE_GNU_PLATFORM}-gcc
|
2003-07-18 12:26:01 +04:00
|
|
|
.else # } {
|
2001-10-31 20:46:08 +03:00
|
|
|
# Define default locations for common tools.
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${USETOOLS_BINUTILS:Uyes} == "yes" # {
|
2001-12-12 06:28:37 +03:00
|
|
|
AR= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ar
|
|
|
|
AS= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-as
|
2001-12-12 08:50:09 +03:00
|
|
|
LD= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ld
|
|
|
|
NM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-nm
|
|
|
|
OBJCOPY= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objcopy
|
|
|
|
OBJDUMP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-objdump
|
|
|
|
RANLIB= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-ranlib
|
|
|
|
SIZE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-size
|
|
|
|
STRIP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-strip
|
2003-07-18 12:26:01 +04:00
|
|
|
.endif # }
|
2001-12-12 08:50:09 +03:00
|
|
|
|
2008-08-24 10:27:00 +04:00
|
|
|
.if defined(HAVE_GCC) && ${USETOOLS_GCC:Uyes} == "yes" # {
|
2001-09-22 09:45:50 +04:00
|
|
|
CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
|
2001-12-12 08:50:09 +03:00
|
|
|
CPP= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-cpp
|
|
|
|
CXX= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-c++
|
|
|
|
FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-g77
|
|
|
|
OBJC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-gcc
|
2003-07-18 12:26:01 +04:00
|
|
|
.endif # }
|
2008-08-24 10:27:00 +04:00
|
|
|
|
|
|
|
.if defined(HAVE_PCC) && ${USETOOLS_PCC:Uyes} == "yes"
|
|
|
|
CC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-pcc
|
|
|
|
CPP= ${TOOLDIR}/libexec/${MACHINE_GNU_PLATFORM}-cpp
|
|
|
|
CXX= false
|
|
|
|
FC= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-f77
|
|
|
|
OBJC= false
|
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
.endif # EXTERNAL_TOOLCHAIN # }
|
2001-12-12 08:50:09 +03:00
|
|
|
|
2003-07-10 14:33:58 +04:00
|
|
|
HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
|
|
|
|
|
2001-11-09 10:30:55 +03:00
|
|
|
DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
|
2002-12-08 23:19:56 +03:00
|
|
|
ELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
|
2007-07-03 20:29:24 +04:00
|
|
|
INSTALL= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-install
|
2002-12-08 23:19:56 +03:00
|
|
|
LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
|
2001-11-13 20:37:03 +03:00
|
|
|
LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
|
2003-07-10 14:33:58 +04:00
|
|
|
LORDER= NM=${NM:Q} MKTEMP=${TOOL_MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
|
2002-12-08 23:19:56 +03:00
|
|
|
MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
|
2006-11-10 20:13:15 +03:00
|
|
|
PAXCTL= ${TOOLDIR}/bin/${_TOOL_PREFIX}paxctl
|
2002-12-08 23:19:56 +03:00
|
|
|
TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
|
|
|
|
YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
|
2003-07-10 14:33:58 +04:00
|
|
|
|
2004-11-28 10:00:52 +03:00
|
|
|
TOOL_AMIGAAOUT2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-aout2bb
|
|
|
|
TOOL_AMIGAELF2BB= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-elf2bb
|
|
|
|
TOOL_AMIGATXLT= ${TOOLDIR}/bin/${_TOOL_PREFIX}amiga-txlt
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
|
2007-11-12 17:54:43 +03:00
|
|
|
TOOL_ATF_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}atf-compile
|
2004-11-25 11:09:14 +03:00
|
|
|
TOOL_BEBOXELF2PEF= ${TOOLDIR}/bin/${_TOOL_PREFIX}bebox-elf2pef
|
|
|
|
TOOL_BEBOXMKBOOTIMAGE= ${TOOLDIR}/bin/${_TOOL_PREFIX}bebox-mkbootimage
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
|
|
|
|
TOOL_CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
|
|
|
|
TOOL_CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
|
|
|
|
TOOL_COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
|
|
|
|
TOOL_CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
|
|
|
|
TOOL_CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
|
|
|
|
TOOL_CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
|
|
|
|
TOOL_DB= ${TOOLDIR}/bin/${_TOOL_PREFIX}db
|
|
|
|
TOOL_EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
|
|
|
|
TOOL_FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
|
2005-05-30 19:52:16 +04:00
|
|
|
TOOL_GENASSYM= ${TOOLDIR}/bin/${_TOOL_PREFIX}genassym
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
|
2006-03-30 01:12:20 +04:00
|
|
|
TOOL_GMAKE= ${TOOLDIR}/bin/${_TOOL_PREFIX}gmake
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
|
|
|
|
TOOL_HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
|
2004-11-28 14:14:41 +03:00
|
|
|
TOOL_HP300MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp300-mkboot
|
2008-05-10 23:01:14 +04:00
|
|
|
TOOL_HP700MKBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}hp700-mkboot
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
|
|
|
|
TOOL_INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
|
|
|
|
TOOL_INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
|
2007-01-14 19:19:55 +03:00
|
|
|
TOOL_JOIN= ${TOOLDIR}/bin/${_TOOL_PREFIX}join
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
|
2003-12-11 03:28:08 +03:00
|
|
|
TOOL_MACPPCFIXCOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}macppc-fixcoff
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
|
|
|
|
TOOL_MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
|
|
|
|
TOOL_MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
|
|
|
|
TOOL_MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
|
2006-12-09 23:13:13 +03:00
|
|
|
TOOL_DISKLABEL= ${TOOLDIR}/bin/nbdisklabel-${MAKEWRAPPERMACHINE}
|
2005-06-12 23:31:25 +04:00
|
|
|
TOOL_FDISK= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-fdisk
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
|
2004-11-25 11:09:14 +03:00
|
|
|
TOOL_MIPSELF2ECOFF= ${TOOLDIR}/bin/${_TOOL_PREFIX}mips-elf2ecoff
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_MKCSMAPPER= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkcsmapper
|
|
|
|
TOOL_MKESDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}mkesdb
|
|
|
|
TOOL_MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
|
|
|
|
TOOL_MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
|
|
|
|
TOOL_MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
|
|
|
|
TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
|
|
|
|
TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
|
|
|
|
TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
|
|
|
|
TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
|
2008-05-01 01:15:33 +04:00
|
|
|
TOOL_POWERPCMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}powerpc-mkbootimage
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
|
|
|
|
TOOL_REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
|
|
|
|
TOOL_ROFF_ASCII= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}nroff
|
|
|
|
TOOL_ROFF_DVI= ${TOOL_GROFF} -Tdvi
|
2003-07-18 06:52:51 +04:00
|
|
|
TOOL_ROFF_HTML= ${TOOL_GROFF} -Tlatin1 -mdoc2html
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_ROFF_PS= ${TOOL_GROFF} -Tps
|
|
|
|
TOOL_ROFF_RAW= ${TOOL_GROFF} -Z
|
2008-01-29 17:14:54 +03:00
|
|
|
TOOL_RPCGEN= RPCGEN_CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
|
2006-06-18 18:38:48 +04:00
|
|
|
TOOL_SED= ${TOOLDIR}/bin/${_TOOL_PREFIX}sed
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
|
2003-07-20 18:36:12 +04:00
|
|
|
TOOL_STAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}stat
|
2004-06-09 01:46:52 +04:00
|
|
|
TOOL_SPARKCRC= ${TOOLDIR}/bin/${_TOOL_PREFIX}sparkcrc
|
2008-09-26 22:23:09 +04:00
|
|
|
TOOL_STRFILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}strfile
|
2003-07-10 14:33:58 +04:00
|
|
|
TOOL_SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
|
|
|
|
TOOL_TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
|
|
|
|
TOOL_UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
|
|
|
|
TOOL_VGRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
|
|
|
|
TOOL_ZIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}zic
|
2001-09-22 09:45:50 +04:00
|
|
|
|
2002-03-19 14:03:05 +03:00
|
|
|
.endif # USETOOLS == yes # }
|
2002-03-05 06:53:58 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-03-05 06:53:58 +03:00
|
|
|
# Targets to check if DESTDIR or RELEASEDIR is provided
|
|
|
|
#
|
|
|
|
.if !target(check_DESTDIR)
|
|
|
|
check_DESTDIR: .PHONY .NOTMAIN
|
|
|
|
.if !defined(DESTDIR)
|
|
|
|
@echo "setenv DESTDIR before doing that!"
|
|
|
|
@false
|
|
|
|
.else
|
|
|
|
@true
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if !target(check_RELEASEDIR)
|
|
|
|
check_RELEASEDIR: .PHONY .NOTMAIN
|
|
|
|
.if !defined(RELEASEDIR)
|
|
|
|
@echo "setenv RELEASEDIR before doing that!"
|
|
|
|
@false
|
|
|
|
.else
|
|
|
|
@true
|
|
|
|
.endif
|
|
|
|
.endif
|
|
|
|
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
.if ${USETOOLS} == "yes" # {
|
|
|
|
#
|
2001-09-22 09:45:50 +04:00
|
|
|
# Make sure DESTDIR is set, so that builds with these tools always
|
|
|
|
# get appropriate -nostdinc, -nostdlib, etc. handling. The default is
|
|
|
|
# <empty string>, meaning start from /, the root directory.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-09-22 09:45:50 +04:00
|
|
|
DESTDIR?=
|
2003-07-18 12:26:01 +04:00
|
|
|
.endif # }
|
2001-09-22 09:45:50 +04:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-08-27 18:46:11 +04:00
|
|
|
# Build a dynamically linked /bin and /sbin, with the necessary shared
|
|
|
|
# libraries moved from /usr/lib to /lib and the shared linker moved
|
|
|
|
# from /usr/libexec to /lib
|
|
|
|
#
|
Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.
The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.
The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-28 01:37:50 +04:00
|
|
|
# Note that if the BINDIR is not /bin or /sbin, then we always use the
|
|
|
|
# non-DYNAMICROOT behavior (i.e. it is only enabled for programs in /bin
|
|
|
|
# and /sbin). See <bsd.shlib.mk>.
|
|
|
|
#
|
2002-09-22 19:08:17 +04:00
|
|
|
MKDYNAMICROOT?= yes
|
2002-08-27 18:46:11 +04:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-04-26 18:27:23 +04:00
|
|
|
# Where the system object and source trees are kept; can be configurable
|
|
|
|
# by the user in case they want them in ~/foosrc and ~/fooobj (for example).
|
|
|
|
#
|
|
|
|
BSDSRCDIR?= /usr/src
|
|
|
|
BSDOBJDIR?= /usr/obj
|
2002-04-26 19:02:02 +04:00
|
|
|
NETBSDSRCDIR?= ${BSDSRCDIR}
|
2002-04-26 18:27:23 +04:00
|
|
|
|
1998-02-26 11:46:09 +03:00
|
|
|
BINGRP?= wheel
|
|
|
|
BINOWN?= root
|
1993-04-10 00:05:56 +04:00
|
|
|
BINMODE?= 555
|
1993-08-16 00:42:39 +04:00
|
|
|
NONBINMODE?= 444
|
1993-04-10 00:05:56 +04:00
|
|
|
|
1997-03-25 00:54:12 +03:00
|
|
|
MANDIR?= /usr/share/man
|
1998-02-26 11:46:09 +03:00
|
|
|
MANGRP?= wheel
|
|
|
|
MANOWN?= root
|
1993-08-16 00:42:39 +04:00
|
|
|
MANMODE?= ${NONBINMODE}
|
2008-08-31 05:21:41 +04:00
|
|
|
MANINSTALL?= catinstall htmlinstall maninstall
|
1993-04-10 00:05:56 +04:00
|
|
|
|
1999-02-11 16:25:42 +03:00
|
|
|
INFODIR?= /usr/share/info
|
|
|
|
INFOGRP?= wheel
|
|
|
|
INFOOWN?= root
|
|
|
|
INFOMODE?= ${NONBINMODE}
|
|
|
|
|
1993-08-16 00:42:39 +04:00
|
|
|
LIBDIR?= /usr/lib
|
Only use the MKDYNAMICROOT semantics (i.e. -rpath=/lib,/usr/lib and
-dynamic-linker=/libexec/ld.elf_so) if the BINDIR of the program being
built is /bin or /sbin.
The reason we do this is because now all programs *except* those in
/bin and /sbin (i.e. the "special cases") match the default the compiler
uses, which is what is used for things in e.g. xsrc, pkgsrc, and other
random 3rd party programs.
This is done by decoupling where a shlib is installed from how it
is located. Two new variables, SHLIBINSTALLDIR and SHLINKINSTALLDIR,
contain the former information, and key off MKDYNAMICROOT only. SHLIBDIR
and SHLINKDIR contain the latter, and key off MKDYNAMICROOT and BINDIR.
The SHLIBINSTALLDIR, SHLIBDIR, _LIBSODIR, SHLINKINSTALLDIR, and
SHLINKDIR parameters are moved to a new <bsd.shlib.mk>; see bsd.README
for usage details.
2002-09-28 01:37:50 +04:00
|
|
|
|
1993-08-16 00:42:39 +04:00
|
|
|
LINTLIBDIR?= /usr/libdata/lint
|
|
|
|
LIBGRP?= ${BINGRP}
|
|
|
|
LIBOWN?= ${BINOWN}
|
|
|
|
LIBMODE?= ${NONBINMODE}
|
1993-04-10 00:05:56 +04:00
|
|
|
|
2000-04-24 18:22:05 +04:00
|
|
|
DOCDIR?= /usr/share/doc
|
2000-05-02 15:44:20 +04:00
|
|
|
HTMLDOCDIR?= /usr/share/doc/html
|
1998-02-26 11:46:09 +03:00
|
|
|
DOCGRP?= wheel
|
|
|
|
DOCOWN?= root
|
2000-04-24 18:22:05 +04:00
|
|
|
DOCMODE?= ${NONBINMODE}
|
1993-08-16 00:42:39 +04:00
|
|
|
|
1995-02-21 00:26:33 +03:00
|
|
|
NLSDIR?= /usr/share/nls
|
1998-02-26 11:46:09 +03:00
|
|
|
NLSGRP?= wheel
|
|
|
|
NLSOWN?= root
|
1995-02-21 00:26:33 +03:00
|
|
|
NLSMODE?= ${NONBINMODE}
|
|
|
|
|
1996-08-28 02:15:52 +04:00
|
|
|
KMODDIR?= /usr/lkm
|
1998-02-26 11:46:09 +03:00
|
|
|
KMODGRP?= wheel
|
|
|
|
KMODOWN?= root
|
1996-08-28 02:15:52 +04:00
|
|
|
KMODMODE?= ${NONBINMODE}
|
|
|
|
|
2008-05-03 03:12:00 +04:00
|
|
|
KMODULEGRP?= wheel
|
|
|
|
KMODULEOWN?= root
|
|
|
|
KMODULEMODE?= ${NONBINMODE}
|
|
|
|
|
2001-02-01 22:29:59 +03:00
|
|
|
LOCALEDIR?= /usr/share/locale
|
|
|
|
LOCALEGRP?= wheel
|
|
|
|
LOCALEOWN?= root
|
|
|
|
LOCALEMODE?= ${NONBINMODE}
|
|
|
|
|
2006-06-07 22:49:36 +04:00
|
|
|
FIRMWAREDIR?= /libdata/firmware
|
|
|
|
FIRMWAREGRP?= wheel
|
|
|
|
FIRMWAREOWN?= root
|
|
|
|
FIRMWAREMODE?= ${NONBINMODE}
|
|
|
|
|
2006-07-23 15:41:24 +04:00
|
|
|
DEBUGDIR?= /usr/libdata/debug
|
|
|
|
DEBUGGRP?= wheel
|
|
|
|
DEBUGOWN?= root
|
|
|
|
DEBUGMODE?= ${NONBINMODE}
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
|
|
|
# Data-driven table using make variables to control how
|
2002-01-29 22:17:49 +03:00
|
|
|
# toolchain-dependent targets and shared libraries are built
|
|
|
|
# for different platforms and object formats.
|
|
|
|
#
|
2002-06-05 06:42:09 +04:00
|
|
|
# OBJECT_FMT: currently either "ELF" or "a.out".
|
2002-01-29 22:17:49 +03:00
|
|
|
#
|
2008-01-09 14:25:58 +03:00
|
|
|
# All platforms are ELF.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2002-06-05 06:42:09 +04:00
|
|
|
OBJECT_FMT= ELF
|
2002-01-29 22:17:49 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
# If this platform's toolchain is missing, we obviously cannot build it.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2004-01-02 19:12:36 +03:00
|
|
|
.if ${TOOLCHAIN_MISSING} != "no"
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
MKBFD:= no
|
|
|
|
MKGDB:= no
|
|
|
|
MKGCC:= no
|
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
# If we are using an external toolchain, we can still build the target's
|
|
|
|
# BFD stuff, but we cannot build GCC's support libraries, since those are
|
|
|
|
# tightly-coupled to the version of GCC being used.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
* Eliminate the USE_NEW_TOOLCHAIN variable. Instead, split it into
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
2002-09-18 03:18:25 +04:00
|
|
|
.if defined(EXTERNAL_TOOLCHAIN)
|
|
|
|
MKGCC:= no
|
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-07-13 16:44:22 +04:00
|
|
|
# The m68000 port is incomplete.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-07-13 16:44:22 +04:00
|
|
|
.if ${MACHINE_ARCH} == "m68000"
|
2001-12-12 02:25:23 +03:00
|
|
|
NOPIC= # defined
|
2006-06-24 09:24:56 +04:00
|
|
|
MKISCSI= no
|
|
|
|
# XXX GCC 4 outputs mcount() calling sequences that try to load values
|
|
|
|
# from over 64KB away and this fails to assemble.
|
2008-08-24 10:27:00 +04:00
|
|
|
.if defined(HAVE_GCC) && (${HAVE_GCC} == 4)
|
2006-06-24 09:24:56 +04:00
|
|
|
NOPROFILE= # defined
|
|
|
|
.endif
|
2001-07-13 16:44:22 +04:00
|
|
|
.endif
|
|
|
|
|
2005-08-17 11:13:32 +04:00
|
|
|
#
|
|
|
|
# The ia64 port is incomplete.
|
|
|
|
#
|
|
|
|
.if ${MACHINE_ARCH} == "ia64"
|
|
|
|
MKLINT= no
|
2006-09-14 10:28:47 +04:00
|
|
|
MKGDB= no
|
2005-08-17 11:13:32 +04:00
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2003-04-12 02:40:31 +04:00
|
|
|
# On the MIPS, all libs are compiled with ABIcalls (and are thus PIC),
|
|
|
|
# not just shared libraries, so don't build the _pic version.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2003-04-12 02:40:31 +04:00
|
|
|
.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
|
|
|
|
MKPICLIB:= no
|
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2003-04-12 02:40:31 +04:00
|
|
|
# On VAX using ELF, all objects are PIC, not just shared libraries,
|
2003-12-08 01:23:00 +03:00
|
|
|
# so don't build the _pic version. Unless we are using GCC3 which
|
|
|
|
# doesn't support PIC yet.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2007-03-31 09:58:30 +04:00
|
|
|
.if ${MACHINE_ARCH} == "vax"
|
|
|
|
MKPICLIB= no
|
2003-04-12 02:40:31 +04:00
|
|
|
.endif
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
1999-06-10 04:38:49 +04:00
|
|
|
# Location of the file that contains the major and minor numbers of the
|
|
|
|
# version of a shared library. If this file exists a shared library
|
|
|
|
# will be built by <bsd.lib.mk>.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
1999-06-10 04:38:49 +04:00
|
|
|
SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
|
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
1998-05-22 20:43:42 +04:00
|
|
|
# GNU sources and packages sometimes see architecture names differently.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2007-03-31 09:58:30 +04:00
|
|
|
GNU_ARCH.coldfire=m68k
|
2002-01-28 22:22:52 +03:00
|
|
|
GNU_ARCH.m68000=m68010
|
2001-01-04 13:29:11 +03:00
|
|
|
GNU_ARCH.sh3eb=sh
|
2001-12-15 04:50:33 +03:00
|
|
|
GNU_ARCH.sh3el=shle
|
2006-08-26 03:35:04 +04:00
|
|
|
GNU_ARCH.mips64eb=mips64
|
2001-08-14 13:31:42 +04:00
|
|
|
MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}:U${MACHINE_ARCH}}
|
2001-06-02 05:53:29 +04:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-06-02 05:53:29 +04:00
|
|
|
# In order to identify NetBSD to GNU packages, we sometimes need
|
|
|
|
# an "elf" tag for historically a.out platforms.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-06-02 06:22:35 +04:00
|
|
|
.if ${OBJECT_FMT} == "ELF" && \
|
2001-10-23 21:15:21 +04:00
|
|
|
(${MACHINE_GNU_ARCH} == "arm" || \
|
2002-05-20 18:34:07 +04:00
|
|
|
${MACHINE_GNU_ARCH} == "armeb" || \
|
2001-07-23 21:13:44 +04:00
|
|
|
${MACHINE_ARCH} == "i386" || \
|
2007-03-31 09:58:30 +04:00
|
|
|
${MACHINE_CPU} == "m68k" || \
|
2001-12-15 03:39:08 +03:00
|
|
|
${MACHINE_GNU_ARCH} == "sh" || \
|
2001-12-15 04:50:33 +03:00
|
|
|
${MACHINE_GNU_ARCH} == "shle" || \
|
2001-07-23 21:13:44 +04:00
|
|
|
${MACHINE_ARCH} == "sparc" || \
|
|
|
|
${MACHINE_ARCH} == "vax")
|
2002-11-26 22:51:16 +03:00
|
|
|
MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsdelf
|
2001-06-02 05:53:29 +04:00
|
|
|
.else
|
2002-11-26 22:51:16 +03:00
|
|
|
MACHINE_GNU_PLATFORM?=${MACHINE_GNU_ARCH}--netbsd
|
2001-06-02 05:53:29 +04:00
|
|
|
.endif
|
2001-01-08 10:28:07 +03:00
|
|
|
|
2001-06-01 21:49:32 +04:00
|
|
|
TARGETS+= all clean cleandir depend dependall includes \
|
2008-08-27 06:28:34 +04:00
|
|
|
install lint obj regress tags html
|
2006-11-21 21:25:26 +03:00
|
|
|
PHONY_NOTMAIN = all clean cleandir depend dependall distclean includes \
|
1999-09-14 05:31:11 +04:00
|
|
|
install lint obj regress tags beforedepend afterdepend \
|
2000-09-22 09:37:57 +04:00
|
|
|
beforeinstall afterinstall realinstall realdepend realall \
|
2008-08-27 06:28:34 +04:00
|
|
|
html subdir-all subdir-install subdir-depend
|
2006-11-21 21:25:26 +03:00
|
|
|
.PHONY: ${PHONY_NOTMAIN}
|
|
|
|
.NOTMAIN: ${PHONY_NOTMAIN}
|
1997-05-07 19:53:28 +04:00
|
|
|
|
2004-01-02 19:12:36 +03:00
|
|
|
.if ${NEED_OWN_INSTALL_TARGET} != "no"
|
1997-10-23 16:44:28 +04:00
|
|
|
.if !target(install)
|
2006-11-21 21:25:26 +03:00
|
|
|
install: beforeinstall .WAIT subdir-install realinstall .WAIT afterinstall
|
|
|
|
beforeinstall:
|
|
|
|
subdir-install:
|
|
|
|
realinstall:
|
|
|
|
afterinstall:
|
1997-05-07 19:53:28 +04:00
|
|
|
.endif
|
2006-11-21 21:25:26 +03:00
|
|
|
all: realall subdir-all
|
|
|
|
subdir-all:
|
|
|
|
realall:
|
|
|
|
depend: realdepend subdir-depend
|
|
|
|
subdir-depend:
|
|
|
|
realdepend:
|
|
|
|
distclean: cleandir
|
|
|
|
cleandir: clean
|
2001-11-02 08:21:47 +03:00
|
|
|
|
|
|
|
dependall: .NOTMAIN realdepend .MAKE
|
|
|
|
@cd ${.CURDIR}; ${MAKE} realall
|
2000-01-22 22:53:53 +03:00
|
|
|
.endif
|
1998-04-13 16:03:07 +04:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
1999-02-12 04:10:06 +03:00
|
|
|
# Define MKxxx variables (which are either yes or no) for users
|
2003-07-28 11:03:43 +04:00
|
|
|
# to set in /etc/mk.conf and override in the make environment.
|
1999-02-12 04:10:06 +03:00
|
|
|
# These should be tested with `== "no"' or `!= "no"'.
|
2003-07-18 06:52:51 +04:00
|
|
|
# The NOxxx variables should only be set by Makefiles.
|
1999-02-12 04:10:06 +03:00
|
|
|
#
|
2006-07-23 16:31:29 +04:00
|
|
|
# Please keep etc/Makefile and share/man/man5/mk.conf.5 in sync
|
|
|
|
# with changes to the MK* variables here.
|
|
|
|
#
|
1999-02-12 04:10:06 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-12-12 02:25:23 +03:00
|
|
|
# Supported NO* options (if defined, MK* will be forced to "no",
|
|
|
|
# regardless of user's mk.conf setting).
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2008-03-10 04:18:29 +03:00
|
|
|
# Source makefiles should set NO*, and not MK*, and must do so before
|
|
|
|
# including bsd.own.mk.
|
|
|
|
#
|
2004-07-30 08:18:48 +04:00
|
|
|
.for var in \
|
2008-03-10 04:18:29 +03:00
|
|
|
NOCRYPTO NODOC NOHTML NOLINKLIB NOLINT NOMAN NONLS NOOBJ NOPIC \
|
|
|
|
NOPICINSTALL NOPROFILE NOSHARE NOSTATICLIB
|
|
|
|
.if defined(${var})
|
|
|
|
MK${var:S/^NO//}:= no
|
1999-02-12 15:38:44 +03:00
|
|
|
.endif
|
2001-12-12 02:25:23 +03:00
|
|
|
.endfor
|
1999-02-12 04:10:06 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
|
|
|
# Older-style variables that enabled behaviour when set.
|
|
|
|
#
|
|
|
|
.for var in MANZ UNPRIVED UPDATE
|
|
|
|
.if defined(${var})
|
|
|
|
MK${var}:= yes
|
2002-02-07 03:53:34 +03:00
|
|
|
.endif
|
2003-07-18 12:26:01 +04:00
|
|
|
.endfor
|
2002-02-07 03:53:34 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-12-12 02:25:23 +03:00
|
|
|
# MK* options which default to "yes".
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2004-07-30 08:18:48 +04:00
|
|
|
.for var in \
|
2008-07-12 16:15:43 +04:00
|
|
|
MKATF \
|
2008-03-24 08:00:31 +03:00
|
|
|
MKBFD MKBINUTILS \
|
2008-07-12 16:15:43 +04:00
|
|
|
MKCATPAGES MKCRYPTO MKCOMPLEX MKCVS \
|
2008-03-24 08:00:31 +03:00
|
|
|
MKDOC \
|
|
|
|
MKGCC MKGCCCMDS MKGDB \
|
2008-08-31 05:21:41 +04:00
|
|
|
MKHESIOD MKHTML \
|
2008-03-24 08:00:31 +03:00
|
|
|
MKIEEEFP MKINET6 MKINFO MKIPFILTER MKISCSI \
|
|
|
|
MKKERBEROS \
|
2008-05-23 17:06:40 +04:00
|
|
|
MKLDAP MKLINKLIB MKLINT \
|
2008-03-24 08:00:31 +03:00
|
|
|
MKMAN \
|
2008-08-31 09:40:15 +04:00
|
|
|
MKNLS \
|
2008-03-24 08:00:31 +03:00
|
|
|
MKOBJ \
|
2008-08-24 10:27:00 +04:00
|
|
|
MKPAM \
|
|
|
|
MKPF MKPIC MKPICINSTALL MKPICLIB MKPOSTFIX MKPROFILE \
|
2008-03-24 08:00:31 +03:00
|
|
|
MKSHARE MKSKEY MKSTATICLIB \
|
|
|
|
MKYP
|
|
|
|
${var}?= yes
|
2001-12-12 02:25:23 +03:00
|
|
|
.endfor
|
1999-02-12 04:10:06 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-12-12 02:25:23 +03:00
|
|
|
# MK* options which default to "no".
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2004-07-30 08:18:48 +04:00
|
|
|
.for var in \
|
2008-03-24 08:00:31 +03:00
|
|
|
MKCRYPTO_IDEA MKCRYPTO_MDC2 MKCRYPTO_RC5 MKDEBUG MKDEBUGLIB \
|
2008-07-12 16:15:43 +04:00
|
|
|
MKMANZ MKMODULAR MKOBJDIRS \
|
|
|
|
MKPCC MKPCCCMDS \
|
2008-09-09 15:54:19 +04:00
|
|
|
MKPUFFS MKSOFTFLOAT MKSTRIPIDENT \
|
2008-07-29 08:40:14 +04:00
|
|
|
MKUNPRIVED MKUPDATE MKX11 MKXORG
|
2008-03-24 08:00:31 +03:00
|
|
|
${var}?=no
|
2001-12-12 02:25:23 +03:00
|
|
|
.endfor
|
1999-02-12 04:10:06 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2001-12-12 02:25:23 +03:00
|
|
|
# Force some options off if their dependencies are off.
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
.if ${MKCRYPTO} == "no"
|
|
|
|
MKKERBEROS:= no
|
1999-02-12 04:10:06 +03:00
|
|
|
.endif
|
|
|
|
|
2003-07-18 06:52:51 +04:00
|
|
|
.if ${MKMAN} == "no"
|
2003-07-18 12:26:01 +04:00
|
|
|
MKCATPAGES:= no
|
2003-07-18 06:52:51 +04:00
|
|
|
MKHTML:= no
|
|
|
|
.endif
|
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
.if ${MKLINKLIB} == "no"
|
2008-05-02 15:45:19 +04:00
|
|
|
MKLINT:= no
|
2001-12-12 02:25:23 +03:00
|
|
|
MKPICINSTALL:= no
|
|
|
|
MKPROFILE:= no
|
1999-02-12 04:10:06 +03:00
|
|
|
.endif
|
|
|
|
|
2003-04-12 02:40:31 +04:00
|
|
|
.if ${MKPIC} == "no"
|
|
|
|
MKPICLIB:= no
|
|
|
|
.endif
|
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
.if ${MKOBJ} == "no"
|
|
|
|
MKOBJDIRS:= no
|
1999-02-12 04:10:06 +03:00
|
|
|
.endif
|
|
|
|
|
1999-02-12 15:38:44 +03:00
|
|
|
.if ${MKSHARE} == "no"
|
2001-12-12 02:25:23 +03:00
|
|
|
MKCATPAGES:= no
|
|
|
|
MKDOC:= no
|
|
|
|
MKINFO:= no
|
2003-07-18 12:26:01 +04:00
|
|
|
MKHTML:= no
|
2001-12-12 02:25:23 +03:00
|
|
|
MKMAN:= no
|
|
|
|
MKNLS:= no
|
1999-02-12 15:38:44 +03:00
|
|
|
.endif
|
1999-02-12 04:10:06 +03:00
|
|
|
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
|
|
|
# install(1) parameters.
|
|
|
|
#
|
|
|
|
COPY?= -c
|
|
|
|
.if ${MKUPDATE} == "no"
|
|
|
|
PRESERVE?=
|
|
|
|
.else
|
|
|
|
PRESERVE?= -p
|
|
|
|
.endif
|
|
|
|
RENAME?= -r
|
|
|
|
HRDLINK?= -l h
|
2006-03-20 21:18:41 +03:00
|
|
|
SYMLINK?= -l s
|
2003-07-18 12:26:01 +04:00
|
|
|
|
|
|
|
METALOG?= ${DESTDIR}/METALOG
|
|
|
|
METALOG.add?= ${TOOL_CAT} -l >> ${METALOG}
|
|
|
|
.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
|
|
|
|
.if ${MKUNPRIVED} != "no"
|
2004-01-30 11:48:18 +03:00
|
|
|
INSTPRIV.unpriv=-U -M ${METALOG} -D ${DESTDIR} -h sha1
|
2003-07-18 12:26:01 +04:00
|
|
|
.else
|
|
|
|
INSTPRIV.unpriv=
|
|
|
|
.endif
|
|
|
|
INSTPRIV?= ${INSTPRIV.unpriv} -N ${NETBSDSRCDIR}/etc
|
|
|
|
.endif
|
2004-02-13 08:13:37 +03:00
|
|
|
STRIPFLAG?=
|
2003-07-18 12:26:01 +04:00
|
|
|
|
2004-01-02 19:12:36 +03:00
|
|
|
.if ${NEED_OWN_INSTALL_TARGET} != "no"
|
2003-07-18 12:26:01 +04:00
|
|
|
INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d
|
|
|
|
INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
|
|
|
|
INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
|
|
|
|
INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
|
|
|
|
HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
|
2005-06-12 23:31:25 +04:00
|
|
|
HOST_INSTALL_DIR?= ${INSTALL} -d
|
|
|
|
HOST_INSTALL_SYMLINK?= ${INSTALL} ${SYMLINK} ${RENAME}
|
2003-07-18 12:26:01 +04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
#
|
2003-07-28 12:53:53 +04:00
|
|
|
# Set defaults for the USE_xxx variables.
|
|
|
|
#
|
|
|
|
|
2005-01-12 03:39:48 +03:00
|
|
|
#
|
|
|
|
# USE_* options which default to "no" and will be forced to "no" if their
|
|
|
|
# corresponding MK* variable is set to "no".
|
|
|
|
#
|
2008-03-31 06:42:27 +04:00
|
|
|
.for var in USE_SKEY
|
|
|
|
.if (${${var:S/USE_/MK/}} == "no")
|
|
|
|
${var}:= no
|
|
|
|
.else
|
|
|
|
${var}?= no
|
|
|
|
.endif
|
|
|
|
.endfor
|
2005-01-12 03:39:48 +03:00
|
|
|
|
2003-07-28 12:53:53 +04:00
|
|
|
#
|
|
|
|
# USE_* options which default to "yes" unless their corresponding MK*
|
|
|
|
# variable is set to "no".
|
2003-07-18 12:26:01 +04:00
|
|
|
#
|
2008-05-22 17:40:30 +04:00
|
|
|
.for var in USE_HESIOD USE_INET6 USE_KERBEROS USE_LDAP USE_PAM USE_YP
|
2008-03-24 08:00:31 +03:00
|
|
|
.if (${${var:S/USE_/MK/}} == "no")
|
|
|
|
${var}:= no
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
.else
|
2008-03-24 08:00:31 +03:00
|
|
|
${var}?= yes
|
Split the notion of building Hesiod, Kerberos, S/key, and YP
infrastructure and using that infrastructure in programs.
* MKHESIOD, MKKERBEROS, MKSKEY, and MKYP control building
of the infratsructure (libraries, support programs, etc.)
* USE_HESIOD, USE_KERBEROS, USE_SKEY, and USE_YP control
building of support for using the corresponding API
in various libraries/programs that can use it.
As discussed on tech-toolchain.
2002-03-22 21:10:19 +03:00
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
2003-07-28 12:53:53 +04:00
|
|
|
#
|
|
|
|
# USE_* options which default to "yes".
|
|
|
|
#
|
2008-03-24 08:00:31 +03:00
|
|
|
.for var in USE_JEMALLOC
|
|
|
|
${var}?= yes
|
2007-10-06 04:21:44 +04:00
|
|
|
.endfor
|
2003-07-28 12:53:53 +04:00
|
|
|
|
2006-03-30 01:03:39 +04:00
|
|
|
#
|
|
|
|
# USE_* options which default to "no".
|
|
|
|
#
|
2006-10-09 12:32:11 +04:00
|
|
|
#.for var in
|
2008-03-24 08:00:31 +03:00
|
|
|
#${var}?= no
|
2006-10-09 12:32:11 +04:00
|
|
|
#.endfor
|
2002-07-03 15:51:34 +04:00
|
|
|
|
2003-09-12 11:44:10 +04:00
|
|
|
#
|
2008-08-28 11:53:34 +04:00
|
|
|
# Where X11 sources are and where it is installed to.
|
2003-09-12 11:44:10 +04:00
|
|
|
#
|
|
|
|
X11SRCDIR?= /usr/xsrc
|
|
|
|
X11SRCDIR.xc?= ${X11SRCDIR}/xfree/xc
|
|
|
|
X11SRCDIR.local?= ${X11SRCDIR}/local
|
2008-08-28 11:53:34 +04:00
|
|
|
.if ${MKXORG} != "no"
|
|
|
|
X11ROOTDIR?= /usr/X11R7
|
|
|
|
.else
|
2003-09-12 11:44:10 +04:00
|
|
|
X11ROOTDIR?= /usr/X11R6
|
2008-08-28 11:53:34 +04:00
|
|
|
.endif
|
2003-09-12 11:44:10 +04:00
|
|
|
X11BINDIR?= ${X11ROOTDIR}/bin
|
2004-05-12 17:49:01 +04:00
|
|
|
X11ETCDIR?= /etc/X11
|
2003-09-12 11:44:10 +04:00
|
|
|
X11FONTDIR?= ${X11ROOTDIR}/lib/X11/fonts
|
|
|
|
X11INCDIR?= ${X11ROOTDIR}/include
|
|
|
|
X11LIBDIR?= ${X11ROOTDIR}/lib/X11
|
|
|
|
X11MANDIR?= ${X11ROOTDIR}/man
|
|
|
|
X11USRLIBDIR?= ${X11ROOTDIR}/lib
|
2004-05-12 17:49:01 +04:00
|
|
|
|
2008-07-29 08:40:14 +04:00
|
|
|
#
|
|
|
|
# New modular-xorg based builds
|
|
|
|
#
|
|
|
|
X11SRCDIRMIT?= ${X11SRCDIR}/external/mit
|
|
|
|
.for _lib in \
|
|
|
|
FS ICE SM X11 XScrnSaver XTrap Xau Xcomposite Xcursor Xdamage \
|
|
|
|
Xdmcp Xevie Xext Xfixes Xfont Xft Xi Xinerama Xmu Xp Xpm XprintUtil \
|
|
|
|
Xrandr Xrender Xres Xt Xtst Xv XvMC Xxf86dga Xxf86misc Xxf86vm drm \
|
|
|
|
fontenc xkbfile xkbui Xaw lbxutil Xfontcache XprintAppUtil
|
|
|
|
X11SRCDIR.${_lib}?= ${X11SRCDIRMIT}/lib${_lib}/dist
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for _proto in \
|
|
|
|
xcmisc xext xf86bigfont bigreqs input kb x fonts fixes scrnsaver \
|
|
|
|
xinerama print render resource record video xf86dga xf86misc \
|
|
|
|
xf86vidmode composite damage trap gl randr fontcache xf86dri
|
|
|
|
X11SRCDIR.${_proto}proto?= ${X11SRCDIRMIT}/${_proto}proto/dist
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for _dir in \
|
|
|
|
xtrans fontconfig expat freetype evieext mkfontscale bdftopcf \
|
|
|
|
xkbcomp xorg-cf-files imake xorg-server xbiff xkbdata \
|
2008-08-02 08:35:41 +04:00
|
|
|
xbitmaps appres xeyes xev xedit sessreg pixman \
|
2008-07-29 08:40:14 +04:00
|
|
|
beforelight bitmap editres makedepend fonttosfnt fslsfonts \
|
|
|
|
fstobdf MesaDemos MesaLib ico iceauth lbxproxy listres lndir \
|
|
|
|
luit xproxymanagementprotocol mkfontdir oclock proxymngr rgb \
|
|
|
|
setxkbmap smproxy twm viewres x11perf xauth xcalc xclipboard \
|
|
|
|
xclock xcmsdb xconsole xcutsel xditview xdpyinfo xdriinfo xdm \
|
|
|
|
xfd xf86dga xfindproxy xfontsel xfwp xgamma xgc xhost xinit \
|
|
|
|
xkill xload xlogo xlsatoms xlsclients xlsfonts xmag xmessage \
|
|
|
|
xmh xmodmap xmore xman xprop xrandr xrdb xrefresh xset \
|
|
|
|
xsetmode xsetpointer xsetroot xsm xstdcmap xvidtune xvinfo \
|
|
|
|
xwininfo xwud xprehashprinterlist xplsprinters xkbprint xkbevd \
|
|
|
|
xterm xwd xfs xfsinfo xphelloworld xtrap xkbutils xkbcomp \
|
2008-09-06 09:27:46 +04:00
|
|
|
xkeyboard-config xinput \
|
2008-07-29 08:40:14 +04:00
|
|
|
font-adobe-100dpi font-adobe-75dpi font-adobe-utopia-100dpi \
|
|
|
|
font-adobe-utopia-75dpi font-adobe-utopia-type1 \
|
|
|
|
font-alias \
|
|
|
|
font-bh-100dpi font-bh-75dpi font-bh-lucidatypewriter-100dpi \
|
|
|
|
font-bh-lucidatypewriter-75dpi font-bh-ttf font-bh-type1 \
|
|
|
|
font-bitstream-100dpi font-bitstream-75dpi font-bitstream-type1 \
|
|
|
|
font-cursor-misc font-daewoo-misc font-dec-misc font-ibm-type1 \
|
|
|
|
font-isas-misc font-jis-misc font-misc-misc font-mutt-misc \
|
|
|
|
font-util ttf-bitstream-vera encodings
|
|
|
|
X11SRCDIR.${_dir}?= ${X11SRCDIRMIT}/${_dir}/dist
|
|
|
|
.endfor
|
|
|
|
|
2008-08-02 10:59:24 +04:00
|
|
|
.for _i in \
|
|
|
|
keyboard mouse vmmouse void
|
|
|
|
X11SRCDIR.xf86-input-${_i}?= ${X11SRCDIRMIT}/xf86-input-${_i}/dist
|
|
|
|
.endfor
|
|
|
|
|
|
|
|
.for _v in \
|
|
|
|
apm ark ast ati chips cirrus cyrix glint i128 i740 imstt intel \
|
2008-09-21 06:12:25 +04:00
|
|
|
mach64 mga neomagic nsc nv nvxbox radeonhd rendition \
|
|
|
|
s3 s3virge savage \
|
2008-08-02 10:59:24 +04:00
|
|
|
siliconmotion sis tdfx tga trident tseng vesa vga via vmware wsfb
|
|
|
|
X11SRCDIR.xf86-video-${_v}?= ${X11SRCDIRMIT}/xf86-video-${_v}/dist
|
|
|
|
.endfor
|
|
|
|
|
2008-08-28 11:53:34 +04:00
|
|
|
# Default to no old Xserver builds for now
|
2008-07-29 08:40:14 +04:00
|
|
|
MKXORG_WITH_XSRC_XSERVER?= no
|
|
|
|
|
|
|
|
.if ${MKXORG} != no
|
|
|
|
X11DRI?= yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
X11DRI?= no
|
|
|
|
X11LOADABLE?= yes
|
2003-09-12 11:44:10 +04:00
|
|
|
|
2003-10-21 20:36:58 +04:00
|
|
|
|
2004-04-13 16:25:03 +04:00
|
|
|
#
|
|
|
|
# MAKEDIRTARGET dir target [extra make(1) params]
|
|
|
|
# run "cd $${dir} && ${MAKE} [params] $${target}", with a pretty message
|
|
|
|
#
|
|
|
|
MAKEDIRTARGET=\
|
|
|
|
@_makedirtarget() { \
|
|
|
|
dir="$$1"; shift; \
|
|
|
|
target="$$1"; shift; \
|
|
|
|
case "$${dir}" in \
|
|
|
|
/*) this="$${dir}/"; \
|
|
|
|
real="$${dir}" ;; \
|
|
|
|
.) this="${_THISDIR_}"; \
|
|
|
|
real="${.CURDIR}" ;; \
|
|
|
|
*) this="${_THISDIR_}$${dir}/"; \
|
|
|
|
real="${.CURDIR}/$${dir}" ;; \
|
|
|
|
esac; \
|
|
|
|
show=$${this:-.}; \
|
|
|
|
echo "$${target} ===> $${show%/}$${1:+ (with: $$@)}"; \
|
|
|
|
cd "$${real}" \
|
|
|
|
&& ${MAKE} _THISDIR_="$${this}" "$$@" $${target}; \
|
|
|
|
}; \
|
|
|
|
_makedirtarget
|
|
|
|
|
2003-10-21 20:36:58 +04:00
|
|
|
#
|
|
|
|
# MAKEVERBOSE support. Levels are:
|
2003-10-26 05:17:46 +03:00
|
|
|
# 0 No messages
|
|
|
|
# 1 Enable info messages, suppress command output
|
|
|
|
# 2 Enable info messages and command output
|
2003-10-21 20:36:58 +04:00
|
|
|
#
|
|
|
|
MAKEVERBOSE?= 2
|
|
|
|
|
|
|
|
.if ${MAKEVERBOSE} == 0
|
|
|
|
_MKMSG?= @\#
|
|
|
|
_MKSHMSG?= : echo
|
|
|
|
_MKSHECHO?= : echo
|
2003-10-26 05:17:46 +03:00
|
|
|
.SILENT:
|
2003-10-21 20:36:58 +04:00
|
|
|
.elif ${MAKEVERBOSE} == 1
|
|
|
|
_MKMSG?= @echo ' '
|
|
|
|
_MKSHMSG?= echo ' '
|
|
|
|
_MKSHECHO?= : echo
|
2003-10-26 05:17:46 +03:00
|
|
|
.SILENT:
|
2003-10-21 20:36:58 +04:00
|
|
|
.else # MAKEVERBOSE == 2 ?
|
|
|
|
_MKMSG?= @echo '\# '
|
|
|
|
_MKSHMSG?= echo '\# '
|
|
|
|
_MKSHECHO?= echo
|
2003-10-26 05:17:46 +03:00
|
|
|
.SILENT: __makeverbose_dummy_target__
|
2003-10-21 20:36:58 +04:00
|
|
|
.endif
|
|
|
|
|
|
|
|
_MKMSG_BUILD?= ${_MKMSG} " build "
|
|
|
|
_MKMSG_CREATE?= ${_MKMSG} " create "
|
|
|
|
_MKMSG_COMPILE?= ${_MKMSG} "compile "
|
|
|
|
_MKMSG_FORMAT?= ${_MKMSG} " format "
|
|
|
|
_MKMSG_INSTALL?= ${_MKMSG} "install "
|
|
|
|
_MKMSG_LINK?= ${_MKMSG} " link "
|
|
|
|
_MKMSG_LEX?= ${_MKMSG} " lex "
|
|
|
|
_MKMSG_REMOVE?= ${_MKMSG} " remove "
|
|
|
|
_MKMSG_YACC?= ${_MKMSG} " yacc "
|
|
|
|
|
2003-11-07 03:05:24 +03:00
|
|
|
_MKSHMSG_CREATE?= ${_MKSHMSG} " create "
|
|
|
|
_MKSHMSG_INSTALL?= ${_MKSHMSG} "install "
|
|
|
|
|
2003-11-24 08:44:59 +03:00
|
|
|
_MKTARGET_BUILD?= ${_MKMSG_BUILD} ${.CURDIR:T}/${.TARGET}
|
|
|
|
_MKTARGET_CREATE?= ${_MKMSG_CREATE} ${.CURDIR:T}/${.TARGET}
|
|
|
|
_MKTARGET_COMPILE?= ${_MKMSG_COMPILE} ${.CURDIR:T}/${.TARGET}
|
|
|
|
_MKTARGET_FORMAT?= ${_MKMSG_FORMAT} ${.CURDIR:T}/${.TARGET}
|
|
|
|
_MKTARGET_INSTALL?= ${_MKMSG_INSTALL} ${.TARGET}
|
|
|
|
_MKTARGET_LINK?= ${_MKMSG_LINK} ${.CURDIR:T}/${.TARGET}
|
|
|
|
_MKTARGET_LEX?= ${_MKMSG_LEX} ${.CURDIR:T}/${.TARGET}
|
|
|
|
_MKTARGET_REMOVE?= ${_MKMSG_REMOVE} ${.TARGET}
|
|
|
|
_MKTARGET_YACC?= ${_MKMSG_YACC} ${.CURDIR:T}/${.TARGET}
|
2003-10-21 20:36:58 +04:00
|
|
|
|
2003-07-28 06:38:33 +04:00
|
|
|
.endif # !defined(_BSD_OWN_MK_)
|