xref: /aosp_15_r20/external/libpng/scripts/makefile.openbsd (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1*a67afe4dSAndroid Build Coastguard Worker# makefile for libpng
2*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2020-2022 Cosmin Truta
3*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
4*a67afe4dSAndroid Build Coastguard Worker# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
5*a67afe4dSAndroid Build Coastguard Worker#
6*a67afe4dSAndroid Build Coastguard Worker# This code is released under the libpng license.
7*a67afe4dSAndroid Build Coastguard Worker# For conditions of distribution and use, see the disclaimer
8*a67afe4dSAndroid Build Coastguard Worker# and license in png.h
9*a67afe4dSAndroid Build Coastguard Worker
10*a67afe4dSAndroid Build Coastguard WorkerSHLIB_MAJOR=	16
11*a67afe4dSAndroid Build Coastguard WorkerSHLIB_MINOR=	0
12*a67afe4dSAndroid Build Coastguard Worker
13*a67afe4dSAndroid Build Coastguard WorkerLIB=	png
14*a67afe4dSAndroid Build Coastguard WorkerSRCS=	png.c pngerror.c pngget.c pngmem.c pngpread.c \
15*a67afe4dSAndroid Build Coastguard Worker	pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
16*a67afe4dSAndroid Build Coastguard Worker	pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
17*a67afe4dSAndroid Build Coastguard WorkerHDRS=	png.h pngconf.h pnglibconf.h
18*a67afe4dSAndroid Build Coastguard Worker
19*a67afe4dSAndroid Build Coastguard WorkerCPPFLAGS+=	-I${.CURDIR}
20*a67afe4dSAndroid Build Coastguard WorkerCFLAGS+=	-Wall -Wextra -Wundef
21*a67afe4dSAndroid Build Coastguard Worker
22*a67afe4dSAndroid Build Coastguard WorkerCLEANFILES+=	pngtest.o pngtest pnglibconf.h
23*a67afe4dSAndroid Build Coastguard Worker
24*a67afe4dSAndroid Build Coastguard Worker# Pre-built configuration
25*a67afe4dSAndroid Build Coastguard Worker# See scripts/pnglibconf.mak for more options
26*a67afe4dSAndroid Build Coastguard WorkerPNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
27*a67afe4dSAndroid Build Coastguard Worker
28*a67afe4dSAndroid Build Coastguard Worker.c.o:
29*a67afe4dSAndroid Build Coastguard Worker	${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
30*a67afe4dSAndroid Build Coastguard Worker
31*a67afe4dSAndroid Build Coastguard Workerpnglibconf.h:	${PNGLIBCONF_H_PREBUILT}
32*a67afe4dSAndroid Build Coastguard Worker	cp ${PNGLIBCONF_H_PREBUILT} $@
33*a67afe4dSAndroid Build Coastguard Worker
34*a67afe4dSAndroid Build Coastguard Workerpngtest.o:	pngtest.c
35*a67afe4dSAndroid Build Coastguard Worker	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
36*a67afe4dSAndroid Build Coastguard Worker
37*a67afe4dSAndroid Build Coastguard Workerpngtest:	pngtest.o
38*a67afe4dSAndroid Build Coastguard Worker	${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
39*a67afe4dSAndroid Build Coastguard Worker
40*a67afe4dSAndroid Build Coastguard Workertest:	pngtest
41*a67afe4dSAndroid Build Coastguard Worker	env LD_LIBRARY_PATH="${.OBJDIR}" ./pngtest
42*a67afe4dSAndroid Build Coastguard Worker
43*a67afe4dSAndroid Build Coastguard Workerinstall:
44*a67afe4dSAndroid Build Coastguard Worker	@echo "The $@ target is no longer supported by this makefile."
45*a67afe4dSAndroid Build Coastguard Worker	@false
46*a67afe4dSAndroid Build Coastguard Worker
47*a67afe4dSAndroid Build Coastguard Worker.include <bsd.lib.mk>
48