2005-09-16 05:28:34 -07:00
|
|
|
# $OpenBSD: Makefile,v 1.113 2005/09/16 12:28:34 jmc Exp $
|
1995-10-18 01:37:01 -07:00
|
|
|
|
1997-04-17 23:47:08 -07:00
|
|
|
#
|
|
|
|
# For more information on building in tricky environments, please see
|
|
|
|
# the list of possible environment variables described in
|
|
|
|
# /usr/share/mk/bsd.README.
|
2002-06-08 22:47:26 -07:00
|
|
|
#
|
1997-04-17 23:47:08 -07:00
|
|
|
# Building recommendations:
|
2002-06-08 22:47:26 -07:00
|
|
|
#
|
1997-04-17 23:47:08 -07:00
|
|
|
# 1) If at all possible, put this source tree in /usr/src. If /usr/src
|
2005-09-16 05:28:34 -07:00
|
|
|
# must be a symbolic link, set BSDSRCDIR in the environment to point to
|
|
|
|
# the real location.
|
1997-04-17 23:47:08 -07:00
|
|
|
#
|
|
|
|
# 2) It is also recommended that you compile with objects outside the
|
|
|
|
# source tree. To do this, ensure /usr/obj exists or points to some
|
|
|
|
# area of disk of sufficient size. Then do "cd /usr/src; make obj".
|
|
|
|
# This will make a symbolic link called "obj" in each directory, as
|
|
|
|
# well as populate the /usr/obj properly with directories for the
|
|
|
|
# objects.
|
|
|
|
#
|
1998-09-30 06:27:28 -07:00
|
|
|
# 3) It is strongly recommended that you build and install a new kernel
|
|
|
|
# before rebuilding your system. Some of the new programs may use new
|
|
|
|
# functionality or depend on API changes that your old kernel doesn't have.
|
|
|
|
#
|
|
|
|
# 4) If you are reasonably sure that things will compile OK, use the
|
1997-04-17 23:47:08 -07:00
|
|
|
# "make build" target supplied here. Good luck.
|
1998-05-18 11:29:07 -07:00
|
|
|
#
|
1998-09-30 06:27:28 -07:00
|
|
|
# 5) If you want to setup a cross-build environment, there is a "cross-tools"
|
2002-06-08 22:47:26 -07:00
|
|
|
# target available which upon completion of "make TARGET=<target> cross-tools"
|
1998-05-18 11:29:07 -07:00
|
|
|
# (where <target> is one of the names in the /sys/arch directory) will produce
|
|
|
|
# a set of compilation tools along with the includes in the /usr/cross/<target>
|
2002-08-15 19:04:58 -07:00
|
|
|
# directory. The "cross-distrib" target will build cross-tools as well as
|
|
|
|
# binaries for a given <target>.
|
1998-05-18 11:29:07 -07:00
|
|
|
#
|
1996-04-23 02:47:22 -07:00
|
|
|
|
1997-04-17 23:47:08 -07:00
|
|
|
.include <bsd.own.mk> # for NOMAN, if it's there.
|
1995-10-18 01:37:01 -07:00
|
|
|
|
|
|
|
SUBDIR+= lib include bin libexec sbin usr.bin usr.sbin share games
|
|
|
|
SUBDIR+= gnu
|
|
|
|
|
1996-03-02 13:04:11 -08:00
|
|
|
SUBDIR+= sys lkm
|
1995-10-18 01:37:01 -07:00
|
|
|
|
2001-06-26 08:33:28 -07:00
|
|
|
.if (${KERBEROS5:L} == "yes")
|
|
|
|
SUBDIR+= kerberosV
|
|
|
|
.endif
|
|
|
|
|
1997-08-06 02:40:10 -07:00
|
|
|
.if make(clean) || make(cleandir) || make(obj)
|
2002-01-02 18:19:20 -08:00
|
|
|
SUBDIR+= distrib regress
|
1997-08-06 02:40:10 -07:00
|
|
|
.endif
|
|
|
|
|
1995-10-18 01:37:01 -07:00
|
|
|
.if exists(regress)
|
|
|
|
regression-tests:
|
|
|
|
@echo Running regression tests...
|
2002-02-22 15:31:11 -08:00
|
|
|
@cd ${.CURDIR}/regress && ${MAKE} depend && exec ${MAKE} regress
|
1995-10-18 01:37:01 -07:00
|
|
|
.endif
|
|
|
|
|
1996-05-17 22:37:48 -07:00
|
|
|
includes:
|
2001-06-24 16:31:07 -07:00
|
|
|
cd ${.CURDIR}/include && ${MAKE} prereq && exec ${SUDO} ${MAKE} includes
|
1996-05-17 22:37:48 -07:00
|
|
|
|
1996-05-06 13:31:44 -07:00
|
|
|
beforeinstall:
|
2001-05-14 05:34:26 -07:00
|
|
|
cd ${.CURDIR}/etc && exec ${MAKE} DESTDIR=${DESTDIR} distrib-dirs
|
|
|
|
cd ${.CURDIR}/include && exec ${MAKE} includes
|
1995-10-18 01:37:01 -07:00
|
|
|
|
|
|
|
afterinstall:
|
|
|
|
.ifndef NOMAN
|
2001-05-14 05:34:26 -07:00
|
|
|
cd ${.CURDIR}/share/man && exec ${MAKE} makedb
|
1995-10-18 01:37:01 -07:00
|
|
|
.endif
|
|
|
|
|
|
|
|
build:
|
1997-07-28 20:37:03 -07:00
|
|
|
.ifdef GLOBAL_AUTOCONF_CACHE
|
2000-12-29 22:45:52 -08:00
|
|
|
cp /dev/null ${GLOBAL_AUTOCONF_CACHE}
|
1997-07-28 20:18:39 -07:00
|
|
|
.endif
|
2001-05-14 05:34:26 -07:00
|
|
|
cd ${.CURDIR}/share/mk && exec ${SUDO} ${MAKE} install
|
|
|
|
cd ${.CURDIR}/include && ${MAKE} prereq && exec ${SUDO} ${MAKE} includes
|
1999-01-06 20:57:13 -08:00
|
|
|
${SUDO} ${MAKE} cleandir
|
2001-05-14 05:34:26 -07:00
|
|
|
cd ${.CURDIR}/lib && ${MAKE} depend && ${MAKE} && \
|
|
|
|
NOMAN=1 exec ${SUDO} ${MAKE} install
|
|
|
|
cd ${.CURDIR}/gnu/lib && ${MAKE} depend && ${MAKE} && \
|
|
|
|
NOMAN=1 exec ${SUDO} ${MAKE} install
|
|
|
|
${MAKE} depend && ${MAKE} && exec ${SUDO} ${MAKE} install
|
1995-10-18 01:37:01 -07:00
|
|
|
|
2005-01-09 12:36:20 -08:00
|
|
|
CROSS_TARGETS=cross-env cross-dirs cross-obj cross-includes cross-binutils \
|
|
|
|
cross-gcc cross-tools cross-lib cross-bin cross-etc-root-var \
|
|
|
|
cross-depend cross-clean cross-cleandir
|
1998-05-11 00:43:12 -07:00
|
|
|
|
2005-01-09 12:36:20 -08:00
|
|
|
.if !defined(TARGET)
|
|
|
|
${CROSS_TARGETS}:
|
|
|
|
@echo "TARGET must be set for $@"; exit 1
|
2004-10-21 13:47:29 -07:00
|
|
|
.else
|
2005-01-09 12:36:20 -08:00
|
|
|
. include "Makefile.cross"
|
|
|
|
.endif # defined(TARGET)
|
2002-08-15 19:04:58 -07:00
|
|
|
|
2005-01-09 12:36:20 -08:00
|
|
|
.PHONY: ${CROSS_TARGETS} \
|
|
|
|
build regression-tests includes beforeinstall afterinstall \
|
|
|
|
all depend
|
2002-08-15 19:04:58 -07:00
|
|
|
|
1995-10-18 01:37:01 -07:00
|
|
|
.include <bsd.subdir.mk>
|