]> git.saurik.com Git - wxWidgets.git/blob - src/png/scripts/makefile.openbsd
Fix caret position when deleting last character
[wxWidgets.git] / src / png / scripts / makefile.openbsd
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
5
6 PREFIX?= /usr/local
7 LIBDIR= ${PREFIX}/lib
8 MANDIR= ${PREFIX}/man/cat
9
10 SHLIB_MAJOR= 0
11 SHLIB_MINOR= 1.2.20
12
13 LIB= png
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
17
18 HDRS= png.h pngconf.h
19
20 CFLAGS+= -Wall
21 CPPFLAGS+= -I${.CURDIR} -DPNG_NO_MMX_CODE
22
23 NOPROFILE= Yes
24
25 CLEANFILES+= pngtest.o pngtest
26
27 MAN= libpng.3 libpngpf.3 png.5
28 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO libpng.txt
29
30 pngtest.o: pngtest.c
31 ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
32
33 pngtest: pngtest.o
34 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
35
36 test: pngtest
37 cd ${.OBJDIR} && env \
38 LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
39
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
59
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
72
73 .include <bsd.lib.mk>