blob: 48c3452465093a810e7f31c0b3ff39bdcc96b0af [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-Pehrson5af03072014-01-20 12:36:30 -06005# Copyright (C) 2007, 2009, 2014 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-Pehrson23646312014-03-17 11:58:34 -050020SHLIB_MINOR= 1.6.11beta02
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
Glenn Randers-Pehrson42503282014-01-12 10:44:01 -060037.c.o:
38 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
39
Cosmin Truta9ab7b4c2014-03-22 13:13:11 -050040pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
Cosmin Truta82200da2014-03-22 09:29:59 -050041 cp $< $@
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -050042
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050043pngtest.o: pngtest.c
44 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
45
46pngtest: pngtest.o libpng.a
47 ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
48
49test: pngtest
50 cd ${.CURDIR} && ${.OBJDIR}/pngtest
51
52.include <bsd.lib.mk>