2002-06-15 23:30:56 +04:00
|
|
|
# $NetBSD: Makefile.inc,v 1.11 2002/06/15 19:30:56 matt Exp $
|
1997-01-16 03:19:04 +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.
|
|
|
|
# ZDST may be set to the location of the directory where library
|
|
|
|
# objects are to be built. Defaults to ${.OBJDIR}/lib/z.
|
|
|
|
# Z_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
|
|
|
# ZMISCCPPFLAGS
|
|
|
|
# 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
|
|
|
# ZMISCMAKEFLAGS
|
|
|
|
# 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.
|
1997-01-16 03:19:04 +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:
|
1997-01-16 03:19:04 +03:00
|
|
|
ZDST?= ${.OBJDIR}/lib/z
|
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
|
|
|
Z_AS?= library
|
1999-05-07 18:28:50 +04:00
|
|
|
ZDOTDIR?= ../../.
|
1997-01-16 03:19:04 +03:00
|
|
|
|
1999-05-07 18:28:50 +04:00
|
|
|
ZDIR= ${S:S@^.@${ZDOTDIR}@:Q}/lib/libz
|
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 (${Z_AS} == "obj")
|
1997-01-16 03:19:04 +03:00
|
|
|
ZLIB= ${ZDST}/libz.o
|
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
|
|
|
ZLIB_PROF= ${ZDST}/libz.po
|
|
|
|
.else
|
|
|
|
ZLIB= ${ZDST}/libz.a
|
|
|
|
ZLIB_PROF= ${ZDST}/libz_p.a
|
1997-01-16 03:19:04 +03:00
|
|
|
.endif
|
|
|
|
|
|
|
|
ZMAKE= \
|
1999-05-07 18:28:50 +04:00
|
|
|
cd ${ZDST} && ${MAKE} -f ${ZDIR:Q}/Makefile \
|
|
|
|
ZDIR=${ZDIR:Q} \
|
1997-01-16 03:19:04 +03:00
|
|
|
CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
|
|
|
|
AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
|
1998-02-07 03:11:29 +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} \
|
1997-01-16 03:19:04 +03:00
|
|
|
MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
|
1999-05-07 18:28:50 +04:00
|
|
|
ZCPPFLAGS=${CPPFLAGS:S@^-I.@-I${ZDOTDIR}@g:Q} \
|
1997-02-17 00:25:18 +03:00
|
|
|
ZMISCCPPFLAGS=${ZMISCCPPFLAGS: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
|
|
|
${ZMISCMAKEFLAGS}
|
1997-01-16 03:19:04 +03:00
|
|
|
|
2000-12-05 20:01:19 +03:00
|
|
|
${ZLIB}: .NOTMAIN .MAKE __always_make_zlib
|
1997-01-16 03:19:04 +03:00
|
|
|
@echo making sure the z library is up to date...
|
|
|
|
.if (${Z_AS} == "library")
|
|
|
|
@${ZMAKE} libz.a
|
|
|
|
.else
|
|
|
|
@${ZMAKE} libz.o
|
|
|
|
.endif
|
|
|
|
|
2000-12-05 20:01:19 +03:00
|
|
|
${ZLIB_PROF}: .NOTMAIN .MAKE __always_make_zlib
|
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
|
|
|
@echo making sure the profiled z library is up to date...
|
|
|
|
.if (${Z_AS} == "library")
|
|
|
|
@${ZMAKE} libz_p.a
|
|
|
|
.else
|
|
|
|
@${ZMAKE} libz.po
|
|
|
|
.endif
|
|
|
|
|
|
|
|
clean: .NOTMAIN cleanzlib
|
2001-11-22 01:10:54 +03:00
|
|
|
cleanzlib: .NOTMAIN
|
1997-01-16 03:19:04 +03:00
|
|
|
@echo cleaning the z library objects
|
2002-06-15 23:30:56 +04:00
|
|
|
@if [ -d "${ZDST}" ]; then ${ZMAKE} clean; fi
|
1997-01-16 03:19:04 +03:00
|
|
|
|
1998-09-05 19:15:14 +04:00
|
|
|
cleandir distclean: .NOTMAIN cleandirzlib
|
2001-11-22 01:10:54 +03:00
|
|
|
cleandirzlib: .NOTMAIN
|
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
|
|
|
@echo cleandiring the z library objects
|
2002-06-15 23:30:56 +04:00
|
|
|
@if [ -d "${ZDST}" ]; then ${ZMAKE} cleandir; fi
|
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
|
|
|
|
|
|
|
depend: .NOTMAIN dependzlib
|
2000-12-05 20:01:19 +03:00
|
|
|
dependzlib: .NOTMAIN .MAKE __always_make_zlib
|
1997-01-16 03:19:04 +03:00
|
|
|
@echo depending the z library objects
|
|
|
|
@${ZMAKE} depend
|
|
|
|
|
|
|
|
__always_make_zlib: .NOTMAIN
|
|
|
|
@mkdir -p ${ZDST}
|
1999-05-07 18:28:50 +04:00
|
|
|
|
|
|
|
.PHONY: __always_make_zlib
|
|
|
|
.PHONY: cleanzlib cleandirzlib dependzlib
|