# $OpenBSD: Makefile,v 1.23 2024/08/02 04:59:23 tb Exp $ LIB= z HDRS= zconf.h zlib.h SRCS= adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c \ gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c \ trees.c uncompr.c zutil.c MAN= compress.3 VERSION_SCRIPT= Symbols.map SYMBOL_LIST= ${.CURDIR}/Symbols.list CLEANFILES+= ${VERSION_SCRIPT} PC_FILES=zlib.pc CLEANFILES+=${PC_FILES} CFLAGS += -DHAVE_HIDDEN includes: @cd ${.CURDIR}; for i in $(HDRS); do \ j="cmp -s $$i ${DESTDIR}/usr/include/$$i || \ ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ $$i ${DESTDIR}/usr/include"; \ echo $$j; \ eval "$$j"; \ done all: ${PC_FILES} ${PC_FILES}: zlib.h /bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR} beforeinstall: ${INSTALL} ${INSTALL_COPY} -o root -g ${SHAREGRP} \ -m ${SHAREMODE} ${.OBJDIR}/${PC_FILES} ${DESTDIR}/usr/lib/pkgconfig/ ${VERSION_SCRIPT}: ${SYMBOL_LIST} { printf '{\n\tglobal:\n'; \ sed '/^[._a-zA-Z]/s/$$/;/; s/^/ /' ${SYMBOL_LIST}; \ printf '\n\tlocal:\n\t\t*;\n};\n'; } >$@.tmp && mv $@.tmp $@ .include