]> git.saurik.com Git - wxWidgets.git/blame - src/png/scripts/makefile.openbsd
use our own mbstowcs() and wcstombs() implementations with Metrowerks as MSL CRT...
[wxWidgets.git] / src / png / scripts / makefile.openbsd
CommitLineData
c6b71bff
GD
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
5PREFIX?= /usr/local
6LIBDIR= ${PREFIX}/lib
7MANDIR= ${PREFIX}/man/cat
8
9SHLIB_MAJOR= 0
880c38ba 10SHLIB_MINOR= 1.2.7
c6b71bff
GD
11
12LIB= png
13SRCS= 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
17HDRS= png.h pngconf.h
18
19CFLAGS+= -Wall
20CPPFLAGS+= -I${.CURDIR} -DPNG_NO_ASSEMBLER_CODE -DPNG_USE_PNGGCCRD
21
22NOPROFILE= Yes
23
24CLEANFILES+= pngtest.o pngtest
25
26MAN= libpng.3 libpngpf.3 png.5
27DOCS= ANNOUNCE CHANGES LICENSE README libpng.txt
28
29pngtest.o: pngtest.c
30 ${CC} ${CPPFLAGS} ${CFLAGS} -c ${.ALLSRC} -o ${.TARGET}
31
32pngtest: pngtest.o
33 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
34
35test: pngtest
36 cd ${.OBJDIR} && env \
37 LD_LIBRARY_PATH="${.OBJDIR}" ${.OBJDIR}/pngtest
38
39beforeinstall:
40 if [ ! -d ${DESTDIR}${PREFIX}/include/libpng ]; then \
41 ${INSTALL} -d -o root -g wheel ${DESTDIR}${PREFIX}/include/libpng; \
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
59afterinstall:
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
71
72.include <bsd.lib.mk>