2003-05-09 00:39:00 +04:00
|
|
|
# $NetBSD: bsd.own.mk,v 1.333 2003/05/08 20:39:00 christos 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
|
|
|
|
* 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
|
|
|
|
MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:C/sh3e[bl]/sh3/:C/sh5e[bl]/sh5/:S/m68000/m68k/:S/armeb/arm/}
|
|
|
|
|
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.
|
|
|
|
NEED_OWN_INSTALL_TARGET?= yes
|
|
|
|
|
* 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.
|
|
|
|
.if ${MACHINE_CPU} == "hppa" || \
|
|
|
|
${MACHINE_CPU} == "ns32k" || \
|
|
|
|
${MACHINE_CPU} == "sh5" || \
|
|
|
|
${MACHINE_CPU} == "x86_64"
|
|
|
|
TOOLCHAIN_MISSING?= yes
|
|
|
|
.else
|
|
|
|
TOOLCHAIN_MISSING= no
|
2001-10-20 10:11:21 +04:00
|
|
|
.endif
|
2001-10-04 19:52:59 +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
|
|
|
# XXX TEMPORARY: If ns32k and not using an external toolchain, then we have
|
|
|
|
# to use -idirafter rather than -isystem, because the compiler is too old
|
|
|
|
# to use -isystem.
|
|
|
|
.if ${MACHINE_CPU} == "ns32k" && !defined(EXTERNAL_TOOLCHAIN)
|
2001-11-19 05:46:50 +03:00
|
|
|
CPPFLAG_ISYSTEM= -idirafter
|
* 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
|
|
|
.else
|
|
|
|
CPPFLAG_ISYSTEM= -isystem
|
2001-11-19 05:46:50 +03:00
|
|
|
.endif
|
|
|
|
|
2001-11-19 07:44:32 +03:00
|
|
|
.if empty(.MAKEFLAGS:M-V*)
|
|
|
|
PRINTOBJDIR= ${MAKE} -V .OBJDIR
|
|
|
|
.else
|
|
|
|
PRINTOBJDIR= echo # prevent infinite recursion
|
|
|
|
.endif
|
|
|
|
|
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; \
|
|
|
|
cd ..; done
|
|
|
|
|
|
|
|
.MAKEOVERRIDES+= _SRC_TOP_
|
|
|
|
|
2002-04-26 18:27:23 +04:00
|
|
|
.endif # }
|
2001-11-19 07:44:32 +03:00
|
|
|
|
2002-04-26 19:02:02 +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_} != "") && \
|
|
|
|
(${TOOLCHAIN_MISSING} != "yes" || defined(EXTERNAL_TOOLCHAIN))
|
2002-04-26 18:27:23 +04:00
|
|
|
USETOOLS?= yes
|
|
|
|
.endif
|
|
|
|
USETOOLS?= 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
|
|
|
.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "sh3" || \
|
|
|
|
${MACHINE_ARCH} == "sh5"
|
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) && \
|
|
|
|
(${TOOLCHAIN_MISSING} != "yes" || defined(EXTERNAL_TOOLCHAIN)) && \
|
|
|
|
${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
|
|
|
|
|
2001-10-31 20:46:08 +03:00
|
|
|
# Host platform information; may be overridden
|
|
|
|
.if !defined(HOST_OSTYPE)
|
|
|
|
_HOST_OSNAME!= uname -s
|
|
|
|
_HOST_OSREL!= uname -r
|
|
|
|
_HOST_ARCH!= uname -p 2>/dev/null || uname -m
|
2002-01-15 22:13:59 +03:00
|
|
|
HOST_OSTYPE:= ${_HOST_OSNAME}-${_HOST_OSREL:C/\([^\)]*\)//}-${_HOST_ARCH}
|
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" # {
|
|
|
|
|
2001-10-31 20:46:08 +03:00
|
|
|
# Provide a default for TOOLDIR.
|
2001-10-26 08:59:10 +04:00
|
|
|
.if !defined(TOOLDIR)
|
2002-04-26 19:02:02 +04:00
|
|
|
_TOOLOBJ!= cd ${NETBSDSRCDIR}/tools && ${PRINTOBJDIR}
|
2001-10-31 20:46:08 +03:00
|
|
|
TOOLDIR:= ${_TOOLOBJ}/tools.${HOST_OSTYPE}
|
|
|
|
.MAKEOVERRIDES+= TOOLDIR
|
2001-10-26 08:59:10 +04:00
|
|
|
.endif
|
2001-09-22 09:45:50 +04:00
|
|
|
|
2002-12-08 23:19:56 +03:00
|
|
|
# This is the prefix used for the NetBSD-sourced tools.
|
|
|
|
_TOOL_PREFIX?= nb
|
|
|
|
|
2002-11-26 22:51:16 +03:00
|
|
|
# If an external toolchain base is specified, use it.
|
|
|
|
.if defined(EXTERNAL_TOOLCHAIN)
|
|
|
|
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
|
|
|
|
.else
|
2001-10-31 20:46:08 +03:00
|
|
|
# Define default locations for common tools.
|
2001-12-12 08:50:09 +03: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
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if ${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
|
|
|
|
.endif
|
2002-11-26 22:51:16 +03:00
|
|
|
.endif # EXTERNAL_TOOLCHAIN
|
2001-12-12 08:50:09 +03:00
|
|
|
|
2002-12-08 23:19:56 +03:00
|
|
|
ASN1_COMPILE= ${TOOLDIR}/bin/${_TOOL_PREFIX}asn1_compile
|
|
|
|
CAP_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}cap_mkdb
|
|
|
|
CAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}cat
|
|
|
|
CKSUM= ${TOOLDIR}/bin/${_TOOL_PREFIX}cksum
|
|
|
|
COMPILE_ET= ${TOOLDIR}/bin/${_TOOL_PREFIX}compile_et
|
|
|
|
CONFIG= ${TOOLDIR}/bin/${_TOOL_PREFIX}config
|
|
|
|
CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}crunchgen
|
|
|
|
CTAGS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ctags
|
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
|
|
|
|
EQN= ${TOOLDIR}/bin/${_TOOL_PREFIX}eqn
|
|
|
|
FGEN= ${TOOLDIR}/bin/${_TOOL_PREFIX}fgen
|
|
|
|
GENCAT= ${TOOLDIR}/bin/${_TOOL_PREFIX}gencat
|
|
|
|
#GRIND= ${TOOLDIR}/bin/${_TOOL_PREFIX}vgrind -f
|
|
|
|
GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/${_TOOL_PREFIX}groff
|
2003-03-07 04:21:56 +03:00
|
|
|
HEXDUMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}hexdump
|
2002-12-08 23:19:56 +03:00
|
|
|
HOST_MKDEP= ${TOOLDIR}/bin/${_TOOL_PREFIX}host-mkdep
|
|
|
|
INDXBIB= ${TOOLDIR}/bin/${_TOOL_PREFIX}indxbib
|
|
|
|
INSTALL= STRIP=${STRIP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}install
|
|
|
|
INSTALLBOOT= ${TOOLDIR}/bin/${_TOOL_PREFIX}installboot
|
|
|
|
INSTALL_INFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}install-info
|
|
|
|
LEX= ${TOOLDIR}/bin/${_TOOL_PREFIX}lex
|
2001-11-13 20:37:03 +03:00
|
|
|
LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
|
2002-12-08 23:19:56 +03:00
|
|
|
LORDER= NM=${NM:Q} MKTEMP=${MKTEMP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}lorder
|
|
|
|
M4= ${TOOLDIR}/bin/${_TOOL_PREFIX}m4
|
|
|
|
MAKEFS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makefs
|
|
|
|
MAKEINFO= ${TOOLDIR}/bin/${_TOOL_PREFIX}makeinfo
|
|
|
|
MAKEWHATIS= ${TOOLDIR}/bin/${_TOOL_PREFIX}makewhatis
|
2001-10-25 03:58:21 +04:00
|
|
|
MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
|
2002-12-08 23:19:56 +03:00
|
|
|
MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}menuc
|
|
|
|
MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}mkdep
|
|
|
|
MKLOCALE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mklocale
|
2003-03-26 02:35:48 +03:00
|
|
|
MKMAGIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}file
|
2002-12-08 23:19:56 +03:00
|
|
|
MKTEMP= ${TOOLDIR}/bin/${_TOOL_PREFIX}mktemp
|
|
|
|
MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc
|
|
|
|
MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree
|
|
|
|
PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax
|
|
|
|
PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic
|
|
|
|
PREPMKBOOTIMAGE=${TOOLDIR}/bin/${_TOOL_PREFIX}prep-mkbootimage
|
|
|
|
PWD_MKDB= ${TOOLDIR}/bin/${_TOOL_PREFIX}pwd_mkdb
|
|
|
|
REFER= ${TOOLDIR}/bin/${_TOOL_PREFIX}refer
|
|
|
|
RPCGEN= CPP=${CPP:Q} ${TOOLDIR}/bin/${_TOOL_PREFIX}rpcgen
|
|
|
|
SOELIM= ${TOOLDIR}/bin/${_TOOL_PREFIX}soelim
|
|
|
|
SUNLABEL= ${TOOLDIR}/bin/${_TOOL_PREFIX}sunlabel
|
|
|
|
TBL= ${TOOLDIR}/bin/${_TOOL_PREFIX}tbl
|
|
|
|
TSORT= ${TOOLDIR}/bin/${_TOOL_PREFIX}tsort -q
|
|
|
|
UUDECODE= ${TOOLDIR}/bin/${_TOOL_PREFIX}uudecode
|
|
|
|
YACC= ${TOOLDIR}/bin/${_TOOL_PREFIX}yacc
|
|
|
|
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
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
|
2002-03-19 14:03:05 +03: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.
|
|
|
|
DESTDIR?=
|
|
|
|
.endif
|
|
|
|
|
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
|
|
|
|
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
|
|
|
|
1995-06-02 06:52:04 +04:00
|
|
|
# Define MANZ to have the man pages compressed (gzip)
|
|
|
|
#MANZ= 1
|
|
|
|
|
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}
|
1997-10-03 23:20:56 +04:00
|
|
|
MANINSTALL?= maninstall catinstall
|
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}
|
|
|
|
|
2001-02-01 22:29:59 +03:00
|
|
|
LOCALEDIR?= /usr/share/locale
|
|
|
|
LOCALEGRP?= wheel
|
|
|
|
LOCALEOWN?= root
|
|
|
|
LOCALEMODE?= ${NONBINMODE}
|
|
|
|
|
1993-08-16 00:42:39 +04:00
|
|
|
COPY?= -c
|
2001-08-14 10:47:24 +04:00
|
|
|
PRESERVE?= ${UPDATE:D-p}
|
1999-08-16 17:57:03 +04:00
|
|
|
RENAME?= -r
|
2001-11-19 07:44:32 +03:00
|
|
|
HRDLINK?= -l h
|
|
|
|
SYMLINK?= -l s
|
|
|
|
|
2002-05-03 12:58:45 +04:00
|
|
|
METALOG?= ${DESTDIR}/METALOG
|
2002-12-23 09:52:48 +03:00
|
|
|
METALOG.add?= ${CAT} -l >> ${METALOG}
|
2002-12-23 05:23:57 +03:00
|
|
|
.if (${_SRC_TOP_} != "") # only set INSTPRIV if inside ${NETBSDSRCDIR}
|
2002-12-23 09:52:48 +03:00
|
|
|
INSTPRIV?= ${UNPRIVED:D-U -M ${METALOG} -D ${DESTDIR}} -N ${NETBSDSRCDIR}/etc
|
2002-12-23 05:23:57 +03:00
|
|
|
.endif
|
2002-10-22 22:48:27 +04:00
|
|
|
SYSPKGTAG?= ${SYSPKG:D-T ${SYSPKG}_pkg}
|
|
|
|
SYSPKGDOCTAG?= ${SYSPKG:D-T ${SYSPKG}-doc_pkg}
|
1997-04-17 10:34:15 +04:00
|
|
|
STRIPFLAG?= -s
|
1993-07-10 07:56:10 +04:00
|
|
|
|
2001-11-05 22:45:25 +03:00
|
|
|
.if ${NEED_OWN_INSTALL_TARGET} == "yes"
|
2001-11-19 07:44:32 +03:00
|
|
|
INSTALL_DIR?= ${INSTALL} ${INSTPRIV} -d
|
|
|
|
INSTALL_FILE?= ${INSTALL} ${INSTPRIV} ${COPY} ${PRESERVE} ${RENAME}
|
2001-11-25 00:26:34 +03:00
|
|
|
INSTALL_LINK?= ${INSTALL} ${INSTPRIV} ${HRDLINK} ${RENAME}
|
|
|
|
INSTALL_SYMLINK?= ${INSTALL} ${INSTPRIV} ${SYMLINK} ${RENAME}
|
2001-11-19 07:44:32 +03:00
|
|
|
HOST_INSTALL_FILE?= ${INSTALL} ${COPY} ${PRESERVE} ${RENAME}
|
2001-11-05 22:45:25 +03:00
|
|
|
.endif
|
2001-11-02 08:21:47 +03:00
|
|
|
|
2002-01-29 22:17:49 +03:00
|
|
|
# Data-driven table using make variables to control how
|
|
|
|
# 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
|
|
|
#
|
2002-06-05 06:42:09 +04:00
|
|
|
# All platforms are ELF, except for ns32k (which does not yet have
|
|
|
|
# an ELF BFD back-end).
|
|
|
|
.if ${MACHINE_ARCH} == "ns32k"
|
|
|
|
OBJECT_FMT?= a.out # allow overrides, to ease transition
|
2002-01-29 22:17:49 +03:00
|
|
|
.else
|
2002-06-05 06:42:09 +04:00
|
|
|
OBJECT_FMT= ELF
|
2002-01-29 22:17:49 +03:00
|
|
|
.endif
|
|
|
|
|
* 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.
|
|
|
|
.if ${TOOLCHAIN_MISSING} == "yes"
|
|
|
|
MKBFD:= no
|
|
|
|
MKGDB:= no
|
|
|
|
MKGCC:= no
|
|
|
|
.endif
|
|
|
|
|
|
|
|
# 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.
|
|
|
|
.if defined(EXTERNAL_TOOLCHAIN)
|
|
|
|
MKGCC:= no
|
|
|
|
.endif
|
|
|
|
|
2000-08-03 00:04:45 +04:00
|
|
|
# The sh3 port is incomplete.
|
2002-11-26 22:30:13 +03:00
|
|
|
.if ${MACHINE_CPU} == "sh3"
|
2001-12-12 02:25:23 +03:00
|
|
|
NOPIC= # defined
|
2002-02-04 02:52:23 +03:00
|
|
|
.endif
|
2000-08-03 00:04:45 +04:00
|
|
|
|
2002-07-11 19:00:57 +04:00
|
|
|
# The sh5 port is incomplete.
|
2002-11-26 22:30:13 +03:00
|
|
|
.if ${MACHINE_CPU} == "sh5"
|
2002-07-11 19:00:57 +04:00
|
|
|
NOPROFILE= # defined
|
|
|
|
.endif
|
|
|
|
|
2001-07-13 16:44:22 +04:00
|
|
|
# The m68000 port is incomplete.
|
|
|
|
.if ${MACHINE_ARCH} == "m68000"
|
2001-12-12 02:25:23 +03:00
|
|
|
NOPIC= # defined
|
2001-07-13 16:44:22 +04:00
|
|
|
.endif
|
|
|
|
|
2002-06-10 18:14:47 +04:00
|
|
|
# The hppa port is incomplete.
|
|
|
|
.if ${MACHINE_ARCH} == "hppa"
|
|
|
|
NOLINT= # defined
|
|
|
|
NOPROFILE= # defined
|
|
|
|
.endif
|
|
|
|
|
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.
|
|
|
|
.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
|
|
|
|
MKPICLIB:= no
|
|
|
|
.endif
|
|
|
|
|
2002-06-05 06:42:09 +04:00
|
|
|
# If the ns32k port is using an external toolchain, shared libraries
|
|
|
|
# are not yet supported.
|
* 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 ${MACHINE_ARCH} == "ns32k" && defined(EXTERNAL_TOOLCHAIN)
|
2002-06-05 06:42:09 +04:00
|
|
|
NOPIC= # defined
|
|
|
|
.endif
|
|
|
|
|
2003-04-12 02:40:31 +04:00
|
|
|
# On VAX using ELF, all objects are PIC, not just shared libraries,
|
|
|
|
# so don't build the _pic version.
|
|
|
|
.if ${MACHINE_ARCH} == "vax" && ${OBJECT_FMT} == "ELF"
|
|
|
|
MKPICLIB:= no
|
|
|
|
.endif
|
|
|
|
|
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>.
|
|
|
|
SHLIB_VERSION_FILE?= ${.CURDIR}/shlib_version
|
|
|
|
|
1998-05-22 20:43:42 +04:00
|
|
|
# GNU sources and packages sometimes see architecture names differently.
|
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
|
2002-11-26 22:30:13 +03:00
|
|
|
GNU_ARCH.sh5eb=sh5
|
|
|
|
GNU_ARCH.sh5el=sh5le
|
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
|
|
|
|
|
|
|
# In order to identify NetBSD to GNU packages, we sometimes need
|
|
|
|
# an "elf" tag for historically a.out platforms.
|
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" || \
|
2002-06-05 06:42:09 +04:00
|
|
|
${MACHINE_ARCH} == "ns32k" || \
|
2001-07-23 21:13:44 +04:00
|
|
|
${MACHINE_ARCH} == "i386" || \
|
2001-06-02 05:53:29 +04:00
|
|
|
${MACHINE_ARCH} == "m68k" || \
|
2002-01-28 04:44:19 +03:00
|
|
|
${MACHINE_ARCH} == "m68000" || \
|
2001-12-15 03:39:08 +03:00
|
|
|
${MACHINE_GNU_ARCH} == "sh" || \
|
2001-12-15 04:50:33 +03:00
|
|
|
${MACHINE_GNU_ARCH} == "shle" || \
|
2002-11-26 22:30:13 +03:00
|
|
|
${MACHINE_GNU_ARCH} == "sh5" || \
|
|
|
|
${MACHINE_GNU_ARCH} == "sh5le" || \
|
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 \
|
2000-09-22 09:37:57 +04:00
|
|
|
install lint obj regress tags html installhtml cleanhtml
|
1999-09-14 05:31:11 +04:00
|
|
|
.PHONY: all clean cleandir depend dependall distclean includes \
|
|
|
|
install lint obj regress tags beforedepend afterdepend \
|
2000-09-22 09:37:57 +04:00
|
|
|
beforeinstall afterinstall realinstall realdepend realall \
|
2002-01-27 02:53:00 +03:00
|
|
|
html installhtml cleanhtml subdir-all subdir-install subdir-depend
|
1997-05-07 19:53:28 +04:00
|
|
|
|
1999-02-12 04:10:06 +03:00
|
|
|
.if ${NEED_OWN_INSTALL_TARGET} == "yes"
|
1997-10-23 16:44:28 +04:00
|
|
|
.if !target(install)
|
1997-10-27 22:41:05 +03:00
|
|
|
install: .NOTMAIN beforeinstall subdir-install realinstall afterinstall
|
|
|
|
beforeinstall: .NOTMAIN
|
|
|
|
subdir-install: .NOTMAIN beforeinstall
|
|
|
|
realinstall: .NOTMAIN beforeinstall
|
|
|
|
afterinstall: .NOTMAIN subdir-install realinstall
|
1997-05-07 19:53:28 +04:00
|
|
|
.endif
|
2000-01-22 22:31:00 +03:00
|
|
|
all: .NOTMAIN realall subdir-all
|
|
|
|
subdir-all: .NOTMAIN
|
|
|
|
realall: .NOTMAIN
|
|
|
|
depend: .NOTMAIN realdepend subdir-depend
|
|
|
|
subdir-depend: .NOTMAIN
|
|
|
|
realdepend: .NOTMAIN
|
2001-06-01 21:49:32 +04:00
|
|
|
distclean: .NOTMAIN cleandir
|
2001-08-14 11:02:13 +04:00
|
|
|
cleandir: .NOTMAIN 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
|
|
|
|
1999-02-12 04:10:06 +03:00
|
|
|
# Define MKxxx variables (which are either yes or no) for users
|
|
|
|
# to set in /etc/mk.conf and override on the make commandline.
|
|
|
|
# These should be tested with `== "no"' or `!= "no"'.
|
|
|
|
# The NOxxx variables should only be used by Makefiles.
|
|
|
|
#
|
|
|
|
|
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).
|
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
|
|
|
.for var in CRYPTO DOC LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PROFILE SHARE
|
2001-12-12 02:25:23 +03:00
|
|
|
.if defined(NO${var})
|
|
|
|
MK${var}:= 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
|
|
|
|
2002-02-07 03:53:34 +03:00
|
|
|
.if defined(NOMAN)
|
|
|
|
NOHTML=
|
|
|
|
.endif
|
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
# MK* options which default to "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
|
|
|
.for var in BFD CATPAGES CRYPTO DOC GCC GDB HESIOD IEEEFP INFO KERBEROS \
|
2003-04-12 02:40:31 +04:00
|
|
|
LINKLIB LINT MAN NLS OBJ PIC PICINSTALL PICLIB PROFILE SHARE SKEY YP
|
2001-12-12 02:25:23 +03:00
|
|
|
MK${var}?= yes
|
|
|
|
.endfor
|
1999-02-12 04:10:06 +03:00
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
# MK* options which default to "no".
|
2002-09-26 17:05:54 +04:00
|
|
|
.for var in CRYPTO_IDEA CRYPTO_MDC2 CRYPTO_RC5 OBJDIRS SOFTFLOAT
|
2001-12-12 02:25:23 +03:00
|
|
|
MK${var}?= no
|
|
|
|
.endfor
|
1999-02-12 04:10:06 +03:00
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
# Force some options off if their dependencies are off.
|
|
|
|
.if ${MKCRYPTO} == "no"
|
|
|
|
MKKERBEROS:= no
|
1999-02-12 04:10:06 +03:00
|
|
|
.endif
|
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
.if ${MKLINKLIB} == "no"
|
|
|
|
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 ${MKMAN} == "no"
|
|
|
|
MKCATPAGES:= no
|
1999-02-12 04:10:06 +03:00
|
|
|
.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
|
|
|
|
MKMAN:= no
|
|
|
|
MKNLS:= no
|
1999-02-12 15:38:44 +03:00
|
|
|
.endif
|
1999-02-12 04:10:06 +03:00
|
|
|
|
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
|
|
|
# Set defaults for the USE_xxx variables. They all default to "yes"
|
|
|
|
# unless the corresponding MKxxx variable is set to "no".
|
|
|
|
.for var in HESIOD KERBEROS SKEY YP
|
|
|
|
.if (${MK${var}} == "no")
|
|
|
|
USE_${var}:= no
|
|
|
|
.else
|
|
|
|
USE_${var}?= yes
|
|
|
|
.endif
|
|
|
|
.endfor
|
|
|
|
|
2003-04-27 14:10:28 +04:00
|
|
|
# Use XFree86 4.x as default version on i386, amd64, macppc and cats.
|
2003-04-27 14:15:01 +04:00
|
|
|
.if ${MACHINE_ARCH} == "i386" || ${MACHINE} == "amd64" || \
|
2002-08-04 02:10:07 +04:00
|
|
|
${MACHINE} == "macppc" || ${MACHINE} == "cats"
|
2002-07-03 15:51:34 +04:00
|
|
|
USE_XF86_4?= yes
|
|
|
|
.endif
|
|
|
|
|
1998-04-13 16:03:07 +04:00
|
|
|
.endif # _BSD_OWN_MK_
|