2 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
3 # Copyright (C) 2007-2008 Glenn Randers-Pehrson
4 # For conditions of distribution and use, see copyright notice in png.h
8 MANDIR= ${PREFIX}/man/cat
14 SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
15 pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
16 pngwio.c pngwrite.c pngwtran.c pngwutil.c
21 CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE
25 CLEANFILES+= pngtest.o pngtest
27 MAN= libpng.3 libpngpf.3 png.5
28 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt
31 ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
34 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
37 cd ${.OBJDIR} && env \
38 LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
41 if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
42 ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
44 if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
45 ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
47 if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
48 ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
50 if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
51 ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
53 if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
54 ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
56 if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
57 ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
61 @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
62 @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
63 @rm -f ${DESTDIR}${PREFIX}/include/png.h
64 @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
65 @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
66 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
67 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng
68 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
69 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
70 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
71 -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png