xref: /openbsd/lib/libz/Makefile (revision d415bd75)
1#	$OpenBSD: Makefile,v 1.21 2021/07/04 14:24:49 tb Exp $
2
3LIB=	z
4HDRS=	zconf.h zlib.h
5SRCS=	adler32.c compress.c crc32.c deflate.c gzclose.c gzlib.c \
6	gzread.c gzwrite.c infback.c inffast.c inflate.c inftrees.c \
7	trees.c uncompr.c zutil.c
8MAN=	compress.3
9
10PC_FILES=zlib.pc
11CLEANFILES+=${PC_FILES}
12
13includes:
14	@cd ${.CURDIR}; for i in $(HDRS); do \
15		j="cmp -s $$i ${DESTDIR}/usr/include/$$i || \
16		    ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \
17		    $$i ${DESTDIR}/usr/include"; \
18		echo $$j; \
19		eval "$$j"; \
20	done
21
22all: ${PC_FILES}
23${PC_FILES}: zlib.h
24	/bin/sh ${.CURDIR}/generate_pkgconfig.sh -c ${.CURDIR} -o ${.OBJDIR}
25
26beforeinstall:
27	${INSTALL} ${INSTALL_COPY} -o root -g ${SHAREGRP} \
28	    -m ${SHAREMODE} ${.OBJDIR}/${PC_FILES} ${DESTDIR}/usr/lib/pkgconfig/
29
30.include <bsd.lib.mk>
31