Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 1 | # makefile for libpng under FreeBSD |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 2 | # Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov |
Glenn Randers-Pehrson | 3e61d79 | 2009-06-24 09:31:28 -0500 | [diff] [blame] | 3 | # |
Glenn Randers-Pehrson | bfbf865 | 2009-06-26 21:46:52 -0500 | [diff] [blame] | 4 | # This code is released under the libpng license. |
Glenn Randers-Pehrson | c332bbc | 2009-06-25 13:43:50 -0500 | [diff] [blame] | 5 | # For conditions of distribution and use, see the disclaimer |
Glenn Randers-Pehrson | 037023b | 2009-06-24 10:27:36 -0500 | [diff] [blame] | 6 | # and license in png.h |
Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 7 | |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 8 | PREFIX?= /usr/local |
Glenn Randers-Pehrson | 3c6df19 | 2010-02-08 15:40:53 -0600 | [diff] [blame] | 9 | SHLIB_VER?= 15 |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 10 | |
| 11 | LIB= png |
| 12 | SHLIB_MAJOR= ${SHLIB_VER} |
| 13 | SHLIB_MINOR= 0 |
| 14 | NOPROFILE= YES |
| 15 | NOOBJ= YES |
Glenn Randers-Pehrson | 03008a0 | 2002-04-27 10:11:25 -0500 | [diff] [blame] | 16 | |
Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 17 | # where make install puts libpng.a and png.h |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 18 | DESTDIR= ${PREFIX} |
| 19 | LIBDIR= /lib |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 20 | INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 21 | INCSDIR= /include/libpng |
| 22 | INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk |
| 23 | MAN= libpng.3 libpngpf.3 png.5 |
| 24 | MANDIR= /man/man |
| 25 | SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \ |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 26 | libpng/pngconf.h ${INCSDIR}/../pngconf.h \ |
| 27 | libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 28 | LDADD+= -lm -lz |
| 29 | DPADD+= ${LIBM} ${LIBZ} |
Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 30 | |
Glenn Randers-Pehrson | 316152f | 2009-12-04 08:42:32 -0600 | [diff] [blame] | 31 | CFLAGS+= -I. |
Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 32 | |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 33 | SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \ |
| 34 | pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \ |
Glenn Randers-Pehrson glennrp@comcast.net | 7ecf7bd | 2009-05-02 15:36:08 -0500 | [diff] [blame] | 35 | pngwtran.c pngmem.c pngerror.c pngpread.c |
Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 36 | |
| 37 | pngtest: pngtest.o libpng.a |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 38 | ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm |
| 39 | |
| 40 | CLEANFILES= pngtest pngtest.o pngout.png |
Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 41 | |
| 42 | test: pngtest |
| 43 | ./pngtest |
| 44 | |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 45 | # see scripts/pnglibconf.mak for more options |
Glenn Randers-Pehrson | 8c66786 | 2010-08-24 16:16:35 -0500 | [diff] [blame] | 46 | pnglibconf.h: scripts/pnglibconf.h.prebuilt |
| 47 | cp scripts/pnglibconf.h.prebuilt $@ |
Glenn Randers-Pehrson | 7253144 | 2010-04-17 08:17:51 -0500 | [diff] [blame] | 48 | |
Glenn Randers-Pehrson | 4fb046a | 2002-04-15 09:25:51 -0500 | [diff] [blame] | 49 | DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO |
| 50 | writelock: |
| 51 | chmod a-w *.[ch35] $(DOCS) scripts/* |
| 52 | |
Glenn Randers-Pehrson | cfbed9b | 2002-05-21 18:06:08 -0500 | [diff] [blame] | 53 | .include <bsd.lib.mk> |