blob: d6be1dee855e6b40e5cee1537cc2b6ebc2c9394f [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
5# For conditions of distribution and use, see copyright notice in png.h
6
7# You should also run makefile.netbsd
8
9LOCALBASE?=/usr/local
10LIBDIR= ${LOCALBASE}/lib
11MANDIR= ${LOCALBASE}/man
Glenn Randers-Pehrson17218292006-04-20 07:20:46 -050012INCSDIR=${LOCALBASE}/include/libpng14
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050013
14LIB= png12
15SHLIB_MAJOR= 0
Glenn Randers-Pehrson17218292006-04-20 07:20:46 -050016SHLIB_MINOR= 1.4.0beta1
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050017SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
18 pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
19 pngwtran.c pngmem.c pngerror.c pngpread.c
20INCS= png.h pngconf.h
21MAN= libpng.3 libpngpf.3 png.5
22
23CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
24
25# something like this for mmx assembler, but it core dumps for me at the moment
26# .if ${MACHINE_ARCH} == "i386"
27# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
28# MKLINT= no
29# .else
Glenn Randers-Pehrson17218292006-04-20 07:20:46 -050030 CPPFLAGS+=-DPNG_NO_MMX_CODE
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050031# .endif
32
33CLEANFILES+=pngtest.o pngtest
34
35pngtest.o: pngtest.c
36 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
37
38pngtest: pngtest.o libpng.a
39 ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
40
41test: pngtest
42 cd ${.CURDIR} && ${.OBJDIR}/pngtest
43
44.include <bsd.lib.mk>