beta-0.89.2
[luatex.git] / source / libs / libpng / Makefile.am
blob3141c432de14406591fbf336b68dbf6e7bc95bfe
1 ## Proxy Makefile.am to build libpng for TeX Live.
2 ##
3 ##   Copyright (C) 2016 Karl Berry <tex-live@tug.org>
4 ##   Copyright (C) 2009-2015 Peter Breitenlohner <tex-live@tug.org>
5 ##
6 ##   This file is free software; the copyright holder
7 ##   gives unlimited permission to copy and/or distribute it,
8 ##   with or without modifications, as long as this notice is preserved.
9 ##
10 ## We want to re-distribute the whole libpng source tree.
12 EXTRA_DIST = $(LIBPNG_TREE)
14 ## Changes applied to the original source tree
16 EXTRA_DIST += libpng-PATCHES
18 # Files not to be distributed
19 include $(srcdir)/../../am/dist_hook.am
20 NEVER_NAMES += $(NEVER_NAMES_SUB)
22 SUBDIRS = . include
24 AM_CPPFLAGS = -I$(top_srcdir)/$(LIBPNG_TREE) $(ZLIB_INCLUDES) \
25               $(LIBPNG_DEFINES) $(LIBPNG_USER_CPPFLAGS)
26 AM_CFLAGS = $(VISIBILITY_CFLAGS) $(WARNING_CFLAGS)
28 noinst_LIBRARIES=libpng.a
30 nodist_libpng_a_SOURCES = \
31         @LIBPNG_TREE@/png.c \
32         @LIBPNG_TREE@/pngset.c \
33         @LIBPNG_TREE@/pngget.c \
34         @LIBPNG_TREE@/pngrutil.c \
35         @LIBPNG_TREE@/pngtrans.c \
36         @LIBPNG_TREE@/pngwutil.c \
37         @LIBPNG_TREE@/pngread.c \
38         @LIBPNG_TREE@/pngrio.c \
39         @LIBPNG_TREE@/pngwio.c \
40         @LIBPNG_TREE@/pngwrite.c \
41         @LIBPNG_TREE@/pngrtran.c \
42         @LIBPNG_TREE@/pngwtran.c \
43         @LIBPNG_TREE@/pngmem.c \
44         @LIBPNG_TREE@/pngerror.c \
45         @LIBPNG_TREE@/pngpread.c
47 $(libpng_a_OBJECTS): config.force
49 ## Tests
51 TESTS_ENVIRONMENT = LIBPNG_TREE=$(LIBPNG_TREE)
52 if build
53 TESTS = libpng.test
54 check_PROGRAMS = pngtest
55 dist_check_SCRIPTS = libpng.test
56 endif build
57 libpng.log: pngtest$(EXEEXT)
59 CLEANFILES = pngout.png
61 nodist_pngtest_SOURCES = @LIBPNG_TREE@/pngtest.c
62 pngtest_LDADD = libpng.a $(ZLIB_LIBS)
64 ## Rebuild zlib
65 @ZLIB_RULE@
67 # Reconfig
68 reconfig_prereq = $(ZLIB_DEPEND)
69 DISTCLEANFILES =
71 include $(srcdir)/../../am/reconfig.am
73 # Rebuild
74 rebuild_prereq =
75 rebuild_target = all
77 include $(srcdir)/../../am/rebuild.am