blob: 994608c993a1cc5e8114b296c7e9b50f8fdd5945 [file] [log] [blame]
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -05001# makefile for libpng under FreeBSD
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -05002# Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
Glenn Randers-Pehrson3e61d792009-06-24 09:31:28 -05003#
Glenn Randers-Pehrsonbfbf8652009-06-26 21:46:52 -05004# This code is released under the libpng license.
Glenn Randers-Pehrsonc332bbc2009-06-25 13:43:50 -05005# For conditions of distribution and use, see the disclaimer
Glenn Randers-Pehrson037023b2009-06-24 10:27:36 -05006# and license in png.h
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -05007
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -05008PREFIX?= /usr/local
Glenn Randers-Pehrson3c6df192010-02-08 15:40:53 -06009SHLIB_VER?= 15
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -050010
11LIB= png
12SHLIB_MAJOR= ${SHLIB_VER}
13SHLIB_MINOR= 0
14NOPROFILE= YES
15NOOBJ= YES
Glenn Randers-Pehrson03008a02002-04-27 10:11:25 -050016
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050017# where make install puts libpng.a and png.h
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -050018DESTDIR= ${PREFIX}
19LIBDIR= /lib
Glenn Randers-Pehrson72531442010-04-17 08:17:51 -050020INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -050021INCSDIR= /include/libpng
22INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
23MAN= libpng.3 libpngpf.3 png.5
24MANDIR= /man/man
25SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
Glenn Randers-Pehrson72531442010-04-17 08:17:51 -050026 libpng/pngconf.h ${INCSDIR}/../pngconf.h \
27 libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -050028LDADD+= -lm -lz
29DPADD+= ${LIBM} ${LIBZ}
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050030
Glenn Randers-Pehrson316152f2009-12-04 08:42:32 -060031CFLAGS+= -I.
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050032
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -050033SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
34 pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
Glenn Randers-Pehrson glennrp@comcast.net7ecf7bd2009-05-02 15:36:08 -050035 pngwtran.c pngmem.c pngerror.c pngpread.c
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050036
37pngtest: pngtest.o libpng.a
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -050038 ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -lpng -lz -lm
39
40CLEANFILES= pngtest pngtest.o pngout.png
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050041
42test: pngtest
43 ./pngtest
44
Glenn Randers-Pehrson72531442010-04-17 08:17:51 -050045# see scripts/pnglibconf.mak for more options
Glenn Randers-Pehrson8c667862010-08-24 16:16:35 -050046pnglibconf.h: scripts/pnglibconf.h.prebuilt
47 cp scripts/pnglibconf.h.prebuilt $@
Glenn Randers-Pehrson72531442010-04-17 08:17:51 -050048
Glenn Randers-Pehrson4fb046a2002-04-15 09:25:51 -050049DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO Y2KINFO
50writelock:
51 chmod a-w *.[ch35] $(DOCS) scripts/*
52
Glenn Randers-Pehrsoncfbed9b2002-05-21 18:06:08 -050053.include <bsd.lib.mk>