blob: 3bfd3f81c0efb426cdbff1c5614dc5789d780078 [file] [log] [blame]
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -05001# 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
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -05005# Copyright (C) 2007, 2009 Glenn Randers-Pehrson
Glenn Randers-Pehrson3e61d792009-06-24 09:31:28 -05006#
Glenn Randers-Pehrsonbfbf8652009-06-26 21:46:52 -05007# This code is released under the libpng license.
Glenn Randers-Pehrsonc332bbc2009-06-25 13:43:50 -05008# For conditions of distribution and use, see the disclaimer
Glenn Randers-Pehrson037023b2009-06-24 10:27:36 -05009# and license in png.h
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050010
11# You should also run makefile.netbsd
12
13LOCALBASE?=/usr/local
14LIBDIR= ${LOCALBASE}/lib
15MANDIR= ${LOCALBASE}/man
Glenn Randers-Pehrson7455cbf2011-11-24 14:40:36 -060016INCSDIR=${LOCALBASE}/include/libpng16
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050017
Glenn Randers-Pehrson7455cbf2011-11-24 14:40:36 -060018LIB= png16
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050019SHLIB_MAJOR= 0
Glenn Randers-Pehrsonc4f94cb2011-12-15 13:05:55 -060020SHLIB_MINOR= 1.6.0beta02
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -050021SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
22 pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
23 pngwtran.c pngmem.c pngerror.c pngpread.c
Glenn Randers-Pehrson0b3634b2011-12-17 09:57:00 -060024INCS= png.h pngconf.h pnglibconf.h
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050025MAN= libpng.3 libpngpf.3 png.5
26
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050027CPPFLAGS+=-I${.CURDIR}
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050028
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050029# We should be able to do something like this instead of the manual
30# uncommenting, but it core dumps for me at the moment:
31# .if ${MACHINE_ARCH} == "i386"
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050032# MKLINT= no
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050033# .endif
34
Glenn Randers-Pehrson72531442010-04-17 08:17:51 -050035CLEANFILES+=pngtest.o pngtest pnglibconf.h
36
37# see scripts/pnglibconf.mak for more options
Glenn Randers-Pehrson8c667862010-08-24 16:16:35 -050038pnglibconf.h: scripts/pnglibconf.h.prebuilt
39 cp scripts/pnglibconf.h.prebuilt $@
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -050040
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050041pngtest.o: pngtest.c
42 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
43
44pngtest: pngtest.o libpng.a
45 ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
46
47test: pngtest
48 cd ${.CURDIR} && ${.OBJDIR}/pngtest
49
50.include <bsd.lib.mk>