1997-03-07 03:50:30 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.26 1997/03/07 00:50:30 thorpej Exp $
|
1993-10-13 08:55:19 +03:00
|
|
|
#
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
# Configuration variables (default values are below):
|
|
|
|
#
|
|
|
|
# S must be set to the top of the 'sys' tree.
|
|
|
|
# KERNDST may be set to the location of the directory where library
|
|
|
|
# objects are to be built. Defaults to ${.OBJDIR}/lib/kern.
|
|
|
|
# KERN_AS may be set to 'obj' to build a object from the library's
|
|
|
|
# object files. (Otherwise, a library will be built.)
|
|
|
|
# Defaults to 'library'.
|
1997-02-17 00:25:18 +03:00
|
|
|
# KERNMISCCPPFLAGS
|
|
|
|
# Miscellaneous cpp flags to be passed to the library's Makefile
|
|
|
|
# when building.
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
# KERNMISCMAKEFLAGS
|
|
|
|
# Miscellaneous flags to be passed to the library's Makefile when
|
|
|
|
# building. See library's Makefile for more details about
|
|
|
|
# supported flags and their default values.
|
1993-10-13 08:55:19 +03:00
|
|
|
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
# Default values:
|
1996-08-08 19:06:39 +04:00
|
|
|
KERNDST?= ${.OBJDIR}/lib/kern
|
1996-09-30 19:54:35 +04:00
|
|
|
KERN_AS?= obj
|
|
|
|
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
KERNDIR= $S/lib/libkern
|
|
|
|
.if (${KERN_AS} == "obj")
|
1996-08-08 19:06:39 +04:00
|
|
|
KERNLIB= ${KERNDST}/libkern.o
|
1995-10-07 12:56:54 +03:00
|
|
|
KERNLIB_PROF= ${KERNDST}/libkern.po
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
.else
|
|
|
|
KERNLIB= ${KERNDST}/libkern.a
|
|
|
|
KERNLIB_PROF= ${KERNDST}/libkern_p.a
|
1996-09-30 19:54:35 +04:00
|
|
|
.endif
|
1993-10-13 08:55:19 +03:00
|
|
|
|
1996-02-02 23:34:38 +03:00
|
|
|
KERNMAKE= \
|
1996-08-08 19:06:39 +04:00
|
|
|
cd ${KERNDIR} && MAKEOBJDIR=${KERNDST} ${MAKE} \
|
1996-12-27 00:32:37 +03:00
|
|
|
CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
|
|
|
|
AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
|
|
|
|
LD=${LD:Q} STRIP=${STRIP:Q} \
|
|
|
|
MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
KERNCPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
|
1997-02-17 00:25:18 +03:00
|
|
|
KERNMISCCPPFLAGS=${KERNMISCCPPFLAGS:Q} \
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
${KERNMISCMAKEFLAGS}
|
1996-02-02 23:34:38 +03:00
|
|
|
|
1995-06-25 00:31:12 +04:00
|
|
|
${KERNLIB}: .NOTMAIN __always_make_kernlib
|
1993-10-13 08:55:19 +03:00
|
|
|
@echo making sure the kern library is up to date...
|
1996-09-30 19:54:35 +04:00
|
|
|
.if (${KERN_AS} == "library")
|
|
|
|
@${KERNMAKE} libkern.a
|
|
|
|
.else
|
1996-02-02 23:34:38 +03:00
|
|
|
@${KERNMAKE} libkern.o
|
1996-09-30 19:54:35 +04:00
|
|
|
.endif
|
1993-10-13 08:55:19 +03:00
|
|
|
|
1995-06-25 00:31:12 +04:00
|
|
|
${KERNLIB_PROF}: .NOTMAIN __always_make_kernlib
|
1993-10-13 08:55:19 +03:00
|
|
|
@echo making sure the profiled kern library is up to date...
|
1996-09-30 19:54:35 +04:00
|
|
|
.if (${KERN_AS} == "library")
|
|
|
|
@${KERNMAKE} libkern_p.a
|
|
|
|
.else
|
1996-02-02 23:34:38 +03:00
|
|
|
@${KERNMAKE} libkern.po
|
1996-09-30 19:54:35 +04:00
|
|
|
.endif
|
1995-06-25 00:31:12 +04:00
|
|
|
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
clean: .NOTMAIN cleankernlib
|
|
|
|
cleankernlib: .NOTMAIN __always_make_kernlib
|
1995-06-25 00:31:12 +04:00
|
|
|
@echo cleaning the kern library objects
|
1996-02-02 23:34:38 +03:00
|
|
|
@${KERNMAKE} clean
|
1993-10-13 08:55:19 +03:00
|
|
|
|
clean up substantially. Transform clean, depend, cleandir targets from ::
to :, so they can be used e.g. with <bsd.prog.mk>. Standardize variable
names used to configure kernel libraries.
Variables used by these Makefile.inc's are:
S must be set to the top of the 'sys' tree.
${LIB}DST may be set to the location of the directory where library
objects are to be built. Defaults to ${.OBJDIR}/lib/${lib}.
${LIB}_AS may be set to 'obj' to build a object from the library's
object files. (Otherwise, a library will be built.)
Defaults to 'library'.
${LIB}MISCMAKEFLAGS
Miscellaneous flags to be passed to the library's Makefile when
building. See library's Makefile for more details about
supported flags and their default values.
(where LIB is KERN, SA, or Z, and lib is kern, sa, or z, depending on which
library's Makefile.inc is being discussed.)
1997-01-24 01:29:07 +03:00
|
|
|
cleandir: .NOTMAIN cleandirkernlib
|
|
|
|
cleandirkernlib: .NOTMAIN __always_make_kernlib
|
|
|
|
@echo cleandiring the kern library objects
|
|
|
|
@${KERNMAKE} cleandir
|
|
|
|
|
|
|
|
depend: .NOTMAIN dependkernlib
|
|
|
|
dependkernlib: .NOTMAIN __always_make_kernlib
|
1996-05-11 20:11:30 +04:00
|
|
|
@echo depending the kern library objects
|
|
|
|
@${KERNMAKE} depend
|
|
|
|
|
1993-10-13 09:17:16 +03:00
|
|
|
__always_make_kernlib: .NOTMAIN
|
1997-03-07 03:50:30 +03:00
|
|
|
@(mkdir -p ${KERNDST})
|