]> git.tdb.fi Git - ext/libpng.git/blob - scripts/makefile.freebsd
Import libpng 1.6.39
[ext/libpng.git] / scripts / makefile.freebsd
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
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 LIB=            png
11 SHLIB_VER=      16
12 SHLIB_MAJOR=    ${SHLIB_VER}
13 SHLIB_MINOR=    0
14
15 ZLIBLIB=        /usr/lib
16 ZLIBINC=        /usr/include
17
18 LDADD+=         -lm -lz
19 #LDADD+=        -lm -lz -lssp_nonshared   # for OSVERSION < 800000 ?
20
21 DPADD+=         ${LIBM} ${LIBZ}
22
23 CPPFLAGS+=      -I. -I${ZLIBINC}
24 CFLAGS+=        -Wall -Wextra -Wundef
25 LDFLAGS+=       -L. -L${ZLIBLIB}
26
27 CLEANFILES+=    pngtest pngtest.o pngout.png
28
29 # Pre-built configuration
30 # See scripts/pnglibconf.mak for more options
31 PNGLIBCONF_H_PREBUILT= scripts/pnglibconf.h.prebuilt
32
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
36
37 .c.o:
38         ${CC} -c ${CPPFLAGS} ${CFLAGS} -o $@ $<
39
40 pnglibconf.h:   ${PNGLIBCONF_H_PREBUILT}
41         cp ${PNGLIBCONF_H_PREBUILT} $@
42
43 pngtest:        pngtest.o libpng.a
44         ${CC} ${LDFLAGS} -static -o pngtest pngtest.o -lpng ${LDADD}
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>