]> git.tdb.fi Git - ext/libpng.git/blob - scripts/makefile.netbsd
Import libpng 1.6.39
[ext/libpng.git] / scripts / makefile.netbsd
1 # makefile for libpng on NetBSD
2 # Copyright (C) 2020-2022 Cosmin Truta
3 # Copyright (C) 2007-2009, 2014 Glenn Randers-Pehrson
4 # Copyright (C) 2002 Patrick R.L. Welche
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 INCS=   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 # We should be able to do something like this instead of the manual
29 # uncommenting, but it core dumps for me at the moment:
30 # .if ${MACHINE_ARCH} == "i386"
31 #   MKLINT= no
32 # .endif
33
34 .c.o:
35         ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
36
37 pnglibconf.h:   ${PNGLIBCONF_H_PREBUILT}
38         cp ${PNGLIBCONF_H_PREBUILT} $@
39
40 pngtest.o:      pngtest.c
41         ${CC} -c ${CPPFLAGS} ${CFLAGS} ${.ALLSRC} -o ${.TARGET}
42
43 pngtest:        pngtest.o libpng.a
44         ${CC} ${LDFLAGS} ${.ALLSRC} -o ${.TARGET} -lz -lm
45
46 test:   pngtest
47         ./pngtest
48
49 install:
50         @echo "The $@ target is no longer supported by this makefile."
51         @false
52
53 .include <bsd.lib.mk>