2 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
3 # Copyright (C) 2007-2009 Glenn Randers-Pehrson
5 # This code is released under the libpng license.
6 # For conditions of distribution and use, see the disclaimer
11 MANDIR= ${PREFIX}/man/cat
17 SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
18 pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
19 pngwio.c pngwrite.c pngwtran.c pngwutil.c
24 CPPFLAGS+= -I${.CURDIR}
28 CLEANFILES+= pngtest.o pngtest
30 MAN= libpng.3 libpngpf.3 png.5
31 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt
34 ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
37 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
40 cd ${.OBJDIR} && env \
41 LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
44 if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
45 ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include; \
47 if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
48 ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
50 if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
51 ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
53 if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
54 ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
56 if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
57 ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
59 if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
60 ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
64 @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
65 @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
66 @rm -f ${DESTDIR}${PREFIX}/include/png.h
67 @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
68 @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
69 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
70 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
71 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
72 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
73 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
74 -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png