xref: /aosp_15_r20/external/libpng/scripts/makefile.netbsd (revision a67afe4df73cf47866eedc69947994b8ff839aba)
1*a67afe4dSAndroid Build Coastguard Worker# makefile for libpng on NetBSD
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) 2002 Patrick R.L. Welche
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 WorkerINCS=	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# We should be able to do something like this instead of the manual
29*a67afe4dSAndroid Build Coastguard Worker# uncommenting, but it core dumps for me at the moment:
30*a67afe4dSAndroid Build Coastguard Worker# .if ${MACHINE_ARCH} == "i386"
31*a67afe4dSAndroid Build Coastguard Worker#   MKLINT= no
32*a67afe4dSAndroid Build Coastguard Worker# .endif
33*a67afe4dSAndroid Build Coastguard Worker
34*a67afe4dSAndroid Build Coastguard Worker.c.o:
35*a67afe4dSAndroid Build Coastguard Worker	${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
36*a67afe4dSAndroid Build Coastguard Worker
37*a67afe4dSAndroid Build Coastguard Workerpnglibconf.h:	${PNGLIBCONF_H_PREBUILT}
38*a67afe4dSAndroid Build Coastguard Worker	cp ${PNGLIBCONF_H_PREBUILT} $@
39*a67afe4dSAndroid Build Coastguard Worker
40*a67afe4dSAndroid Build Coastguard Workerpngtest.o:	pngtest.c
41*a67afe4dSAndroid Build Coastguard Worker	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
42*a67afe4dSAndroid Build Coastguard Worker
43*a67afe4dSAndroid Build Coastguard Workerpngtest:	pngtest.o libpng.a
44*a67afe4dSAndroid Build Coastguard Worker	${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm
45*a67afe4dSAndroid Build Coastguard Worker
46*a67afe4dSAndroid Build Coastguard Workertest:	pngtest
47*a67afe4dSAndroid Build Coastguard Worker	./pngtest
48*a67afe4dSAndroid Build Coastguard Worker
49*a67afe4dSAndroid Build Coastguard Workerinstall:
50*a67afe4dSAndroid Build Coastguard Worker	@echo "The $@ target is no longer supported by this makefile."
51*a67afe4dSAndroid Build Coastguard Worker	@false
52*a67afe4dSAndroid Build Coastguard Worker
53*a67afe4dSAndroid Build Coastguard Worker.include <bsd.lib.mk>
54