1999-11-30 19:16:41 +03:00
|
|
|
# $NetBSD: bsd.own.mk,v 1.130 1999/11/30 16:16:43 sommerfeld 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
|
|
|
|
|
|
|
.if defined(MAKECONF) && exists(${MAKECONF})
|
|
|
|
.include "${MAKECONF}"
|
|
|
|
.elif exists(/etc/mk.conf)
|
|
|
|
.include "/etc/mk.conf"
|
|
|
|
.endif
|
1994-09-28 18:59:28 +03:00
|
|
|
|
|
|
|
# Defining `SKEY' causes support for S/key authentication to be compiled in.
|
|
|
|
SKEY= yes
|
|
|
|
# Defining `KERBEROS' causes support for Kerberos authentication to be
|
|
|
|
# compiled in.
|
|
|
|
#KERBEROS= yes
|
1995-06-02 06:52:04 +04:00
|
|
|
# Defining 'KERBEROS5' causes support for Kerberos5 authentication to be
|
|
|
|
# compiled in.
|
|
|
|
#KERBEROS5= 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
|
|
|
|
LINTLIBDIR?= /usr/libdata/lint
|
|
|
|
LIBGRP?= ${BINGRP}
|
|
|
|
LIBOWN?= ${BINOWN}
|
|
|
|
LIBMODE?= ${NONBINMODE}
|
1993-04-10 00:05:56 +04:00
|
|
|
|
1993-08-16 00:42:39 +04:00
|
|
|
DOCDIR?= /usr/share/doc
|
1998-02-26 11:46:09 +03:00
|
|
|
DOCGRP?= wheel
|
|
|
|
DOCOWN?= root
|
1993-08-16 00:42:39 +04:00
|
|
|
DOCMODE?= ${NONBINMODE}
|
|
|
|
|
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}
|
|
|
|
|
1993-08-16 00:42:39 +04:00
|
|
|
COPY?= -c
|
1998-09-28 20:43:41 +04:00
|
|
|
.if defined(UPDATE)
|
1998-09-28 12:13:37 +04:00
|
|
|
PRESERVE?= -p
|
1998-09-28 20:43:41 +04:00
|
|
|
.else
|
|
|
|
PRESERVE?=
|
|
|
|
.endif
|
1999-08-16 17:57:03 +04:00
|
|
|
RENAME?= -r
|
1999-08-21 10:16:21 +04:00
|
|
|
.if defined(UNPRIVILEGED)
|
|
|
|
INSTPRIV?= -U
|
|
|
|
.endif
|
1997-04-17 10:34:15 +04:00
|
|
|
STRIPFLAG?= -s
|
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
|
|
|
|
1999-09-12 05:19:23 +04:00
|
|
|
# XXX The next one is temporary until the transition to UVM is complete.
|
1998-05-04 08:37:33 +04:00
|
|
|
|
|
|
|
# Systems on which UVM is the standard VM system.
|
1999-02-12 04:10:06 +03:00
|
|
|
.if ${MACHINE} != "pica"
|
1998-05-04 08:37:33 +04:00
|
|
|
UVM?= yes
|
|
|
|
.endif
|
|
|
|
|
1998-11-25 07:04:13 +03:00
|
|
|
# The sparc64 port is incomplete.
|
1999-02-12 04:10:06 +03:00
|
|
|
.if ${MACHINE_ARCH} == "sparc64"
|
1998-11-29 01:46:16 +03:00
|
|
|
NOPROFILE=1
|
|
|
|
NOPIC=1
|
|
|
|
NOLINT=1
|
1998-11-25 07:04:13 +03: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" || \
|
1999-02-24 17:42:36 +03:00
|
|
|
${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb" || \
|
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" || \
|
|
|
|
${MACHINE_ARCH} == "i386"
|
1998-02-23 13:09:31 +03:00
|
|
|
OBJECT_FMT?=ELF
|
|
|
|
.else
|
|
|
|
OBJECT_FMT?=a.out
|
|
|
|
.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.
|
|
|
|
# This table maps an architecture name to its GNU counterpart.
|
|
|
|
# Use as so: ${GNU_ARCH.${TARGET_ARCH}} or ${MACHINE_GNU_ARCH}
|
|
|
|
GNU_ARCH.alpha=alpha
|
|
|
|
GNU_ARCH.arm32=arm
|
|
|
|
GNU_ARCH.i386=i386
|
|
|
|
GNU_ARCH.m68k=m68k
|
1998-07-27 04:58:05 +04:00
|
|
|
GNU_ARCH.mipseb=mipseb
|
|
|
|
GNU_ARCH.mipsel=mipsel
|
1998-05-22 20:43:42 +04:00
|
|
|
GNU_ARCH.ns32k=ns32k
|
|
|
|
GNU_ARCH.powerpc=powerpc
|
1999-10-06 22:24:00 +04:00
|
|
|
GNU_ARCH.sh3=sh
|
1998-05-26 03:40:22 +04:00
|
|
|
GNU_ARCH.sparc=sparc
|
1998-11-29 01:46:16 +03:00
|
|
|
GNU_ARCH.sparc64=sparc
|
1998-05-22 20:43:42 +04:00
|
|
|
GNU_ARCH.vax=vax
|
1999-02-12 04:10:06 +03:00
|
|
|
.if ${MACHINE_ARCH} == "mips"
|
1999-02-11 00:11:47 +03:00
|
|
|
.INIT:
|
|
|
|
@echo Must set MACHINE_ARCH to one of mipseb or mipsel
|
|
|
|
@false
|
|
|
|
.endif
|
1998-11-29 01:46:16 +03:00
|
|
|
|
1999-02-12 04:10:06 +03:00
|
|
|
.if ${MACHINE_ARCH} == "sparc64"
|
1998-11-29 01:46:16 +03:00
|
|
|
MACHINE_GNU_ARCH=${MACHINE_ARCH}
|
|
|
|
.else
|
1998-05-22 20:43:42 +04:00
|
|
|
MACHINE_GNU_ARCH=${GNU_ARCH.${MACHINE_ARCH}}
|
1998-11-29 01:46:16 +03:00
|
|
|
.endif
|
1998-05-22 20:43:42 +04:00
|
|
|
|
1999-09-14 05:31:11 +04:00
|
|
|
TARGETS+= all clean cleandir depend dependall distclean includes \
|
|
|
|
install lint obj regress tags
|
|
|
|
.PHONY: all clean cleandir depend dependall distclean includes \
|
|
|
|
install lint obj regress tags beforedepend afterdepend \
|
|
|
|
beforeinstall afterinstall realinstall
|
1997-05-07 19:53:28 +04:00
|
|
|
|
1998-04-03 13:56:00 +04:00
|
|
|
# set NEED_OWN_INSTALL_TARGET, if it's not already set, to yes
|
1999-02-07 20:21:09 +03:00
|
|
|
# this is used by bsd.pkg.mk to stop "install" being defined
|
1998-01-15 12:37:25 +03:00
|
|
|
NEED_OWN_INSTALL_TARGET?= yes
|
|
|
|
|
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
|
1998-01-15 12:37:25 +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.
|
|
|
|
#
|
|
|
|
|
|
|
|
MKCATPAGES?=yes
|
|
|
|
|
|
|
|
.if defined(NODOC)
|
|
|
|
MKDOC=no
|
|
|
|
#.elif !defined(MKDOC)
|
|
|
|
#MKDOC=yes
|
|
|
|
.else
|
|
|
|
MKDOC?=yes
|
|
|
|
.endif
|
|
|
|
|
1999-02-12 18:01:08 +03:00
|
|
|
MKINFO?=yes
|
|
|
|
|
1999-02-12 04:10:06 +03:00
|
|
|
.if defined(NOLINKLIB)
|
|
|
|
MKLINKLIB=no
|
|
|
|
.else
|
|
|
|
MKLINKLIB?=yes
|
|
|
|
.endif
|
1999-02-12 15:38:44 +03:00
|
|
|
.if ${MKLINKLIB} == "no"
|
|
|
|
MKPICINSTALL=no
|
|
|
|
MKPROFILE=no
|
|
|
|
.endif
|
1999-02-12 04:10:06 +03:00
|
|
|
|
|
|
|
.if defined(NOLINT)
|
|
|
|
MKLINT=no
|
|
|
|
.else
|
|
|
|
MKLINT?=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NOMAN)
|
|
|
|
MKMAN=no
|
|
|
|
.else
|
|
|
|
MKMAN?=yes
|
|
|
|
.endif
|
1999-02-12 15:38:44 +03:00
|
|
|
.if ${MKMAN} == "no"
|
|
|
|
MKCATPAGES=no
|
|
|
|
.endif
|
1999-02-12 04:10:06 +03:00
|
|
|
|
|
|
|
.if defined(NONLS)
|
|
|
|
MKNLS=no
|
|
|
|
.else
|
|
|
|
MKNLS?=yes
|
|
|
|
.endif
|
|
|
|
|
1999-11-30 19:16:41 +03:00
|
|
|
#
|
|
|
|
# MKOBJDIRS controls whether object dirs are created during "make build".
|
|
|
|
# MKOBJ controls whether the "make obj" rule does anything.
|
|
|
|
#
|
1999-02-12 04:10:06 +03:00
|
|
|
.if defined(NOOBJ)
|
|
|
|
MKOBJ=no
|
1999-11-30 19:16:41 +03:00
|
|
|
MKOBJDIRS=no
|
1999-02-12 04:10:06 +03:00
|
|
|
.else
|
|
|
|
MKOBJ?=yes
|
1999-11-30 19:16:41 +03:00
|
|
|
MKOBJDIRS?=no
|
1999-02-12 04:10:06 +03:00
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NOPIC)
|
|
|
|
MKPIC=no
|
|
|
|
.else
|
|
|
|
MKPIC?=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NOPICINSTALL)
|
|
|
|
MKPICINSTALL=no
|
|
|
|
.else
|
|
|
|
MKPICINSTALL?=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NOPROFILE)
|
|
|
|
MKPROFILE=no
|
|
|
|
.else
|
|
|
|
MKPROFILE?=yes
|
|
|
|
.endif
|
|
|
|
|
|
|
|
.if defined(NOSHARE)
|
|
|
|
MKSHARE=no
|
|
|
|
.else
|
|
|
|
MKSHARE?=yes
|
|
|
|
.endif
|
1999-02-12 15:38:44 +03:00
|
|
|
.if ${MKSHARE} == "no"
|
|
|
|
MKCATPAGES=no
|
|
|
|
MKDOC=no
|
1999-02-12 18:01:08 +03:00
|
|
|
MKINFO=no
|
1999-02-12 15:38:44 +03:00
|
|
|
MKMAN=no
|
|
|
|
MKNLS=no
|
|
|
|
.endif
|
1999-02-12 04:10:06 +03:00
|
|
|
|
|
|
|
|
1998-04-13 16:03:07 +04:00
|
|
|
.endif # _BSD_OWN_MK_
|