core: add support for the autoverbose feature
[fbsplash.git] / core / libs / libpng-1.2.18 / scripts / makefile.openbsd
blob63d60bbe40b030cd143b9b6054f3f4865aa9e6e2
1 # makefile for libpng
2 # Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc.
3 # Copyright (C) 2007 Glenn Randers-Pehrson
4 # For conditions of distribution and use, see copyright notice in png.h
6 PREFIX?= /usr/local
7 LIBDIR= ${PREFIX}/lib
8 MANDIR= ${PREFIX}/man/cat
10 SHLIB_MAJOR=    0
11 SHLIB_MINOR=    1.2.18
13 LIB=    png
14 SRCS=   png.c pngerror.c pnggccrd.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
18 HDRS=   png.h pngconf.h
20 CFLAGS+= -Wall
21 CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE -DPNG_USE_PNGGCCRD
23 NOPROFILE= Yes
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
30 pngtest.o:      pngtest.c
31         ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
33 pngtest:        pngtest.o
34         ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
36 test:   pngtest
37         cd ${.OBJDIR} && env \
38                 LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
40 beforeinstall:
41         if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
42           ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
43         fi
44         if [ ! -d ${DESTDIR}${LIBDIR} ]; then \
45           ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}; \
46         fi
47         if [ ! -d ${DESTDIR}${LIBDIR}/debug ]; then \
48           ${INSTALL} -d -o root -g wheel ${DESTDIR}${LIBDIR}/debug; \
49         fi
50         if [ ! -d ${DESTDIR}${MANDIR}3 ]; then \
51           ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}3; \
52         fi
53         if [ ! -d ${DESTDIR}${MANDIR}5 ]; then \
54           ${INSTALL} -d -o root -g wheel ${DESTDIR}${MANDIR}5; \
55         fi
56         if [ ! -d ${DESTDIR}${PREFIX}/share/doc/png ]; then \
57           ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/share/doc/png; \
58         fi
60 afterinstall:
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
73 .include <bsd.lib.mk>