Home | History | Annotate | Line # | Download | only in libz
Makefile.inc revision 1.3
      1  1.3  cgd #	$NetBSD: Makefile.inc,v 1.3 1997/02/16 21:25:23 cgd Exp $
      2  1.1  cgd #
      3  1.2  cgd #	Configuration variables (default values are below):
      4  1.2  cgd #
      5  1.2  cgd #	S	must be set to the top of the 'sys' tree.
      6  1.2  cgd #	ZDST	may be set to the location of the directory where library
      7  1.2  cgd #		objects are to be built.  Defaults to ${.OBJDIR}/lib/z.
      8  1.2  cgd #	Z_AS	may be set to 'obj' to build a object from the library's
      9  1.2  cgd #		object files.  (Otherwise, a library will be built.)
     10  1.2  cgd #		Defaults to 'library'.
     11  1.3  cgd #	ZMISCCPPFLAGS
     12  1.3  cgd #		Miscellaneous cpp flags to be passed to the library's Makefile
     13  1.3  cgd #		when building.
     14  1.2  cgd #	ZMISCMAKEFLAGS
     15  1.2  cgd #		Miscellaneous flags to be passed to the library's Makefile when
     16  1.2  cgd #		building.  See library's Makefile for more details about
     17  1.2  cgd #		supported flags and their default values.
     18  1.1  cgd 
     19  1.2  cgd # Default values:
     20  1.1  cgd ZDST?=		${.OBJDIR}/lib/z
     21  1.2  cgd Z_AS?=		library
     22  1.1  cgd 
     23  1.2  cgd ZDIR=		$S/lib/libz
     24  1.2  cgd .if (${Z_AS} == "obj")
     25  1.2  cgd ZLIB=		${ZDST}/libz.o
     26  1.2  cgd ZLIB_PROF=	${ZDST}/libz.po
     27  1.2  cgd .else
     28  1.1  cgd ZLIB=		${ZDST}/libz.a
     29  1.2  cgd ZLIB_PROF=	${ZDST}/libz_p.a
     30  1.1  cgd .endif
     31  1.1  cgd 
     32  1.1  cgd ZMAKE= \
     33  1.1  cgd 	cd ${ZDIR} && MAKEOBJDIR=${ZDST} ${MAKE} \
     34  1.1  cgd 	    CC=${CC:Q} CFLAGS=${CFLAGS:Q} \
     35  1.1  cgd 	    AS=${AS:Q} AFLAGS=${AFLAGS:Q} \
     36  1.1  cgd 	    LD=${LD:Q} STRIP=${STRIP:Q} \
     37  1.1  cgd 	    MACHINE=${MACHINE} MACHINE_ARCH=${MACHINE_ARCH:Q} \
     38  1.2  cgd 	    ZCPPFLAGS=${CPPFLAGS:S@^-I.@-I../../.@g:Q} \
     39  1.3  cgd 	    ZMISCCPPFLAGS=${ZMISCCPPFLAGS:Q} \
     40  1.2  cgd 	    ${ZMISCMAKEFLAGS}
     41  1.1  cgd 
     42  1.1  cgd ${ZLIB}:		.NOTMAIN __always_make_zlib
     43  1.1  cgd 	@echo making sure the z library is up to date...
     44  1.1  cgd .if (${Z_AS} == "library")
     45  1.1  cgd 	@${ZMAKE} libz.a
     46  1.1  cgd .else
     47  1.1  cgd 	@${ZMAKE} libz.o
     48  1.1  cgd .endif
     49  1.1  cgd 
     50  1.2  cgd ${ZLIB_PROF}:		.NOTMAIN __always_make_zlib
     51  1.2  cgd 	@echo making sure the profiled z library is up to date...
     52  1.2  cgd .if (${Z_AS} == "library")
     53  1.2  cgd 	@${ZMAKE} libz_p.a
     54  1.2  cgd .else
     55  1.2  cgd 	@${ZMAKE} libz.po
     56  1.2  cgd .endif
     57  1.2  cgd 
     58  1.2  cgd clean:			.NOTMAIN cleanzlib
     59  1.2  cgd cleanzlib:		.NOTMAIN __always_make_zlib
     60  1.1  cgd 	@echo cleaning the z library objects
     61  1.1  cgd 	@${ZMAKE} clean
     62  1.1  cgd 
     63  1.2  cgd cleandir:		.NOTMAIN cleandirzlib
     64  1.2  cgd cleandirzlib:		.NOTMAIN __always_make_zlib
     65  1.2  cgd 	@echo cleandiring the z library objects
     66  1.2  cgd 	@${ZMAKE} cleandir
     67  1.2  cgd 
     68  1.2  cgd depend:			.NOTMAIN dependzlib
     69  1.2  cgd dependzlib:		.NOTMAIN __always_make_zlib
     70  1.1  cgd 	@echo depending the z library objects
     71  1.1  cgd 	@${ZMAKE} depend
     72  1.1  cgd 
     73  1.1  cgd __always_make_zlib:	.NOTMAIN
     74  1.1  cgd 	@mkdir -p ${ZDST}
     75