2000-02-01 08:25:24 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.33 2000/02/01 05:25:51 tsutsui 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
|
1998-10-15 22:46:37 +04:00
|
|
|
KERN_AS?= library
|
1999-05-07 18:28:50 +04:00
|
|
|
KERNDOTDIR?= ../../.
|
1996-09-30 19:54:35 +04:00
|
|
|
|
1999-05-07 18:28:50 +04:00
|
|
|
KERNDIR= ${S:S@^.@${KERNDOTDIR}@:Q}/lib/libkern
|
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
|
|
|
.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= \
|
1999-05-07 18:28:50 +04:00
|
|
|
cd ${KERNDST} && ${MAKE} -f ${KERNDIR:Q}/Makefile \
|
|
|
|
KERNDIR=${KERNDIR:Q} \
|
1996-12-27 00:32:37 +03:00
|
|
|
CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
|
|
|
|
AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
|
1997-11-05 00:18:24 +03:00
|
|
|
LORDER=${LORDER:Q} \
|
|
|
|
TSORT=${TSORT:Q} \
|
2000-02-01 08:25:24 +03:00
|
|
|
LD=${LD:Q} STRIP=${STRIP:Q} \
|
1998-02-07 03:11:29 +03:00
|
|
|
AR=${AR:Q} NM=${NM:Q} \
|
|
|
|
RANLIB=${RANLIB:Q} SIZE=${SIZE:Q} \
|
1996-12-27 00:32:37 +03:00
|
|
|
MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
|
1999-05-07 18:28:50 +04:00
|
|
|
KERNCPPFLAGS=${CPPFLAGS:S@^-I.@-I${KERNDOTDIR}@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
|
|
|
|
1998-09-05 19:15:14 +04:00
|
|
|
cleandir distclean: .NOTMAIN cleandirkernlib
|
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
|
|
|
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})
|
1999-05-07 18:28:50 +04:00
|
|
|
|
|
|
|
.PHONY: __always_make_kernlib
|
|
|
|
.PHONY: cleankernlib cleandirkernlib dependkernlib
|