1# makefile for libpng 2# Copyright (C) 2020-2022 Cosmin Truta 3# Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson 4# Copyright (C) 1995 Guy Eric Schalnat, Group 42, Inc. 5# 6# This code is released under the libpng license. 7# For conditions of distribution and use, see the disclaimer 8# and license in png.h 9 10SHLIB_MAJOR= 16 11SHLIB_MINOR= 0 12 13LIB= png 14SRCS= png.c pngerror.c pngget.c pngmem.c pngpread.c \ 15 pngread.c pngrio.c pngrtran.c pngrutil.c pngset.c \ 16 pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c 17HDRS= png.h pngconf.h pnglibconf.h 18 19CPPFLAGS+= -I${.CURDIR} 20CFLAGS+= -Wall -Wextra -Wundef 21 22CLEANFILES+= pngtest.o pngtest pnglibconf.h 23 24# Pre-built configuration 25# See scripts/pnglibconf.mak for more options 26PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt 27 28.c.o: 29 ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $< 30 31pnglibconf.h: ${PNGLIBCONF_H_PREBUILT} 32 cp ${PNGLIBCONF_H_PREBUILT} $@ 33 34pngtest.o: pngtest.c 35 ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET} 36 37pngtest: pngtest.o 38 ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm 39 40test: pngtest 41 env LD_LIBRARY_PATH="${.OBJDIR}" ./pngtest 42 43install: 44 @echo "The $@ target is no longer supported by this makefile." 45 @false 46 47.include <bsd.lib.mk> 48