2002-01-19 16:32:52 +03:00
|
|
|
# $NetBSD: bsd.own.mk,v 1.255 2002/01/19 13:32:52 mrg 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
|
|
|
|
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
|
|
|
|
|
2001-10-04 19:52:59 +04:00
|
|
|
# Temporary; this will become default when all platforms have migrated.
|
2001-10-20 10:11:21 +04:00
|
|
|
.if defined(USE_NEW_TOOLCHAIN) && ${USE_NEW_TOOLCHAIN} == "no"
|
2001-11-15 22:24:07 +03:00
|
|
|
.undef USE_NEW_TOOLCHAIN
|
2001-10-20 10:11:21 +04:00
|
|
|
.else
|
2001-12-20 21:29:47 +03:00
|
|
|
.if ${MACHINE_ARCH} == "alpha" || \
|
|
|
|
${MACHINE_ARCH} == "arm" || \
|
2001-11-14 22:46:38 +03:00
|
|
|
${MACHINE_ARCH} == "i386" || \
|
2002-01-04 09:23:41 +03:00
|
|
|
${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" || \
|
2001-11-04 04:36:18 +03:00
|
|
|
${MACHINE_ARCH} == "powerpc" || \
|
2001-11-03 23:46:25 +03:00
|
|
|
${MACHINE_ARCH} == "sparc" || \
|
2001-12-16 23:31:09 +03:00
|
|
|
${MACHINE_ARCH} == "sparc64" || \
|
2001-12-28 09:57:41 +03:00
|
|
|
${MACHINE_ARCH} == "x86_64" || \
|
2001-12-16 23:31:09 +03:00
|
|
|
${MACHINE} == "next68k" || \
|
|
|
|
${MACHINE} == "sun3" || \
|
|
|
|
${MACHINE} == "mvme68k" || \
|
|
|
|
${MACHINE} == "hp300" || \
|
|
|
|
${MACHINE} == "news68k" || \
|
|
|
|
${MACHINE} == "cesfic" || \
|
2001-12-23 02:38:20 +03:00
|
|
|
${MACHINE} == "luna68k" || \
|
2001-12-24 14:38:04 +03:00
|
|
|
${MACHINE} == "atari" || \
|
|
|
|
${MACHINE} == "x68k"
|
2001-11-15 22:24:07 +03:00
|
|
|
USE_NEW_TOOLCHAIN=nowarn
|
2001-10-20 10:11:21 +04:00
|
|
|
.endif
|
2001-10-04 19:52:59 +04:00
|
|
|
.endif
|
|
|
|
|
2001-11-19 05:46:50 +03:00
|
|
|
.if defined(USE_NEW_TOOLCHAIN)
|
|
|
|
CPPFLAG_ISYSTEM= -isystem
|
|
|
|
.else
|
|
|
|
CPPFLAG_ISYSTEM= -idirafter
|
|
|
|
.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
|
|
|
|
|
2001-10-26 08:59:10 +04:00
|
|
|
.if !defined(_SRC_TOP_)
|
|
|
|
# Find the top of the source tree to see if we're inside of $BSDSRCDIR
|
|
|
|
_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_
|
2001-09-25 05:04:35 +04:00
|
|
|
.endif
|
2001-10-26 08:59:10 +04:00
|
|
|
|
2001-11-19 07:44:32 +03:00
|
|
|
.if !defined(_SRC_TOP_OBJ_)
|
2001-11-25 00:26:34 +03:00
|
|
|
.if ${_SRC_TOP_} != ""
|
2001-11-19 07:44:32 +03:00
|
|
|
_SRC_TOP_OBJ_!= cd ${_SRC_TOP_} && ${PRINTOBJDIR}
|
|
|
|
.MAKEOVERRIDES+= _SRC_TOP_OBJ_
|
|
|
|
.endif
|
2001-11-25 00:26:34 +03:00
|
|
|
.endif
|
2001-11-19 07:44:32 +03:00
|
|
|
|
2001-10-28 05:03:00 +03:00
|
|
|
.if (${_SRC_TOP_} != "") && defined(USE_NEW_TOOLCHAIN)
|
2001-09-22 09:45:50 +04:00
|
|
|
USETOOLS?= yes
|
2001-10-26 08:59:10 +04:00
|
|
|
.endif
|
|
|
|
USETOOLS?= no
|
2001-09-22 09:45:50 +04:00
|
|
|
|
|
|
|
.if ${MACHINE_ARCH} == "mips" || ${MACHINE_ARCH} == "sh3"
|
|
|
|
.BEGIN:
|
|
|
|
@echo "Must set MACHINE_ARCH to one of ${MACHINE_ARCH}eb or ${MACHINE_ARCH}el"
|
|
|
|
@false
|
2001-10-31 19:25:21 +03:00
|
|
|
.elif defined(REQUIRETOOLS) && defined(USE_NEW_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
|
|
|
|
|
2001-10-31 19:25:21 +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)
|
2001-10-31 20:46:08 +03:00
|
|
|
_TOOLOBJ!= cd ${_SRC_TOP_:U${BSDSRCDIR}}/tools && ${PRINTOBJDIR}
|
|
|
|
TOOLDIR:= ${_TOOLOBJ}/tools.${HOST_OSTYPE}
|
|
|
|
.MAKEOVERRIDES+= TOOLDIR
|
2001-10-26 08:59:10 +04:00
|
|
|
.endif
|
2001-09-22 09:45:50 +04:00
|
|
|
|
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
|
|
|
|
|
|
|
|
ASN1_COMPILE= ${TOOLDIR}/bin/nbasn1_compile
|
2001-11-15 01:13:39 +03:00
|
|
|
COMPILE_ET= ${TOOLDIR}/bin/nbcompile_et
|
|
|
|
CONFIG= ${TOOLDIR}/bin/nbconfig
|
|
|
|
CRUNCHGEN= MAKE=${.MAKE:Q} ${TOOLDIR}/bin/nbcrunchgen
|
2001-11-09 10:30:55 +03:00
|
|
|
DBSYM= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-dbsym
|
2001-11-15 01:13:39 +03:00
|
|
|
EQN= ${TOOLDIR}/bin/nbeqn
|
|
|
|
GENCAT= ${TOOLDIR}/bin/nbgencat
|
|
|
|
#GRIND= ${TOOLDIR}/bin/nbvgrind -f
|
2001-11-28 08:03:18 +03:00
|
|
|
GROFF= PATH=${TOOLDIR}/lib/groff:$${PATH} ${TOOLDIR}/bin/nbgroff
|
2002-01-04 01:45:23 +03:00
|
|
|
HOST_MKDEP= ${TOOLDIR}/bin/nbhost-mkdep
|
2001-11-15 01:13:39 +03:00
|
|
|
INDXBIB= ${TOOLDIR}/bin/nbindxbib
|
|
|
|
INSTALL= STRIP=${STRIP:Q} ${TOOLDIR}/bin/nbinstall
|
|
|
|
INSTALL_INFO= ${TOOLDIR}/bin/nbinstall-info
|
|
|
|
LEX= ${TOOLDIR}/bin/nblex
|
2001-11-13 20:37:03 +03:00
|
|
|
LINT= CC=${CC:Q} ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-lint
|
2001-11-15 01:13:39 +03:00
|
|
|
LORDER= NM=${NM:Q} ${TOOLDIR}/bin/nblorder
|
2002-01-10 08:17:20 +03:00
|
|
|
MAKEFS= ${TOOLDIR}/bin/nbmakefs
|
2001-11-15 16:05:35 +03:00
|
|
|
MAKEINFO= ${TOOLDIR}/bin/nbmakeinfo
|
2001-11-30 02:53:23 +03:00
|
|
|
MAKEWHATIS= ${TOOLDIR}/bin/nbmakewhatis
|
2001-10-25 03:58:21 +04:00
|
|
|
MDSETIMAGE= ${TOOLDIR}/bin/${MACHINE_GNU_PLATFORM}-mdsetimage
|
2001-11-15 01:13:39 +03:00
|
|
|
MENUC= MENUDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/nbmenuc
|
|
|
|
MKDEP= CC=${CC:Q} ${TOOLDIR}/bin/nbmkdep
|
|
|
|
MKLOCALE= ${TOOLDIR}/bin/nbmklocale
|
|
|
|
MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/nbmsgc
|
|
|
|
MTREE= ${TOOLDIR}/bin/nbmtree
|
|
|
|
PIC= ${TOOLDIR}/bin/nbpic
|
2001-12-07 05:28:53 +03:00
|
|
|
PWD_MKDB= ${TOOLDIR}/bin/nbpwd_mkdb
|
2001-11-15 01:13:39 +03:00
|
|
|
REFER= ${TOOLDIR}/bin/nbrefer
|
|
|
|
RPCGEN= ${TOOLDIR}/bin/nbrpcgen
|
|
|
|
SOELIM= ${TOOLDIR}/bin/nbsoelim
|
2002-01-19 16:32:52 +03:00
|
|
|
SPARCINSTALLBOOT=${TOOLDIR}/bin/nbsparc-installboot
|
|
|
|
SUNLABEL= ${TOOLDIR}/bin/nbsunlabel
|
2001-11-15 01:13:39 +03:00
|
|
|
TBL= ${TOOLDIR}/bin/nbtbl
|
|
|
|
TSORT= ${TOOLDIR}/bin/nbtsort -q
|
|
|
|
YACC= ${TOOLDIR}/bin/nbyacc
|
2002-01-05 10:34:08 +03:00
|
|
|
ZIC= ${TOOLDIR}/bin/nbzic
|
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
|
|
|
|
|
1994-09-28 18:59:28 +03:00
|
|
|
# Defining `SKEY' causes support for S/key authentication to be compiled in.
|
|
|
|
SKEY= yes
|
1993-11-07 12:45:04 +03: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
|
1993-04-10 00:05:56 +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
|
* Add user-controlled mk.conf variables
- SHLIBDIR Location to install shared libraries if ${USE_SHLIBDIR}
is "yes". Defaults to "/usr/lib".
- USE_SHLIBDIR If "yes", install shared libraries in ${SHLIBDIR}
instead of ${LIBDIR}. Defaults to "no".
Sets ${_LIBSODIR} to the appropriate value.
This may be set by individual Makefiles as well.
- SHLINKDIR Location of shared linker. Defaults to "/usr/libexec".
If != "/usr/libexec", change the dynamic-linker
encoded in shared programs
* Set USE_SHLIBDIR for libraries used by /bin and /sbin:
libc libcrypt libcrypto libedit libipsec libkvm libm libmi387
libtermcap libutil libz
* If ${_LIBSODIR} != ${LIBDIR}, add symlinks from ${LIBDIR}/${LIB}.so*
to ${_LIBSODIR}/${LIB}.so* for compatibility.
* Always install /sbin/init statically (for now)
The net effect of these changes depends on how the variables are set:
1.) If nothing is set or changed, there is no change from the
current behaviour:
- Static /bin, /sbin, and bits of /usr/*
- Dynamic rest
- Shared linker is /usr/libexec/ld*so
2.) If the following make variables are set:
LDSTATIC=
SHLINKDIR=/lib
SHLIBDIR=/lib
Then the behaviour becomes:
- Dynamic tools
- .so libraries used by /bin and /sbin are installed to /lib,
with symlinks from /usr/lib/lib*so to -> /lib/lib*so
where appropriate
- Shared linker is /lib/ld*so
3.) As per 2.), but add the following variable:
USE_SHLIBDIR=yes
This forces all .so's to be instaleld in /lib (with compat
symlinks), not just those tagged by their Makefiles to be.
Again, compat symlinks are installed
2001-12-28 04:32:37 +03:00
|
|
|
SHLIBDIR?= /usr/lib
|
|
|
|
.if ${USE_SHLIBDIR:Uno} == "yes"
|
|
|
|
_LIBSODIR?= ${SHLIBDIR}
|
|
|
|
.else
|
|
|
|
_LIBSODIR?= ${LIBDIR}
|
|
|
|
.endif
|
|
|
|
SHLINKDIR?= /usr/libexec
|
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
|
|
|
|
|
2001-11-25 00:26:34 +03:00
|
|
|
.if defined(_SRC_TOP_OBJ_)
|
2001-11-19 07:44:32 +03:00
|
|
|
METALOG?= ${_SRC_TOP_OBJ_}/METALOG
|
2001-11-25 00:26:34 +03:00
|
|
|
.else
|
|
|
|
METALOG?= /dev/null
|
|
|
|
.endif
|
2001-11-19 07:44:32 +03:00
|
|
|
INSTPRIV?= ${UNPRIVED:D-U -M ${METALOG}}
|
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
|
|
|
|
1993-07-10 07:56:10 +04:00
|
|
|
# Define SYS_INCLUDE to indicate whether you want symbolic links to the system
|
|
|
|
# source (``symlinks''), or a separate copy (``copies''); (latter useful
|
|
|
|
# in environments where it's not possible to keep /sys publicly readable)
|
1998-08-08 00:31:56 +04:00
|
|
|
#SYS_INCLUDE= symlinks
|
1993-10-04 22:52:53 +03:00
|
|
|
|
2000-08-03 00:04:45 +04:00
|
|
|
# The sh3 port is incomplete.
|
2001-01-04 11:32:02 +03:00
|
|
|
.if ${MACHINE_ARCH} == "sh3eb" || ${MACHINE_ARCH} == "sh3el"
|
2001-12-12 02:25:23 +03:00
|
|
|
NOLINT= # defined
|
|
|
|
NOPIC= # defined
|
|
|
|
NOPROFILE= # defined
|
|
|
|
OBJECT_FMT?= COFF
|
2000-08-03 00:04:45 +04:00
|
|
|
.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
|
|
|
NOLINT= # defined
|
|
|
|
NOPIC= # defined
|
|
|
|
NOPROFILE= # defined
|
2001-07-13 16:44:22 +04:00
|
|
|
.endif
|
|
|
|
|
1998-02-23 13:09:31 +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.
|
|
|
|
# OBJECT_FMT: currently either "ELF" or "a.out".
|
|
|
|
# SHLIB_TYPE: "ELF" or "a.out" or "" to force static libraries.
|
|
|
|
#
|
1999-02-12 04:10:06 +03:00
|
|
|
.if ${MACHINE_ARCH} == "alpha" || \
|
2001-11-14 22:46:38 +03:00
|
|
|
${MACHINE_ARCH} == "arm" || \
|
2002-01-04 09:23:41 +03:00
|
|
|
${MACHINE_ARCH} == "mipseb" || ${MACHINE_ARCH} == "mipsel" || \
|
1999-02-12 04:10:06 +03:00
|
|
|
${MACHINE_ARCH} == "powerpc" || \
|
1999-06-06 13:25:38 +04:00
|
|
|
${MACHINE_ARCH} == "sparc" || \
|
1999-07-05 13:13:04 +04:00
|
|
|
${MACHINE_ARCH} == "sparc64" || \
|
2001-06-19 05:37:44 +04:00
|
|
|
${MACHINE_ARCH} == "x86_64" || \
|
2000-12-07 11:35:15 +03:00
|
|
|
${MACHINE_ARCH} == "i386" || \
|
2001-07-13 16:44:22 +04:00
|
|
|
${MACHINE_ARCH} == "m68000" || \
|
2001-05-13 02:38:04 +04:00
|
|
|
${MACHINE} == "next68k" || \
|
2001-02-22 10:12:55 +03:00
|
|
|
${MACHINE} == "sun3" || \
|
2001-01-02 07:34:37 +03:00
|
|
|
${MACHINE} == "mvme68k" || \
|
2001-03-19 20:01:12 +03:00
|
|
|
${MACHINE} == "hp300" || \
|
2001-07-21 20:48:49 +04:00
|
|
|
${MACHINE} == "news68k" || \
|
2001-08-25 22:39:24 +04:00
|
|
|
${MACHINE} == "cesfic" || \
|
2001-12-23 02:38:20 +03:00
|
|
|
${MACHINE} == "luna68k" || \
|
2001-12-24 14:38:04 +03:00
|
|
|
${MACHINE} == "atari" || \
|
|
|
|
${MACHINE} == "x68k"
|
2001-12-12 02:25:23 +03:00
|
|
|
OBJECT_FMT?= ELF
|
1998-02-23 13:09:31 +03:00
|
|
|
.else
|
2001-12-12 02:25:23 +03:00
|
|
|
OBJECT_FMT?= a.out
|
2001-06-19 05:37:44 +04:00
|
|
|
.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.
|
2001-07-21 20:56:07 +04:00
|
|
|
GNU_ARCH.arm26=arm
|
1998-05-22 20:43:42 +04:00
|
|
|
GNU_ARCH.arm32=arm
|
2001-01-04 13:29:11 +03:00
|
|
|
GNU_ARCH.sh3eb=sh
|
2001-12-15 04:50:33 +03:00
|
|
|
GNU_ARCH.sh3el=shle
|
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" || \
|
2001-07-23 21:13:44 +04:00
|
|
|
${MACHINE_ARCH} == "i386" || \
|
2001-06-02 05:53:29 +04:00
|
|
|
${MACHINE_ARCH} == "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")
|
2001-08-14 13:31:42 +04:00
|
|
|
MACHINE_GNU_PLATFORM=${MACHINE_GNU_ARCH}--netbsdelf
|
2001-06-02 05:53:29 +04:00
|
|
|
.else
|
2001-08-14 13:31:42 +04: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
|
|
|
|
|
|
|
# CPU model, derived from MACHINE_ARCH
|
2001-07-13 16:44:22 +04:00
|
|
|
MACHINE_CPU= ${MACHINE_ARCH:C/mipse[bl]/mips/:S/arm26/arm/:S/arm32/arm/:C/sh3e[bl]/sh3/:S/m68000/m68k/}
|
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 \
|
|
|
|
html installhtml cheanhtml
|
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).
|
|
|
|
.for var in CRYPTO DOC KERBEROS LINKLIB LINT MAN NLS OBJ \
|
|
|
|
PIC PICINSTALL PROFILE SHARE
|
|
|
|
.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
|
|
|
|
2001-12-12 02:25:23 +03:00
|
|
|
# MK* options which default to "yes".
|
2002-01-01 02:06:34 +03:00
|
|
|
.for var in BFD CATPAGES CRYPTO DOC GCC GDB INFO KERBEROS LINKLIB LINT \
|
2001-12-12 02:25:23 +03:00
|
|
|
MAN NLS OBJ PIC PICINSTALL PROFILE SHARE
|
|
|
|
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".
|
|
|
|
.for var in CRYPTO_IDEA CRYPTO_RC5 OBJDIRS SOFTFLOAT
|
|
|
|
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
|
|
|
|
|
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
|
|
|
|
2002-01-01 02:06:34 +03:00
|
|
|
# x86-64 cannot currently use the in-tree toolchain, but does
|
|
|
|
# use the "new toolchain" build framework.
|
|
|
|
.if ${MACHINE_ARCH} == "x86_64"
|
|
|
|
MKBFD:= no
|
|
|
|
MKGDB:= no
|
|
|
|
MKGCC:= no
|
|
|
|
.endif
|
|
|
|
|
1998-04-13 16:03:07 +04:00
|
|
|
.endif # _BSD_OWN_MK_
|