fukasawa e60969
# makefile for libpng for NetBSD for the standard
fukasawa e60969
# make obj && make depend && make && make test
fukasawa e60969
# make includes && make install
fukasawa e60969
# Copyright (C) 2002 Patrick R.L. Welche
fukasawa e60969
# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
fukasawa e60969
#
fukasawa e60969
# This code is released under the libpng license.
fukasawa e60969
# For conditions of distribution and use, see the disclaimer
fukasawa e60969
# and license in png.h
fukasawa e60969
fukasawa e60969
# You should also run makefile.ne16bsd
fukasawa e60969
fukasawa e60969
LOCALBASE?=/usr/local
fukasawa e60969
LIBDIR=	${LOCALBASE}/lib
fukasawa e60969
MANDIR= ${LOCALBASE}/man
fukasawa e60969
INCSDIR=${LOCALBASE}/include
fukasawa e60969
fukasawa e60969
LIB=	png
fukasawa e60969
SHLIB_MAJOR=	16
fukasawa e60969
SHLIB_MINOR=	1.6.21
fukasawa e60969
SRCS=	png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
fukasawa e60969
	pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
fukasawa e60969
	pngwtran.c pngmem.c pngerror.c pngpread.c
fukasawa e60969
INCS=	png.h pngconf.h pnglibconf.h
fukasawa e60969
MAN=	libpng.3 libpngpf.3 png.5
fukasawa e60969
fukasawa e60969
CPPFLAGS+=-I${.CURDIR}
fukasawa e60969
fukasawa e60969
# Pre-built configuration
fukasawa e60969
# See scripts/pnglibconf.mak for more options
fukasawa e60969
PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
fukasawa e60969
fukasawa e60969
# We should be able to do something like this instead of the manual
fukasawa e60969
# uncommenting, but it core dumps for me at the moment:
fukasawa e60969
# .if ${MACHINE_ARCH} == "i386"
fukasawa e60969
#   MKLINT= no
fukasawa e60969
# .endif
fukasawa e60969
fukasawa e60969
CLEANFILES+=pngtest.o pngtest pnglibconf.h
fukasawa e60969
fukasawa e60969
.c.o:
fukasawa e60969
	$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
fukasawa e60969
fukasawa e60969
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
fukasawa e60969
	cp $(PNGLIBCONF_H_PREBUILT) $@
fukasawa e60969
fukasawa e60969
pngtest.o:	pngtest.c
fukasawa e60969
	${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
fukasawa e60969
fukasawa e60969
pngtest:	pngtest.o libpng.a
fukasawa e60969
	${CC} ${LDFLAGS} ${.ALLSRC} -o${.TARGET} -lz -lm
fukasawa e60969
fukasawa e60969
test:	pngtest
fukasawa e60969
	cd ${.CURDIR} && ${.OBJDIR}/pngtest
fukasawa e60969
fukasawa e60969
.include <bsd.lib.mk></bsd.lib.mk>