1 # makefile for libpng on NetBSD
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
4 # Copyright (C) 2002 Patrick R.L. Welche
6 # This code is released under the libpng license.
7 # For conditions of distribution and use, see the disclaimer
14 SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
15 pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
16 pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
17 INCS= png.h pngconf.h pnglibconf.h
19 CPPFLAGS+= -I${.CURDIR}
20 CFLAGS+= -Wall -Wextra -Wundef
22 CLEANFILES+= pngtest.o pngtest pnglibconf.h
24 # Pre-built configuration
25 # See scripts/pnglibconf.mak for more options
26 PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
28 # We should be able to do something like this instead of the manual
29 # uncommenting, but it core dumps for me at the moment:
30 # .if ${MACHINE_ARCH} == "i386"
35 ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
37 pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
38 cp ${PNGLIBCONF_H_PREBUILT} $@
41 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
43 pngtest: pngtest.o libpng.a
44 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm
50 @echo "The $@ target is no longer supported by this makefile."