1 # makefile for libpng under FreeBSD
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2014 Glenn Randers-Pehrson and Andrey A. Chernov
4 # Copyright (C) 2002, 2007, 2009 Glenn Randers-Pehrson and Andrey A. Chernov
6 # This code is released under the libpng license.
7 # For conditions of distribution and use, see the disclaimer
12 SHLIB_MAJOR= ${SHLIB_VER}
19 #LDADD+= -lm -lz -lssp_nonshared # for OSVERSION < 800000 ?
21 DPADD+= ${LIBM} ${LIBZ}
23 CPPFLAGS+= -I. -I${ZLIBINC}
24 CFLAGS+= -Wall -Wextra -Wundef
25 LDFLAGS+= -L. -L${ZLIBLIB}
27 CLEANFILES+= pngtest pngtest.o pngout.png
29 # Pre-built configuration
30 # See scripts/pnglibconf.mak for more options
31 PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
33 SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \
34 pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \
35 pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c
38 ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
40 pnglibconf.h: ${PNGLIBCONF_H_PREBUILT}
41 cp ${PNGLIBCONF_H_PREBUILT} $@
43 pngtest: pngtest.o libpng.a
44 ${CC} ${LDFLAGS} -static -o pngtest pngtest.o -lpng ${LDADD}
50 @echo "The $@ target is no longer supported by this makefile."