1 | # Makefile.am, the source file for Makefile.in (and hence Makefile), is
|
---|
2 | #
|
---|
3 | # Copyright (c) 2018-2024 Cosmin Truta
|
---|
4 | # Copyright (c) 2004-2016 Glenn Randers-Pehrson
|
---|
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 | PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
|
---|
11 |
|
---|
12 | ACLOCAL_AMFLAGS = -I scripts/autoconf
|
---|
13 |
|
---|
14 | # test programs - run on make check, make distcheck
|
---|
15 | if ENABLE_TESTS
|
---|
16 | check_PROGRAMS= pngtest pngunknown pngstest pngvalid pngimage pngcp
|
---|
17 | if HAVE_CLOCK_GETTIME
|
---|
18 | check_PROGRAMS += timepng
|
---|
19 | endif
|
---|
20 | else
|
---|
21 | check_PROGRAMS=
|
---|
22 | endif
|
---|
23 |
|
---|
24 | # Utilities - installed
|
---|
25 | if ENABLE_TOOLS
|
---|
26 | bin_PROGRAMS= pngfix png-fix-itxt
|
---|
27 | else
|
---|
28 | bin_PROGRAMS=
|
---|
29 | endif
|
---|
30 |
|
---|
31 | # This ensures that pnglibconf.h gets built at the start of 'make all' or
|
---|
32 | # 'make check', but it does not add dependencies to the individual programs,
|
---|
33 | # this is done below.
|
---|
34 | #
|
---|
35 | # IMPORTANT: always add the object modules of new programs to the list below
|
---|
36 | # because otherwise the sequence 'configure; make new-program' will *sometimes*
|
---|
37 | # result in the installed (system) pnglibconf.h being used and the result is
|
---|
38 | # always wrong and always very confusing.
|
---|
39 | BUILT_SOURCES = pnglibconf.h
|
---|
40 |
|
---|
41 | if ENABLE_TESTS
|
---|
42 | pngtest_SOURCES = pngtest.c
|
---|
43 | pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
44 |
|
---|
45 | pngvalid_SOURCES = contrib/libtests/pngvalid.c
|
---|
46 | pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
47 |
|
---|
48 | pngstest_SOURCES = contrib/libtests/pngstest.c
|
---|
49 | pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
50 |
|
---|
51 | pngunknown_SOURCES = contrib/libtests/pngunknown.c
|
---|
52 | pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
53 |
|
---|
54 | pngimage_SOURCES = contrib/libtests/pngimage.c
|
---|
55 | pngimage_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
56 |
|
---|
57 | timepng_SOURCES = contrib/libtests/timepng.c
|
---|
58 | timepng_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
59 |
|
---|
60 | pngcp_SOURCES = contrib/tools/pngcp.c
|
---|
61 | pngcp_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
62 | endif
|
---|
63 |
|
---|
64 | if ENABLE_TOOLS
|
---|
65 | pngfix_SOURCES = contrib/tools/pngfix.c
|
---|
66 | pngfix_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
67 |
|
---|
68 | png_fix_itxt_SOURCES = contrib/tools/png-fix-itxt.c
|
---|
69 | endif
|
---|
70 |
|
---|
71 | # Generally these are single line shell scripts to run a test with a particular
|
---|
72 | # set of parameters:
|
---|
73 | if ENABLE_TESTS
|
---|
74 | TESTS =\
|
---|
75 | tests/pngtest-all\
|
---|
76 | tests/pngvalid-gamma-16-to-8 tests/pngvalid-gamma-alpha-mode\
|
---|
77 | tests/pngvalid-gamma-background tests/pngvalid-gamma-expand16-alpha-mode\
|
---|
78 | tests/pngvalid-gamma-expand16-background\
|
---|
79 | tests/pngvalid-gamma-expand16-transform tests/pngvalid-gamma-sbit\
|
---|
80 | tests/pngvalid-gamma-threshold tests/pngvalid-gamma-transform\
|
---|
81 | tests/pngvalid-progressive-size\
|
---|
82 | tests/pngvalid-progressive-interlace-standard\
|
---|
83 | tests/pngvalid-transform\
|
---|
84 | tests/pngvalid-progressive-standard tests/pngvalid-standard\
|
---|
85 | tests/pngstest-1.8 tests/pngstest-1.8-alpha tests/pngstest-linear\
|
---|
86 | tests/pngstest-linear-alpha tests/pngstest-none tests/pngstest-none-alpha\
|
---|
87 | tests/pngstest-sRGB tests/pngstest-sRGB-alpha tests/pngunknown-IDAT\
|
---|
88 | tests/pngunknown-discard tests/pngunknown-if-safe tests/pngunknown-sAPI\
|
---|
89 | tests/pngunknown-sTER tests/pngunknown-save tests/pngunknown-vpAg\
|
---|
90 | tests/pngimage-quick tests/pngimage-full
|
---|
91 | endif
|
---|
92 |
|
---|
93 | # man pages
|
---|
94 | dist_man_MANS= libpng.3 libpngpf.3 png.5
|
---|
95 |
|
---|
96 | # generate the -config scripts if required
|
---|
97 | binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
|
---|
98 | EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
|
---|
99 | bin_SCRIPTS= @binconfigs@
|
---|
100 |
|
---|
101 | # rules to build libpng, only build the old library on request
|
---|
102 | lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
|
---|
103 | # EXTRA_LTLIBRARIES= libpng.la
|
---|
104 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
|
---|
105 | pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\
|
---|
106 | pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
|
---|
107 | png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa
|
---|
108 |
|
---|
109 | if PNG_ARM_NEON
|
---|
110 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/arm_init.c\
|
---|
111 | arm/filter_neon.S arm/filter_neon_intrinsics.c \
|
---|
112 | arm/palette_neon_intrinsics.c
|
---|
113 | endif
|
---|
114 |
|
---|
115 | if PNG_MIPS_MSA
|
---|
116 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c\
|
---|
117 | mips/filter_msa_intrinsics.c
|
---|
118 | endif
|
---|
119 |
|
---|
120 | if PNG_MIPS_MMI
|
---|
121 | if !PNG_MIPS_MSA
|
---|
122 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/mips_init.c
|
---|
123 | endif
|
---|
124 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += mips/filter_mmi_inline_assembly.c
|
---|
125 | endif
|
---|
126 |
|
---|
127 | if PNG_INTEL_SSE
|
---|
128 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += intel/intel_init.c\
|
---|
129 | intel/filter_sse2_intrinsics.c
|
---|
130 | endif
|
---|
131 |
|
---|
132 | if PNG_POWERPC_VSX
|
---|
133 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += powerpc/powerpc_init.c\
|
---|
134 | powerpc/filter_vsx_intrinsics.c
|
---|
135 | endif
|
---|
136 |
|
---|
137 | if PNG_LOONGARCH_LSX
|
---|
138 | noinst_LTLIBRARIES= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
---|
139 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_SOURCES = loongarch/loongarch_lsx_init.c\
|
---|
140 | loongarch/filter_lsx_intrinsics.c
|
---|
141 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx_la_CFLAGS = -mlsx
|
---|
142 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LIBADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
---|
143 | # libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
---|
144 | endif
|
---|
145 |
|
---|
146 | nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
|
---|
147 |
|
---|
148 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
|
---|
149 | -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
|
---|
150 |
|
---|
151 | if HAVE_LD_VERSION_SCRIPT
|
---|
152 | # Versioned symbols and restricted exports
|
---|
153 | if HAVE_SOLARIS_LD
|
---|
154 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,-M -Wl,libpng.vers
|
---|
155 | else
|
---|
156 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers
|
---|
157 | endif
|
---|
158 |
|
---|
159 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
|
---|
160 | else
|
---|
161 | # Only restricted exports when possible
|
---|
162 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym
|
---|
163 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
---|
164 | endif
|
---|
165 |
|
---|
166 | if PNG_LOONGARCH_LSX
|
---|
167 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES += libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@lsx.la
|
---|
168 | endif
|
---|
169 |
|
---|
170 | #distribute headers in /usr/include/libpng/*
|
---|
171 | pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
|
---|
172 | pkginclude_HEADERS= png.h pngconf.h
|
---|
173 | nodist_pkginclude_HEADERS= pnglibconf.h
|
---|
174 |
|
---|
175 | # pkg-config stuff, note that libpng.pc is always required in order
|
---|
176 | # to get the correct library
|
---|
177 | pkgconfigdir = @pkgconfigdir@
|
---|
178 | pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
---|
179 |
|
---|
180 | # Extra source distribution files, '${srcdir}' is used below to stop build files
|
---|
181 | # from those directories being included. This only works if the configure is
|
---|
182 | # not done in the source directory!
|
---|
183 | EXTRA_DIST= \
|
---|
184 | ANNOUNCE AUTHORS CHANGES INSTALL LICENSE README TODO TRADEMARK \
|
---|
185 | pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
|
---|
186 | ${srcdir}/ci ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
|
---|
187 | $(TESTS) $(XFAIL_TESTS) tests/pngstest \
|
---|
188 | CMakeLists.txt example.c libpng-manual.txt
|
---|
189 |
|
---|
190 | SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk
|
---|
191 |
|
---|
192 | CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
---|
193 | libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
|
---|
194 | check.new pnglibconf.h pngprefix.h symbols.new pngtest-log.txt \
|
---|
195 | pnglibconf.out pnglibconf.c pnglibconf.pre pnglibconf.dfn \
|
---|
196 | $(SCRIPT_CLEANFILES)
|
---|
197 |
|
---|
198 | MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
|
---|
199 | config.sub configure depcomp install-sh ltmain.sh missing
|
---|
200 |
|
---|
201 | # PNG_COPTS give extra options for the C compiler to be used on all compilation
|
---|
202 | # steps (unless targe_CFLAGS is specified; that will take precedence over
|
---|
203 | # AM_CFLAGS)
|
---|
204 | PNG_COPTS = @PNG_COPTS@
|
---|
205 | AM_CFLAGS = ${PNG_COPTS}
|
---|
206 |
|
---|
207 | # DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
|
---|
208 | # other operating systems (NeXT?) the C preprocessor selected by configure
|
---|
209 | # checks input tokens for validity - effectively it performs part of the ANSI-C
|
---|
210 | # parsing - and therefore fails with the .df files. configure.ac has special
|
---|
211 | # checks for this and sets DFNCPP appropriately.
|
---|
212 | DFNCPP = @DFNCPP@
|
---|
213 |
|
---|
214 | SUFFIXES = .chk .out
|
---|
215 |
|
---|
216 | $(PNGLIB_BASENAME).pc: libpng.pc
|
---|
217 | cp libpng.pc $@
|
---|
218 |
|
---|
219 | $(PNGLIB_BASENAME)-config: libpng-config
|
---|
220 | cp libpng-config $@
|
---|
221 |
|
---|
222 | scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h
|
---|
223 | scripts/prefix.out: png.h pngconf.h pnglibconf.out
|
---|
224 | scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt
|
---|
225 | scripts/intprefix.out: pnglibconf.h
|
---|
226 |
|
---|
227 | libpng.sym: scripts/sym.out
|
---|
228 | rm -f $@
|
---|
229 | cp $? $@
|
---|
230 | libpng.vers: scripts/vers.out
|
---|
231 | rm -f $@
|
---|
232 | cp $? $@
|
---|
233 |
|
---|
234 | if DO_PNG_PREFIX
|
---|
235 | # Rename functions in scripts/prefix.out with a PNG_PREFIX prefix.
|
---|
236 | # Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual
|
---|
237 | # implementation of the macro).
|
---|
238 | pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst
|
---|
239 | rm -f $@
|
---|
240 | $(AWK) 's==0 && NR>1{print prev}\
|
---|
241 | s==0{prev=$$0}\
|
---|
242 | s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\
|
---|
243 | s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\
|
---|
244 | END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\
|
---|
245 | s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8
|
---|
246 | mv pnglibconf.tf8 $@
|
---|
247 |
|
---|
248 | pngprefix.h: scripts/intprefix.out
|
---|
249 | rm -f pngprefix.tf1
|
---|
250 | $(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1
|
---|
251 | mv pngprefix.tf1 $@
|
---|
252 | else
|
---|
253 | pnglibconf.h: pnglibconf.out
|
---|
254 | rm -f $@
|
---|
255 | cp $? $@
|
---|
256 |
|
---|
257 | pngprefix.h: # is empty
|
---|
258 | :>$@
|
---|
259 | endif
|
---|
260 |
|
---|
261 | $(srcdir)/scripts/pnglibconf.h.prebuilt:
|
---|
262 | @echo "Attempting to build $@" >&2
|
---|
263 | @echo "This is a machine generated file, but if you want to make" >&2
|
---|
264 | @echo "a new one simply make 'scripts/pnglibconf.out', copy that" >&2
|
---|
265 | @echo "AND set PNG_ZLIB_VERNUM to 0 (you MUST do this)" >&2
|
---|
266 | @exit 1
|
---|
267 |
|
---|
268 | # The following is necessary to ensure that the local pnglibconf.h is used, not
|
---|
269 | # an installed one (this can happen immediately after on a clean system if
|
---|
270 | # 'make test' is the first thing the user does.) Only files which include
|
---|
271 | # one of the png source files (typically png.h or pngpriv.h) need to be listed
|
---|
272 | # here:
|
---|
273 | pngtest.o: pnglibconf.h
|
---|
274 |
|
---|
275 | contrib/libtests/makepng.o: pnglibconf.h
|
---|
276 | contrib/libtests/pngstest.o: pnglibconf.h
|
---|
277 | contrib/libtests/pngunknown.o: pnglibconf.h
|
---|
278 | contrib/libtests/pngimage.o: pnglibconf.h
|
---|
279 | contrib/libtests/pngvalid.o: pnglibconf.h
|
---|
280 | contrib/libtests/readpng.o: pnglibconf.h
|
---|
281 | contrib/libtests/tarith.o: pnglibconf.h
|
---|
282 | contrib/libtests/timepng.o: pnglibconf.h
|
---|
283 |
|
---|
284 | contrib/tools/makesRGB.o: pnglibconf.h
|
---|
285 | contrib/tools/pngfix.o: pnglibconf.h
|
---|
286 | contrib/tools/pngcp.o: pnglibconf.h
|
---|
287 |
|
---|
288 | # We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
|
---|
289 | # be built with PNG_USE_READ_MACROS; this prevents the read macros from
|
---|
290 | # interfering with the symbol file format.
|
---|
291 | SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
|
---|
292 | -DPNGLIB_VERSION='@PNGLIB_VERSION@'\
|
---|
293 | -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
|
---|
294 | -DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
|
---|
295 |
|
---|
296 | if DO_PNG_PREFIX
|
---|
297 | SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@'
|
---|
298 | endif
|
---|
299 |
|
---|
300 | .c.out:
|
---|
301 | rm -f $@ $*.tf[12]
|
---|
302 | test -d scripts || mkdir scripts || test -d scripts
|
---|
303 | $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
|
---|
304 | $(CPPFLAGS) $(SYMBOL_CFLAGS) $< > $*.tf1
|
---|
305 | $(AWK) -f "${srcdir}/scripts/dfn.awk" out="$*.tf2" $*.tf1 1>&2
|
---|
306 | rm -f $*.tf1
|
---|
307 | mv $*.tf2 $@
|
---|
308 |
|
---|
309 | # The .c file for pnglibconf.h is machine generated
|
---|
310 | pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
|
---|
311 | rm -f $@ $*.tf[45]
|
---|
312 | $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
|
---|
313 | ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
|
---|
314 | ${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
|
---|
315 | $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2
|
---|
316 | rm $*.tf4
|
---|
317 | mv $*.tf5 $@
|
---|
318 |
|
---|
319 | # Symbol checks (.def and .out files should match)
|
---|
320 | scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
|
---|
321 |
|
---|
322 | .out.chk:
|
---|
323 | rm -f $@ $*.new
|
---|
324 | $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
|
---|
325 | of="$*.new" $< >&2
|
---|
326 | mv $*.new $@
|
---|
327 |
|
---|
328 | # used on demand to regenerate the standard header, CPPFLAGS should
|
---|
329 | # be empty - no non-standard defines
|
---|
330 | scripts/pnglibconf.c: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
|
---|
331 | rm -f $@ pnglibconf.tf[67]
|
---|
332 | test -z "$(CPPFLAGS)"
|
---|
333 | echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
|
---|
334 | $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\
|
---|
335 | logunsupported=1 version=search ${srcdir}/pngconf.h -\
|
---|
336 | ${srcdir}/scripts/pnglibconf.dfa 1>&2
|
---|
337 | $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\
|
---|
338 | pnglibconf.tf6 1>&2
|
---|
339 | rm pnglibconf.tf6
|
---|
340 | mv pnglibconf.tf7 $@
|
---|
341 |
|
---|
342 | $(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
|
---|
343 | pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h
|
---|
344 |
|
---|
345 | test: check-am
|
---|
346 |
|
---|
347 | # Extra checks
|
---|
348 | check: scripts/symbols.chk
|
---|
349 |
|
---|
350 | # Don't distribute the generated script files
|
---|
351 | dist-hook:
|
---|
352 | cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
|
---|
353 |
|
---|
354 | # Make links between installed files with release-specific names and the generic
|
---|
355 | # file names. If this install rule is run the generic names will be deleted and
|
---|
356 | # recreated - this has obvious issues for systems with multiple installations.
|
---|
357 |
|
---|
358 | install-header-links:
|
---|
359 | @set -ex; cd '$(DESTDIR)$(includedir)'; for f in $(HEADERS); do \
|
---|
360 | rm -f "$$f"; $(LN_S) "$(PNGLIB_BASENAME)/$$f" "$$f"; done
|
---|
361 |
|
---|
362 | uninstall-header-links:
|
---|
363 | cd '$(DESTDIR)$(includedir)'; rm -f $(HEADERS)
|
---|
364 |
|
---|
365 | install-libpng-pc:
|
---|
366 | @set -ex; cd '$(DESTDIR)$(pkgconfigdir)'; rm -f libpng.pc; \
|
---|
367 | $(LN_S) '$(PNGLIB_BASENAME).pc' libpng.pc
|
---|
368 |
|
---|
369 | uninstall-libpng-pc:
|
---|
370 | rm -f '$(DESTDIR)$(pkgconfigdir)/libpng.pc'
|
---|
371 |
|
---|
372 | # EXT_LIST is a list of the possibly library directory extensions, this exists
|
---|
373 | # because we can't find a good way of discovering the file extensions that are
|
---|
374 | # actually installed on a given system, so instead we check for every extension
|
---|
375 | # we have seen.
|
---|
376 |
|
---|
377 | EXT_LIST = a dll.a so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ la sl dylib
|
---|
378 |
|
---|
379 | install-library-links:
|
---|
380 | @set -x; cd '$(DESTDIR)$(libdir)';\
|
---|
381 | for ext in $(EXT_LIST); do\
|
---|
382 | rm -f "libpng.$$ext";\
|
---|
383 | if test -f "$(PNGLIB_BASENAME).$$ext"; then\
|
---|
384 | $(LN_S) "$(PNGLIB_BASENAME).$$ext" "libpng.$$ext" || exit 1;\
|
---|
385 | fi;\
|
---|
386 | done
|
---|
387 |
|
---|
388 | uninstall-library-links:
|
---|
389 | @set -x; cd '$(DESTDIR)$(libdir)'; for ext in $(EXT_LIST); do\
|
---|
390 | rm -f "libpng.$$ext"; done
|
---|
391 |
|
---|
392 | install-libpng-config:
|
---|
393 | @set -ex; cd '$(DESTDIR)$(bindir)'; rm -f libpng-config; \
|
---|
394 | $(LN_S) '$(PNGLIB_BASENAME)-config' libpng-config
|
---|
395 |
|
---|
396 | uninstall-libpng-config:
|
---|
397 | rm -f '$(DESTDIR)$(bindir)/libpng-config'
|
---|
398 |
|
---|
399 | if DO_INSTALL_LINKS
|
---|
400 | # If --enable-unversioned-links is specified the header and lib file links
|
---|
401 | # will be automatically made on a 'make install':
|
---|
402 |
|
---|
403 | install-data-hook: install-header-links
|
---|
404 | uninstall-hook: uninstall-header-links
|
---|
405 | install-exec-hook: install-library-links
|
---|
406 | uninstall-hook: uninstall-library-links
|
---|
407 | endif
|
---|
408 |
|
---|
409 | if DO_INSTALL_LIBPNG_PC
|
---|
410 | # Likewise, --install-pc causes libpng.pc to be constructed:
|
---|
411 |
|
---|
412 | install-data-hook: install-libpng-pc
|
---|
413 | uninstall-hook: uninstall-libpng-pc
|
---|
414 | endif
|
---|
415 |
|
---|
416 | if DO_INSTALL_LIBPNG_CONFIG
|
---|
417 | # And --install-config:
|
---|
418 |
|
---|
419 | install-exec-hook: install-libpng-config
|
---|
420 | uninstall-hook: uninstall-libpng-config
|
---|
421 | endif
|
---|
422 |
|
---|
423 | # The following addition ensures that 'make all' always builds the test programs
|
---|
424 | # too. It used to, but some change either in libpng or configure stopped this
|
---|
425 | # working.
|
---|
426 | all-am: $(check_PROGRAMS)
|
---|