blob: ccacacf1b70a8f63559e82e6dbdeff45b8972e3a [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
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -05004# Copyright (C) 2006 Glenn Randers-Pehrson
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -05005# Copyright (C) 2002 Patrick R.L. Welche
6# For conditions of distribution and use, see copyright notice in png.h
7
8# You should also run makefile.netbsd
9
10LOCALBASE?=/usr/local
11LIBDIR= ${LOCALBASE}/lib
12MANDIR= ${LOCALBASE}/man
Glenn Randers-Pehrson17218292006-04-20 07:20:46 -050013INCSDIR=${LOCALBASE}/include/libpng14
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050014
15LIB= png12
16SHLIB_MAJOR= 0
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050017SHLIB_MINOR= 1.4.0beta4
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050018SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
19 pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
20 pngwtran.c pngmem.c pngerror.c pngpread.c
21INCS= png.h pngconf.h
22MAN= libpng.3 libpngpf.3 png.5
23
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050024CPPFLAGS+=-I${.CURDIR}
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050025
26CLEANFILES+=pngtest.o pngtest
27
Glenn Randers-Pehrsonb3870ab2006-05-11 09:43:09 -050028pngconf.h.in:
29 cat pngconf.h > pngconf.h.in
30
31pngconf.h: pngconf.h.in
32 sed "/Makefile-supplied defines go here:/q" pngconf.h.in > pngconf.h
33
34 /* if you don't want to use the intel MMX code, uncomment this */
35 # echo "#define PNG_NO_MMX_CODE" >> pngconf.h
36
37 /* if you don't need thread safety you can uncomment this */
38 # echo "#define PNG_THREAD_UNSAFE_OK" >> pngconf.h
39
40# We should be able to do something like this instead of the manual
41# uncommenting, but it core dumps for me at the moment:
42# .if ${MACHINE_ARCH} == "i386"
43# echo "#define PNG_THREAD_UNSAFE_OK" >> pngconf.h
44# MKLINT= no
45# .else
46# echo "#define PNG_NO_MMX_CODE" >> pngconf.h
47# .endif
48
49 sed "1,/Makefile-supplied defines go here:/d" pngconf.h.in >> pngconf.h
50
51
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050052pngtest.o: pngtest.c
53 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
54
55pngtest: pngtest.o libpng.a
56 ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
57
58test: pngtest
59 cd ${.CURDIR} && ${.OBJDIR}/pngtest
60
61.include <bsd.lib.mk>