2 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
3 # For conditions of distribution and use, see copyright notice in png.h
7 MANDIR= ${PREFIX}/man/cat
13 SRCS= png.c pngerror.c pnggccrd.c pngget.c pngmem.c pngpread.c \
14 pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
15 pngwio.c pngwrite.c pngwtran.c pngwutil.c
20 CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD
24 CLEANFILES+= pngtest.o pngtest
26 MAN= libpng.3 libpngpf.3 png.5
27 DOCS= ANNOUNCE CHANGES LICENSE README libpng.txt
30 ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
33 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
36 cd ${.OBJDIR} && env \
37 LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
40 if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
41 ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
43 if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
44 ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
46 if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
47 ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
49 if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
50 ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
52 if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
53 ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
55 if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
56 ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
60 @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a
61 @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a
62 @rm -f ${DESTDIR}${PREFIX}/include/png.h
63 @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h
64 @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true
65 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
66 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng
67 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
68 -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include
69 ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \
70 -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png