blob: 04cf5a906fe4a703185ede27d4882989fe27b49b [file] [log] [blame]
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -05001# makefile for libpng for NetBSD for the standard
2# make obj && make depend && make && make test
3# make includes && make install
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -05004# Copyright (C) 2002 Patrick R.L. Welche
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -05005# For conditions of distribution and use, see copyright notice in png.h
6
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -05007# You should also run makefile.ne0bsd
8
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -05009LOCALBASE?=/usr/local
10LIBDIR= ${LOCALBASE}/lib
11MANDIR= ${LOCALBASE}/man
Glenn Randers-Pehrsonfcbd7872002-04-07 16:35:38 -050012INCSDIR=${LOCALBASE}/include/libpng
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050013
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050014LIB= png
15SHLIB_MAJOR= 3
Glenn Randers-Pehrson94d93622004-11-01 22:38:54 -060016SHLIB_MINOR= 1.2.8beta2
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050017SRCS= pnggccrd.c png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050018 pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
19 pngwtran.c pngmem.c pngerror.c pngpread.c
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050020INCS= png.h pngconf.h
21MAN= libpng.3 libpngpf.3 png.5
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050022
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050023CPPFLAGS+=-I${.CURDIR} -DPNG_USE_PNGGCCRD
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050024
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050025# something like this for mmx assembler, but it core dumps for me at the moment
26# .if ${MACHINE_ARCH} == "i386"
Glenn Randers-Pehrson5a0be342001-10-18 20:55:13 -050027# CPPFLAGS+=-DPNG_THREAD_UNSAFE_OK
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050028# MKLINT= no
29# .else
Glenn Randers-Pehrson5a0be342001-10-18 20:55:13 -050030 CPPFLAGS+=-DPNG_NO_ASSEMBLER_CODE
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050031# .endif
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050032
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050033CLEANFILES+=pngtest.o pngtest
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050034
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050035pngtest.o: pngtest.c
36 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050037
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050038pngtest: pngtest.o libpng.a
39 ${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050040
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050041test: pngtest
42 cd ${.CURDIR} && ${.OBJDIR}/pngtest
Glenn Randers-Pehrson82ae3832001-04-20 10:32:10 -050043
Glenn Randers-Pehrson32835392001-04-27 08:29:32 -050044.include <bsd.lib.mk>