Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 1 | # makefile for libpng |
| 2 | # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. |
| 3 | # For conditions of distribution and use, see copyright notice in png.h |
| 4 | |
| 5 | PREFIX?= /usr/local |
| 6 | LIBDIR= ${PREFIX}/lib |
| 7 | MANDIR= ${PREFIX}/man/cat |
| 8 | |
Glenn Randers-Pehrson | fcbd787 | 2002-04-07 16:35:38 -0500 | [diff] [blame] | 9 | SHLIB_MAJOR= 0 |
Glenn Randers-Pehrson | 86dc981 | 2006-05-10 07:27:44 -0500 | [diff] [blame^] | 10 | SHLIB_MINOR= 1.4.0beta3 |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 11 | |
| 12 | LIB= png |
| 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 |
| 16 | |
| 17 | HDRS= png.h pngconf.h |
| 18 | |
| 19 | CFLAGS+= -Wall |
Glenn Randers-Pehrson | 1721829 | 2006-04-20 07:20:46 -0500 | [diff] [blame] | 20 | CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE -DPNG_USE_PNGGCCRD |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 21 | |
| 22 | NOPROFILE= Yes |
| 23 | |
| 24 | CLEANFILES+= pngtest.o pngtest |
| 25 | |
| 26 | MAN= libpng.3 libpngpf.3 png.5 |
Glenn Randers-Pehrson | c3d51c1 | 2006-03-02 07:23:18 -0600 | [diff] [blame] | 27 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 28 | |
| 29 | pngtest.o: pngtest.c |
| 30 | ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET} |
| 31 | |
| 32 | pngtest: pngtest.o |
| 33 | ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm |
| 34 | |
| 35 | test: pngtest |
| 36 | cd ${.OBJDIR} && env \ |
| 37 | LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest |
| 38 | |
| 39 | beforeinstall: |
Glenn Randers-Pehrson | fcbd787 | 2002-04-07 16:35:38 -0500 | [diff] [blame] | 40 | if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \ |
| 41 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \ |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 42 | fi |
| 43 | if [ ! -d ${DESTDIR}${LIBDIR} ]; then \ |
| 44 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \ |
| 45 | fi |
| 46 | if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \ |
| 47 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \ |
| 48 | fi |
| 49 | if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \ |
| 50 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \ |
| 51 | fi |
| 52 | if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \ |
| 53 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \ |
| 54 | fi |
| 55 | if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \ |
| 56 | ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \ |
| 57 | fi |
| 58 | |
| 59 | afterinstall: |
| 60 | @rm -f ${DESTDIR}${LIBDIR}/libpng_pic.a |
| 61 | @rm -f ${DESTDIR}${LIBDIR}/debug/libpng.a |
Glenn Randers-Pehrson | fcbd787 | 2002-04-07 16:35:38 -0500 | [diff] [blame] | 62 | @rm -f ${DESTDIR}${PREFIX}/include/png.h |
| 63 | @rm -f ${DESTDIR}${PREFIX}/include/pngconf.h |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 64 | @rmdir ${DESTDIR}${LIBDIR}/debug 2>/dev/null || true |
| 65 | ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ |
Glenn Randers-Pehrson | fcbd787 | 2002-04-07 16:35:38 -0500 | [diff] [blame] | 66 | -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include/libpng |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 67 | ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 68 | -m ${NONBINMODE} ${HDRS} ${DESTDIR}${PREFIX}/include |
| 69 | ${INSTALL} ${INSTALL_COPY} -o ${SHAREOWN} -g ${SHAREGRP} \ |
Glenn Randers-Pehrson | c1bfe68 | 2002-03-06 22:08:00 -0600 | [diff] [blame] | 70 | -m ${NONBINMODE} ${DOCS} ${DESTDIR}${PREFIX}/share/doc/png |
| 71 | |
| 72 | .include <bsd.lib.mk> |