|
fukasawa |
e60969 |
# makefile for libpng under FreeBSD
|
|
fukasawa |
e60969 |
# Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
|
|
fukasawa |
e60969 |
# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
|
|
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 |
PREFIX?= /usr/local
|
|
fukasawa |
e60969 |
SHLIB_VER?= 16
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
LIB= png
|
|
fukasawa |
e60969 |
SHLIB_MAJOR= ${SHLIB_VER}
|
|
fukasawa |
e60969 |
SHLIB_MINOR= 0
|
|
fukasawa |
e60969 |
NO_PROFILE= YES
|
|
fukasawa |
e60969 |
NO_OBJ= YES
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# where make install puts libpng.a and png.h
|
|
fukasawa |
e60969 |
DESTDIR= ${PREFIX}
|
|
fukasawa |
e60969 |
LIBDIR= /lib
|
|
fukasawa |
e60969 |
INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
|
fukasawa |
e60969 |
INCSDIR= /include/libpng
|
|
fukasawa |
e60969 |
INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
|
|
fukasawa |
e60969 |
MAN= libpng.3 libpngpf.3 png.5
|
|
fukasawa |
e60969 |
MANDIR= /man/man
|
|
fukasawa |
e60969 |
SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
|
|
fukasawa |
e60969 |
libpng/pngconf.h ${INCSDIR}/../pngconf.h \
|
|
fukasawa |
e60969 |
libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
# where make install finds libz.a and zlib.h
|
|
fukasawa |
e60969 |
ZLIBLIB= /usr/lib
|
|
fukasawa |
e60969 |
ZLIBINC= /usr/include
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
LDADD+= -lm -lz
|
|
fukasawa |
e60969 |
#LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ?
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
DPADD+= ${LIBM} ${LIBZ}
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
CPPFLAGS+= -I. -I${ZLIBINC}
|
|
fukasawa |
e60969 |
CFLAGS+= -W -Wall
|
|
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 |
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 |
|
|
fukasawa |
e60969 |
.c.o:
|
|
fukasawa |
e60969 |
$(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pngtest: pngtest.o libpng.a
|
|
fukasawa |
e60969 |
${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
|
|
fukasawa |
e60969 |
-lpng ${LDADD}
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
CLEANFILES= pngtest pngtest.o pngout.png
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
test: pngtest
|
|
fukasawa |
e60969 |
./pngtest
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
|
|
fukasawa |
e60969 |
cp $(PNGLIBCONF_H_PREBUILT) $@
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
|
|
fukasawa |
e60969 |
writelock:
|
|
fukasawa |
e60969 |
chmod a-w *.[ch35] $(DOCS) scripts/*
|
|
fukasawa |
e60969 |
|
|
fukasawa |
e60969 |
.include <bsd.lib.mk></bsd.lib.mk>
|