1 # makefile for libpng under FreeBSD
2 # Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
3 # Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
5 # This code is released under the libpng license.
6 # For conditions of distribution and use, see the disclaimer
13 SHLIB_MAJOR= ${SHLIB_VER}
18 # where make install puts libpng.a and png.h
21 INCS= png.h pngconf.h pnglibconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
22 INCSDIR= /include/libpng
23 INCDIR= ${INCSDIR} # for 4.x bsd.lib.mk
24 MAN= libpng.3 libpngpf.3 png.5
26 SYMLINKS= libpng/png.h ${INCSDIR}/../png.h \
27 libpng/pngconf.h ${INCSDIR}/../pngconf.h \
28 libpng/pnglibconf.h ${INCSDIR}/../pnglibconf.h
30 # where make install finds libz.a and zlib.h
35 #LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ?
37 DPADD+= ${LIBM} ${LIBZ}
39 CPPFLAGS+= -I. -I${ZLIBINC}
42 # Pre-built configuration
43 # See scripts/pnglibconf.mak for more options
44 PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
46 SRCS= png.c pngset.c pngget.c pngrutil.c pngtrans.c pngwutil.c \
47 pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
48 pngwtran.c pngmem.c pngerror.c pngpread.c
51 $(CC) -c $(CPPFLAGS) $(CFLAGS) -o $@ $<
53 pngtest: pngtest.o libpng.a
54 ${CC} ${CFLAGS} -L. -static -o pngtest pngtest.o -L${ZLIBLIB} \
57 CLEANFILES= pngtest pngtest.o pngout.png
62 pnglibconf.h: $(PNGLIBCONF_H_PREBUILT)
63 cp $(PNGLIBCONF_H_PREBUILT) $@
65 DOCS = ANNOUNCE CHANGES INSTALL KNOWNBUG LICENSE README TODO
67 chmod a-w *.[ch35] $(DOCS) scripts/*