2000-02-01 08:25:24 +03:00
|
|
|
# $NetBSD: Makefile.inc,v 1.17 2000/02/01 05:25:50 tsutsui Exp $
|
1995-06-25 00:15:55 +04:00
|
|
|
#
|
1997-01-24 01:58:26 +03:00
|
|
|
# Configuration variables (default values are below):
|
|
|
|
#
|
|
|
|
# S must be set to the top of the 'sys' tree.
|
|
|
|
# COMPATDST
|
|
|
|
# may be set to the location of the directory where library
|
|
|
|
# objects are to be built. Defaults to ${.OBJDIR}/lib/compat.
|
|
|
|
# COMPAT_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'.
|
|
|
|
# COMPATMISCMAKEFLAGS
|
|
|
|
# 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.
|
1995-06-25 00:15:55 +04:00
|
|
|
|
1997-01-24 01:58:26 +03:00
|
|
|
# Default values:
|
|
|
|
COMPATDST?= ${.OBJDIR}/lib/compat
|
|
|
|
COMPAT_AS?= library
|
1999-05-07 18:28:50 +04:00
|
|
|
COMPATDOTDIR?= ../../.
|
1995-06-25 00:15:55 +04:00
|
|
|
|
1999-05-07 18:28:50 +04:00
|
|
|
COMPATDIR= ${S:S@^.@${COMPATDOTDIR}@:Q}/compat/common
|
1997-01-24 01:58:26 +03:00
|
|
|
.if (${COMPAT_AS} == "obj")
|
|
|
|
COMPATLIB= ${COMPATDST}/libcompat.o
|
|
|
|
COMPATLIB_PROF= ${COMPATDST}/libcompat.po
|
|
|
|
.else
|
|
|
|
COMPATLIB= ${COMPATDST}/libcompat.a
|
1995-06-25 00:15:55 +04:00
|
|
|
COMPATLIB_PROF= ${COMPATDST}/libcompat_p.a
|
1997-01-24 01:58:26 +03:00
|
|
|
.endif
|
1995-06-25 00:15:55 +04:00
|
|
|
|
1996-02-02 23:34:38 +03:00
|
|
|
COMPATMAKE= \
|
1999-05-07 18:28:50 +04:00
|
|
|
cd ${COMPATDST} && ${MAKE} -f ${COMPATDIR:Q}/Makefile \
|
|
|
|
COMPATDIR=${COMPATDIR:Q} \
|
1996-12-27 00:30:59 +03:00
|
|
|
CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
|
1997-01-24 01:58:26 +03:00
|
|
|
AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
|
1997-11-05 00:18:24 +03:00
|
|
|
AR=${AR:Q} NM=${NM:Q} \
|
|
|
|
LORDER=${LORDER:Q} \
|
|
|
|
TSORT=${TSORT:Q} \
|
|
|
|
RANLIB=${RANLIB:Q} \
|
2000-02-01 08:25:24 +03:00
|
|
|
LD=${LD:Q} STRIP=${STRIP:Q} \
|
1997-01-24 01:58:26 +03:00
|
|
|
MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
|
1999-05-07 18:28:50 +04:00
|
|
|
COMPATCPPFLAGS=${CPPFLAGS:S@^-I.@-I${COMPATDOTDIR}@g:Q} \
|
1997-01-24 01:58:26 +03:00
|
|
|
${COMPATMISCMAKEFLAGS}
|
1996-02-02 23:34:38 +03:00
|
|
|
|
1995-06-25 00:15:55 +04:00
|
|
|
${COMPATLIB}: .NOTMAIN __always_make_compatlib
|
|
|
|
@echo making sure the compat library is up to date...
|
1997-01-24 01:58:26 +03:00
|
|
|
.if (${COMPAT_AS} == "library")
|
1996-02-02 23:34:38 +03:00
|
|
|
@${COMPATMAKE} libcompat.a
|
1997-01-24 01:58:26 +03:00
|
|
|
.else
|
|
|
|
@${COMPATMAKE} libcompat.o
|
|
|
|
.endif
|
1995-06-25 00:15:55 +04:00
|
|
|
|
|
|
|
${COMPATLIB_PROF}: .NOTMAIN __always_make_compatlib
|
|
|
|
@echo making sure the profiled compat library is up to date...
|
1997-01-24 01:58:26 +03:00
|
|
|
.if (${COMPAT_AS} == "library")
|
1996-02-02 23:34:38 +03:00
|
|
|
@${COMPATMAKE} libcompat_p.a
|
1997-01-24 01:58:26 +03:00
|
|
|
.else
|
|
|
|
@${COMPATMAKE} libcompat.po
|
|
|
|
.endif
|
1995-06-25 00:15:55 +04:00
|
|
|
|
1997-01-24 01:58:26 +03:00
|
|
|
clean: .NOTMAIN cleancompatlib
|
|
|
|
cleancompatlib: .NOTMAIN __always_make_compatlib
|
1995-06-25 00:15:55 +04:00
|
|
|
@echo cleaning the compat library objects
|
1996-02-02 23:34:38 +03:00
|
|
|
@${COMPATMAKE} clean
|
1995-06-25 00:15:55 +04:00
|
|
|
|
1998-09-05 19:15:14 +04:00
|
|
|
cleandir distclean: .NOTMAIN cleandircompatlib
|
1997-01-24 01:58:26 +03:00
|
|
|
cleandircompatlib: .NOTMAIN __always_make_compatlib
|
|
|
|
@echo cleandiring the compat library objects
|
|
|
|
@${COMPATMAKE} cleandir
|
|
|
|
|
|
|
|
depend: .NOTMAIN dependcompatlib
|
|
|
|
dependcompatlib: .NOTMAIN __always_make_compatlib
|
1996-05-11 20:11:30 +04:00
|
|
|
@echo depending the compat library objects
|
|
|
|
@${COMPATMAKE} depend
|
|
|
|
|
1997-01-24 01:58:26 +03:00
|
|
|
__always_make_compatlib: .NOTMAIN
|
1996-02-02 23:34:38 +03:00
|
|
|
@mkdir -p ${COMPATDST}
|
1999-05-07 18:28:50 +04:00
|
|
|
|
|
|
|
.PHONY: __always_make_compatlib
|
|
|
|
.PHONY: cleancompatlib cleandircompatlib dependcompatlib
|