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
|
---|
5 | # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
|
---|
6 | #
|
---|
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
|
---|
10 |
|
---|
11 | LOCALBASE?=/usr/local
|
---|
12 | LIBDIR= ${LOCALBASE}/lib
|
---|
13 | MANDIR= ${LOCALBASE}/man
|
---|
14 | INCSDIR=${LOCALBASE}/include
|
---|
15 |
|
---|
16 | SHLIB_MAJOR= 16
|
---|
17 | SHLIB_MINOR= 1.6.37
|
---|
18 |
|
---|
19 | LIB= png
|
---|
20 | SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
|
---|
21 | pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c pngtrans.c \
|
---|
22 | pngwio.c pngwrite.c pngwtran.c pngwutil.c
|
---|
23 | INCS= png.h pngconf.h pnglibconf.h
|
---|
24 | MAN= libpng.3 libpngpf.3 png.5
|
---|
25 |
|
---|
26 | CPPFLAGS+=-I${.CURDIR}
|
---|
27 |
|
---|
28 | # Pre-built configuration
|
---|
29 | # See scripts/pnglibconf.mak for more options
|
---|
30 | PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
|
---|
31 |
|
---|
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:
|
---|
34 | # .if ${MACHINE_ARCH} == "i386"
|
---|
35 | # MKLINT= no
|
---|
36 | # .endif
|
---|
37 |
|
---|
38 | CLEANFILES+=pngtest.o pngtest pnglibconf.h
|
---|
39 |
|
---|
40 | .c.o:
|
---|
41 | ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
|
---|
42 |
|
---|
43 | pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
|
---|
44 | cp ${PNGLIBCONF_H_PREBUILT} $@
|
---|
45 |
|
---|
46 | pngtest.o: pngtest.c
|
---|
47 | ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
|
---|
48 |
|
---|
49 | pngtest: pngtest.o libpng.a
|
---|
50 | ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm
|
---|
51 |
|
---|
52 | test: pngtest
|
---|
53 | cd ${.CURDIR} && ${.OBJDIR}/pngtest
|
---|
54 |
|
---|
55 | .include <bsd.lib.mk>
|
---|