blob: b203eb946870261058ff50555136424af54a4dfa [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-Pehrsonedb772f2014-10-22 19:28:06 -050020SHLIB_MINOR= 1.6.14
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-Pehrson247d2622014-03-22 13:40:25 -050029# Pre-built configuration
30# See scripts/pnglibconf.mak for more options
31PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
32
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050033# We should be able to do something like this instead of the manual
34# uncommenting, but it core dumps for me at the moment:
35# .if ${MACHINE_ARCH} == "i386"
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050036# MKLINT= no
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050037# .endif
38
Glenn Randers-Pehrson72531442010-04-17 08:17:51 -050039CLEANFILES+=pngtest.o pngtest pnglibconf.h
40
Glenn Randers-Pehrson42503282014-01-12 10:44:01 -060041.c.o:
42 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
43
Cosmin Truta9ab7b4c2014-03-22 13:13:11 -050044pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
Glenn Randers-Pehrsonff649a02014-08-07 19:51:35 -050045 cp $(PNGLIBCONF_H_PREBUILT) $@
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -050046
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050047pngtest.o: pngtest.c
48 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
49
50pngtest: pngtest.o libpng.a
51 ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
52
53test: pngtest
54 cd ${.CURDIR} && ${.OBJDIR}/pngtest
55
56.include <bsd.lib.mk>