2003-03-26 01:48:43 +03:00
|
|
|
# $NetBSD: Makefile,v 1.13 2003/03/25 22:48:43 mycroft Exp $
|
1997-01-16 03:19:04 +03:00
|
|
|
|
|
|
|
LIB= z
|
2001-12-12 04:48:43 +03:00
|
|
|
NOPIC= # defined
|
|
|
|
NOPROFILE=# defined
|
1997-01-16 03:19:04 +03:00
|
|
|
|
1999-05-07 18:28:50 +04:00
|
|
|
CPPFLAGS= -I${ZDIR} ${ZCPPFLAGS} ${ZMISCCPPFLAGS} -D_ZLIB_PRIVATE
|
|
|
|
|
|
|
|
.PATH.c: ${ZDIR}
|
1997-01-16 03:19:04 +03:00
|
|
|
|
|
|
|
# files to be copied down from libz.
|
2003-03-26 01:48:43 +03:00
|
|
|
LIBZSRCS= crc32.c infblock.c infcodes.c inffast.c \
|
1999-04-15 04:52:58 +04:00
|
|
|
inflate.c inftrees.c infutil.c uncompr.c
|
1997-01-16 03:19:04 +03:00
|
|
|
LIBZHDRS= infblock.h infcodes.h inffast.h inftrees.h infutil.h \
|
|
|
|
zconf.h zlib.h zutil.h
|
|
|
|
|
|
|
|
# Other stuff
|
1999-04-15 04:52:58 +04:00
|
|
|
SRCS= ${LIBZSRCS} zalloc.c
|
1997-01-16 03:19:04 +03:00
|
|
|
|
|
|
|
# Files to clean up
|
|
|
|
CLEANFILES+= lib${LIB}.o
|
|
|
|
|
1997-06-01 01:21:13 +04:00
|
|
|
# only needed during build
|
|
|
|
libinstall::
|
|
|
|
|
2001-11-15 00:59:31 +03:00
|
|
|
.undef DESTDIR
|
1997-01-16 03:19:04 +03:00
|
|
|
.include <bsd.lib.mk>
|
|
|
|
|
|
|
|
lib${LIB}.o:: ${OBJS}
|
|
|
|
@echo building standard ${LIB} library
|
|
|
|
@rm -f lib${LIB}.o
|
|
|
|
@${LD} -r -o lib${LIB}.o `lorder ${OBJS} | tsort`
|
|
|
|
|
|
|
|
update-sources:
|
1999-04-15 06:28:36 +04:00
|
|
|
-@for file in ${LIBZSRCS} ${LIBZHDRS}; do \
|
|
|
|
tail +2 ${.CURDIR}/../../../lib/libz/$$file > .tmp1.$$file ; \
|
|
|
|
tail +2 ${.CURDIR}/$$file > .tmp2.$$file ; \
|
|
|
|
cmp -s .tmp1.$$file .tmp2.$$file || ( echo Updating $$file ; \
|
|
|
|
cp ${.CURDIR}/../../../lib/libz/$$file ${.CURDIR} ) ; \
|
|
|
|
rm .tmp1.$$file .tmp2.$$file ; \
|
1997-01-16 03:19:04 +03:00
|
|
|
done
|