[BACK]Return to Makefile CVS log [TXT][DIR] Up to [local] / src / lib / libz

File: [local] / src / lib / libz / Makefile (download)

Revision 1.22, Sun Jan 21 07:33:46 2024 UTC (4 months, 2 weeks ago) by tb
Branch: MAIN
CVS Tags: OPENBSD_7_5_BASE, OPENBSD_7_5, HEAD
Changes since 1.21: +3 -1 lines

Define HAVE_HIDDEN for libz

This adds the hidden visibility attribute to functions that are needed in
multiple source files of the library but not part of the public API. This
is technically a major bump, but that decided to be overkill.

discussed with deraadt and millert

#	$OpenBSD: Makefile,v 1.22 2024/01/21 07:33:46 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

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/

.include <bsd.lib.mk>