1 # makefile for libpng for NetBSD for the standard
2 # make obj && make depend && make && make test
3 # make includes && make install
4 # Copyright (C) 2002 Patrick R.L. Welche
5 # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
7 # This code is released under the libpng license.
8 # For conditions of distribution and use, see the disclaimer
12 LIBDIR= ${LOCALBASE}/lib
13 MANDIR= ${LOCALBASE}/man
14 INCSDIR=${LOCALBASE}/include
20 SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
21 pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
22 pngwio.c pngwrite.c pngwtran.c pngwutil.c
23 INCS= png.h pngconf.h pnglibconf.h
24 MAN= libpng.3 libpngpf.3 png.5
26 CPPFLAGS+=-I${.CURDIR}
28 # Pre-built configuration
29 # See scripts/pnglibconf.mak for more options
30 PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
32 # We should be able to do something like this instead of the manual
33 # uncommenting, but it core dumps for me at the moment:
34 # .if ${MACHINE_ARCH} == "i386"
38 CLEANFILES+=pngtest.o pngtest pnglibconf.h
41 ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
43 pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
44 cp ${PNGLIBCONF_H_PREBUILT} $@
47 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
49 pngtest: pngtest.o libpng.a
50 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm
53 cd ${.CURDIR} && ${.OBJDIR}/pngtest