The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 1 | # makefile for libpng for NetBSD for the standard |
| 2 | # make obj && make depend && make && make test |
| 3 | # make includes && make install |
| 4 | # Copyright (C) 2002 Patrick R.L. Welche |
Sireesh Tripurari | b478e66 | 2014-05-09 15:15:10 +0530 | [diff] [blame] | 5 | # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson |
Patrick Scott | 5f6bd84 | 2010-06-28 16:55:16 -0400 | [diff] [blame] | 6 | # |
Patrick Scott | a0bb96c | 2009-07-22 11:50:02 -0400 | [diff] [blame] | 7 | # This code is released under the libpng license. |
| 8 | # For conditions of distribution and use, see the disclaimer |
| 9 | # and license in png.h |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 10 | |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 11 | LOCALBASE?=/usr/local |
| 12 | LIBDIR= ${LOCALBASE}/lib |
| 13 | MANDIR= ${LOCALBASE}/man |
Patrick Scott | 5f6bd84 | 2010-06-28 16:55:16 -0400 | [diff] [blame] | 14 | INCSDIR=${LOCALBASE}/include |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 15 | |
Chris Craik | b50c217 | 2013-07-29 15:28:30 -0700 | [diff] [blame] | 16 | SHLIB_MAJOR= 16 |
xNombre | d07bb0d | 2020-03-10 20:17:12 +0100 | [diff] [blame] | 17 | SHLIB_MINOR= 1.6.38.git |
| 18 | |
| 19 | LIB= png |
| 20 | SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ |
xNombre | 232e9ca | 2020-07-03 22:10:22 +0200 | [diff] [blame] | 21 | pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \ |
| 22 | pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c |
Chris Craik | b50c217 | 2013-07-29 15:28:30 -0700 | [diff] [blame] | 23 | INCS= png.h pngconf.h pnglibconf.h |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 24 | MAN= libpng.3 libpngpf.3 png.5 |
| 25 | |
| 26 | CPPFLAGS+=-I${.CURDIR} |
| 27 | |
Matt Sarett | 9b1fe63 | 2015-11-25 10:21:17 -0500 | [diff] [blame] | 28 | # Pre-built configuration |
| 29 | # See scripts/pnglibconf.mak for more options |
| 30 | PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt |
| 31 | |
Patrick Scott | a0bb96c | 2009-07-22 11:50:02 -0400 | [diff] [blame] | 32 | # We should be able to do something like this instead of the manual |
| 33 | # uncommenting, but it core dumps for me at the moment: |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 34 | # .if ${MACHINE_ARCH} == "i386" |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 35 | # MKLINT= no |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 36 | # .endif |
| 37 | |
Chris Craik | b50c217 | 2013-07-29 15:28:30 -0700 | [diff] [blame] | 38 | CLEANFILES+=pngtest.o pngtest pnglibconf.h |
| 39 | |
Sireesh Tripurari | b478e66 | 2014-05-09 15:15:10 +0530 | [diff] [blame] | 40 | .c.o: |
xNombre | d07bb0d | 2020-03-10 20:17:12 +0100 | [diff] [blame] | 41 | ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< |
Sireesh Tripurari | b478e66 | 2014-05-09 15:15:10 +0530 | [diff] [blame] | 42 | |
xNombre | d07bb0d | 2020-03-10 20:17:12 +0100 | [diff] [blame] | 43 | pnglibconf.h: ${PNGLIBCONF_H_PREBUILT} |
| 44 | cp ${PNGLIBCONF_H_PREBUILT} $@ |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 45 | |
| 46 | pngtest.o: pngtest.c |
| 47 | ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} |
| 48 | |
| 49 | pngtest: pngtest.o libpng.a |
xNombre | d07bb0d | 2020-03-10 20:17:12 +0100 | [diff] [blame] | 50 | ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm |
The Android Open Source Project | 893912b | 2009-03-03 19:30:05 -0800 | [diff] [blame] | 51 | |
| 52 | test: pngtest |
| 53 | cd ${.CURDIR} && ${.OBJDIR}/pngtest |
| 54 | |
| 55 | .include <bsd.lib.mk> |