]> git.tdb.fi Git - ext/libpng.git/blob - scripts/makefile.openbsd
Import libpng 1.6.39
[ext/libpng.git] / scripts / makefile.openbsd
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
10 SHLIB_MAJOR=    16
11 SHLIB_MINOR=    0
12
13 LIB=    png
14 SRCS=   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
17 HDRS=   png.h pngconf.h pnglibconf.h
18
19 CPPFLAGS+=      -I${.CURDIR}
20 CFLAGS+=        -Wall -Wextra -Wundef
21
22 CLEANFILES+=    pngtest.o pngtest pnglibconf.h
23
24 # Pre-built configuration
25 # See scripts/pnglibconf.mak for more options
26 PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
27
28 .c.o:
29         ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
30
31 pnglibconf.h:   ${PNGLIBCONF_H_PREBUILT}
32         cp ${PNGLIBCONF_H_PREBUILT} $@
33
34 pngtest.o:      pngtest.c
35         ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
36
37 pngtest:        pngtest.o
38         ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -L${.OBJDIR} -lpng -lz -lm
39
40 test:   pngtest
41         env LD_LIBRARY_PATH="${.OBJDIR}" ./pngtest
42
43 install:
44         @echo "The $@ target is no longer supported by this makefile."
45         @false
46
47 .include <bsd.lib.mk>