blob: dfa5da82e6818e7d98434b26735a1aaff32a1ef9 [file] [log] [blame]
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -06001# Makefile.am:
2# Source file for Makefile.in (and hence Makefile)
3#
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -06004
Glenn Randers-Pehrsona7dbcba2007-05-15 16:16:34 -05005PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -06006
John Bowlera23f3db2012-01-27 10:24:21 -06007ACLOCAL_AMFLAGS = -I scripts
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -06008
9# test programs - run on make check, make distcheck
Glenn Randers-Pehrson4af77102011-11-17 09:05:18 -060010TESTS_ENVIRONMENT= srcdir=$(srcdir)
11check_PROGRAMS= pngtest
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060012pngtest_SOURCES = pngtest.c
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060013pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
Glenn Randers-Pehrson4af77102011-11-17 09:05:18 -060014TESTS = test-pngtest.sh
Glenn Randers-Pehrsone0bcbfd2011-11-16 23:03:52 -060015
Glenn Randers-Pehrson15ea1fa2011-11-23 15:28:01 -060016# Only do the following if the contrib directory is present.
Glenn Randers-Pehrson702053d2012-08-17 21:23:06 -050017check_PROGRAMS+= pngvalid pngstest pngunknown
Glenn Randers-Pehrson5b79cd52011-11-24 10:56:20 -060018pngvalid_SOURCES = contrib/libtests/pngvalid.c
John Bowlered9f8442011-11-16 11:52:27 -060019pngstest_SOURCES = contrib/libtests/pngstest.c
Glenn Randers-Pehrson702053d2012-08-17 21:23:06 -050020pngunknown_SOURCES = contrib/libtests/pngunknown.c
Glenn Randers-Pehrson4af77102011-11-17 09:05:18 -060021pngvalid_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
John Bowlered9f8442011-11-16 11:52:27 -060022pngstest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
Glenn Randers-Pehrson702053d2012-08-17 21:23:06 -050023pngunknown_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
24TESTS += contrib/libtests/test-pngunknown.sh\
John Bowler74a9c072012-08-17 17:40:41 -050025 contrib/libtests/test-pngvalid-simple.sh\
26 contrib/libtests/test-pngvalid-full.sh\
27 contrib/libtests/test-pngstest.sh
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060028
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -060029# man pages
30dist_man_MANS= libpng.3 libpngpf.3 png.5
31
32# generate the -config scripts if required
Glenn Randers-Pehrsonf3d737d2011-05-07 21:41:15 -050033binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060034EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -060035bin_SCRIPTS= @binconfigs@
36
37# rules to build libpng, only build the old library on request
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060038lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
39# EXTRA_LTLIBRARIES= libpng.la
Glenn Randers-Pehrsonf01459f2010-07-29 19:42:45 -050040libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngerror.c\
Glenn Randers-Pehrson31aee0d2010-07-29 17:39:14 -050041 pngget.c pngmem.c pngpread.c pngread.c pngrio.c pngrtran.c pngrutil.c\
42 pngset.c pngtrans.c pngwio.c pngwrite.c pngwtran.c pngwutil.c\
Glenn Randers-Pehrson9eb125e2012-02-24 22:04:53 -060043 png.h pngconf.h pngdebug.h pnginfo.h pngpriv.h pngstruct.h pngusr.dfa
Glenn Randers-Pehrsond5d63602006-04-15 06:37:45 -050044
Glenn Randers-Pehrson6d7705e2011-11-03 00:42:58 -050045if PNG_ARM_NEON
46libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES += arm/filter_neon.S
47endif
48
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -050049nodist_libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = pnglibconf.h
50
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060051libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
52 -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -060053
54if HAVE_LD_VERSION_SCRIPT
Glenn Randers-Pehrson83bd94f2011-09-01 14:06:49 -050055# Versioned symbols and restricted exports
56if HAVE_SOLARIS_LD
Glenn Randers-Pehrson435cf872011-10-05 16:23:53 -050057 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,-M -Wl,libpng.vers
Glenn Randers-Pehrson83bd94f2011-09-01 14:06:49 -050058else
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060059 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers
Glenn Randers-Pehrson83bd94f2011-09-01 14:06:49 -050060endif
61
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060062 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -060063else
Glenn Randers-Pehrson83bd94f2011-09-01 14:06:49 -050064# Only restricted exports when possible
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060065 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym
66 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -060067endif
Glenn Randers-Pehrsoneb580912008-07-30 14:47:09 -050068
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060069#distribute headers in /usr/include/libpng/*
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -060070pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
Glenn Randers-Pehrson0b3634b2011-12-17 09:57:00 -060071pkginclude_HEADERS= png.h pngconf.h
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -050072nodist_pkginclude_HEADERS= pnglibconf.h
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060073
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -060074# pkg-config stuff, note that libpng.pc is always required in order
75# to get the correct library
76pkgconfigdir = @pkgconfigdir@
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060077pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -060078
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060079#extra source distribution files.
Glenn Randers-Pehrson7b34df32006-02-24 06:30:16 -060080EXTRA_DIST= \
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -060081 ANNOUNCE CHANGES INSTALL LICENSE README TODO \
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060082 pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
Glenn Randers-Pehrsonb56e0d02010-04-24 12:10:36 -050083 ${srcdir}/contrib ${srcdir}/projects ${srcdir}/scripts \
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060084 $(TESTS) \
Glenn Randers-Pehrsonf3abb2c2010-10-17 12:51:53 -050085 CMakeLists.txt example.c libpng-manual.txt
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060086
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -050087SCRIPT_CLEANFILES=scripts/*.out scripts/*.chk scripts/pnglibconf.dfn
88
John Bowlereb26ee62011-12-08 09:37:24 -060089CLEANFILES= *.tf? pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
Glenn Randers-Pehrsonc551c0d2010-03-16 07:52:34 -050090 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym \
John Bowler42369cc2012-01-31 07:28:13 -060091 check.new pnglibconf.* pngprefix.h symbols.new pngtest-log.txt \
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -050092 $(SCRIPT_CLEANFILES)
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -060093
Glenn Randers-Pehrsoneb580912008-07-30 14:47:09 -050094MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
Glenn Randers-Pehrsonc551c0d2010-03-16 07:52:34 -050095config.sub configure depcomp install-sh ltmain.sh missing
Glenn Randers-Pehrson3424ee72006-07-12 13:33:47 -050096
John Bowler1eb2c482012-01-25 08:07:29 -060097# PNG_COPTS give extra options for the C compiler to be used on all compilation
98# steps (unless targe_CFLAGS is specified; that will take precedence over
99# AM_CFLAGS)
100PNG_COPTS = @PNG_COPTS@
101AM_CFLAGS = ${PNG_COPTS}
102
John Bowler71a10f22011-01-22 17:03:33 -0600103# DFNCPP is normally just CPP - the C preprocessor - but on Solaris and maybe
104# other operating systems (NeXT?) the C preprocessor selected by configure
105# checks input tokens for validity - effectively it performs part of the ANSI-C
106# parsing - and therefore fails with the .df files. configure.ac has special
107# checks for this and sets DFNCPP appropriately.
108DFNCPP = @DFNCPP@
109
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500110SUFFIXES = .chk .dfn .out
Glenn Randers-Pehrson7e597912010-03-17 07:29:42 -0500111
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -0600112$(PNGLIB_BASENAME).pc: libpng.pc
113 cp libpng.pc $@
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -0600114
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -0600115$(PNGLIB_BASENAME)-config: libpng-config
116 cp libpng-config $@
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -0600117
Glenn Randers-Pehrson0b3634b2011-12-17 09:57:00 -0600118scripts/sym.out scripts/vers.out: png.h pngconf.h pnglibconf.h
John Bowler42369cc2012-01-31 07:28:13 -0600119scripts/prefix.out: png.h pngconf.h pnglibconf.out
Glenn Randers-Pehrson0b3634b2011-12-17 09:57:00 -0600120scripts/symbols.out: png.h pngconf.h $(srcdir)/scripts/pnglibconf.h.prebuilt
Glenn Randers-Pehrson7e597912010-03-17 07:29:42 -0500121
122libpng.sym: scripts/sym.out
123 rm -f $@
124 cp $? $@
125libpng.vers: scripts/vers.out
126 rm -f $@
127 cp $? $@
John Bowler42369cc2012-01-31 07:28:13 -0600128
John Bowler516c9c92012-02-01 07:14:24 -0600129if DO_PNG_PREFIX
John Bowler42369cc2012-01-31 07:28:13 -0600130# Rename functions in scripts/prefix.out with a PNG_PREFIX prefix.
131# Rename macros in scripts/macro.lst from PNG_PREFIXpng_ to PNG_ (the actual
132# implementation of the macro).
133pnglibconf.h: pnglibconf.out scripts/prefix.out scripts/macro.lst
134 rm -f $@
135 $(AWK) 's==0 && NR>1{print prev}\
136 s==0{prev=$$0}\
137 s==1{print "#define", $$1, "@PNG_PREFIX@" $$1}\
138 s==2{print "#define @PNG_PREFIX@png_" $$1, "PNG_" $$1}\
139 END{print prev}' s=0 pnglibconf.out s=1 scripts/prefix.out\
140 s=2 ${srcdir}/scripts/macro.lst >pnglibconf.tf8
141 mv pnglibconf.tf8 $@
142
143pngprefix.h: scripts/intprefix.out
144 rm -f pngprefix.tf1
145 $(AWK) '{print "#define", $$1, "@PNG_PREFIX@" $$1}' $? >pngprefix.tf1
146 mv pngprefix.tf1 $@
147else
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500148pnglibconf.h: pnglibconf.out
149 rm -f $@
150 cp $? $@
John Bowler42369cc2012-01-31 07:28:13 -0600151
152pngprefix.h: # is empty
153 :>$@
154endif
155
John Bowler5a77e672011-07-14 07:42:11 -0500156$(srcdir)/scripts/pnglibconf.h.prebuilt:
157 @echo "Attempting to build $@" >&2
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500158 @echo "This is a machine generated file, but if you want to make" >&2
159 @echo "a new one simply make 'scripts/pnglibconf.out' and copy that" >&2
160 @exit 1
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -0600161
Glenn Randers-Pehrson2be8b642010-07-29 19:09:18 -0500162# The following is necessary to ensure that the local pnglibconf.h is used, not
163# an installed one (this can happen immediately after on a clean system if
164# 'make test' is the first thing the user does.)
Glenn Randers-Pehrson5b79cd52011-11-24 10:56:20 -0600165contrib/libtests/pngstest.o contrib/libtests/pngvalid.o pngtest.o: pnglibconf.h
John Bowler74a9c072012-08-17 17:40:41 -0500166contrib/libtests/pngunknown.o: pnglibconf.h
Glenn Randers-Pehrson2be8b642010-07-29 19:09:18 -0500167
Glenn Randers-Pehrson0012e9c2011-01-26 22:04:03 -0600168# We must use -DPNG_NO_USE_READ_MACROS here even when the library may actually
Glenn Randers-Pehrson83bd94f2011-09-01 14:06:49 -0500169# be built with PNG_USE_READ_MACROS; this prevents the read macros from
170# interfering with the symbol file format.
Glenn Randers-Pehrsona528fba2010-03-12 21:03:18 -0600171SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
172 -DPNGLIB_VERSION='@PNGLIB_VERSION@'\
John Bowlerf21a0d02011-01-23 23:55:19 -0600173 -DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'\
Glenn Randers-Pehrson80de04e2011-03-24 23:06:26 -0500174 -DPNG_NO_USE_READ_MACROS -DPNG_BUILDING_SYMBOL_TABLE
Glenn Randers-Pehrsona528fba2010-03-12 21:03:18 -0600175
John Bowler516c9c92012-02-01 07:14:24 -0600176if DO_PNG_PREFIX
John Bowler42369cc2012-01-31 07:28:13 -0600177SYMBOL_CFLAGS += -DPNG_PREFIX='@PNG_PREFIX@'
178endif
179
Glenn Randers-Pehrson7e597912010-03-17 07:29:42 -0500180.dfn.out:
John Bowlereb26ee62011-12-08 09:37:24 -0600181 rm -f $@ $*.c $*.tf[123]
Glenn Randers-Pehrson7e597912010-03-17 07:29:42 -0500182 test -d scripts || mkdir scripts
John Bowlereb26ee62011-12-08 09:37:24 -0600183 echo '#include "$<"' >$*.c
John Bowlerba6fbc52011-12-17 14:21:54 -0600184 $(DFNCPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)\
John Bowlereb26ee62011-12-08 09:37:24 -0600185 $(CPPFLAGS) $(SYMBOL_CFLAGS) $*.c > $*.tf1
John Bowler1d8b7552011-11-03 18:19:53 -0500186 $(SED) -n -e 's|^.*PNG_DEFN_MAGIC *-\(.*\)- *PNG_DEFN_END.*$$|\1|p'\
John Bowlereb26ee62011-12-08 09:37:24 -0600187 $*.tf1 >$*.tf2
188 $(SED) -e 's| *PNG_JOIN *||g' -e 's| *$$||' $*.tf2 >$*.tf3
189 rm -f $*.c $*.tf[12]
190 mv $*.tf3 $@
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -0600191
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500192# The .dfn file for pnglibconf.h is machine generated
Glenn Randers-Pehrson9eb125e2012-02-24 22:04:53 -0600193pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h pngusr.dfa $(DFA_XTRA)
John Bowlereb26ee62011-12-08 09:37:24 -0600194 rm -f $@ $*.tf[45]
195 $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf4 version=search\
John Bowlerd4973832011-11-08 19:34:54 -0600196 ${srcdir}/pngconf.h ${srcdir}/scripts/pnglibconf.dfa\
Glenn Randers-Pehrson9eb125e2012-02-24 22:04:53 -0600197 ${srcdir}/pngusr.dfa $(DFA_XTRA) 1>&2
John Bowlereb26ee62011-12-08 09:37:24 -0600198 $(AWK) -f ${srcdir}/scripts/options.awk out=$*.tf5 $*.tf4 1>&2
199 rm $*.tf4
200 mv $*.tf5 $@
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500201
202# Symbol checks (.def and .out files should match)
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500203scripts/symbols.chk: scripts/checksym.awk scripts/symbols.def scripts/symbols.out
John Bowlereb26ee62011-12-08 09:37:24 -0600204
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500205.out.chk:
John Bowlereb26ee62011-12-08 09:37:24 -0600206 rm -f $@ $*.new
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500207 $(AWK) -f ${srcdir}/scripts/checksym.awk ${srcdir}/scripts/${*F}.def\
John Bowlereb26ee62011-12-08 09:37:24 -0600208 of="$*.new" $< >&2
209 mv $*.new $@
Glenn Randers-Pehrsonc551c0d2010-03-16 07:52:34 -0500210
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500211# used on demand to regenerate the standard header, CPPFLAGS should
212# be empty - no non-standard defines
John Bowlerd4973832011-11-08 19:34:54 -0600213scripts/pnglibconf.dfn: scripts/pnglibconf.dfa scripts/options.awk pngconf.h
John Bowlereb26ee62011-12-08 09:37:24 -0600214 rm -f $@ pnglibconf.tf[67]
Glenn Randers-Pehrsonf3d737d2011-05-07 21:41:15 -0500215 test -z "$(CPPFLAGS)"
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500216 echo "com @PNGLIB_VERSION@ STANDARD API DEFINITION" |\
John Bowlereb26ee62011-12-08 09:37:24 -0600217 $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf6\
218 logunsupported=1 version=search ${srcdir}/pngconf.h -\
219 ${srcdir}/scripts/pnglibconf.dfa 1>&2
220 $(AWK) -f ${srcdir}/scripts/options.awk out=pnglibconf.tf7\
221 pnglibconf.tf6 1>&2
222 rm pnglibconf.tf6
223 mv pnglibconf.tf7 $@
Glenn Randers-Pehrsonc551c0d2010-03-16 07:52:34 -0500224
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500225$(libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_OBJECTS): png.h pngconf.h \
John Bowler42369cc2012-01-31 07:28:13 -0600226 pnglibconf.h pngpriv.h pngdebug.h pnginfo.h pngstruct.h pngprefix.h
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500227
228test: check-am
229
230# Extra checks
John Bowlere06092a2010-12-27 22:10:19 -0600231check: scripts/symbols.chk
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500232
233# Don't distribute the generated script files
234dist-hook:
235 cd '$(top_distdir)'; rm -f $(SCRIPT_CLEANFILES)
Glenn Randers-Pehrsoneb580912008-07-30 14:47:09 -0500236
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -0600237# install the .../include headers as links to the new ones
238install-data-hook:
Glenn Randers-Pehrson0b3634b2011-12-17 09:57:00 -0600239 cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -0600240 cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
Glenn Randers-Pehrsonf7831012008-11-13 06:05:13 -0600241 cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \
242 pngconf.h
Glenn Randers-Pehrson98b4f002010-04-16 22:30:26 -0500243 cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pnglibconf.h \
244 pnglibconf.h
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -0600245 cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
246 cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
Glenn Randers-Pehrson917648e2004-12-02 18:14:51 -0600247
Glenn Randers-Pehrsone3f3c4e2010-02-07 18:08:50 -0600248# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
Glenn Randers-Pehrsonc3d51c12006-03-02 07:23:18 -0600249install-exec-hook:
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -0600250 cd $(DESTDIR)$(bindir); rm -f libpng-config
251 cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
Glenn Randers-Pehrsond60b8fa2006-04-20 21:31:14 -0500252 @set -x;\
253 cd $(DESTDIR)$(libdir);\
Glenn Randers-Pehrson08c2e812010-08-13 08:21:09 -0500254 for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib dll.a; do\
Glenn Randers-Pehrsond60b8fa2006-04-20 21:31:14 -0500255 rm -f libpng.$$ext;\
Glenn Randers-Pehrson3779c692006-11-07 20:38:11 -0600256 if test -f $(PNGLIB_BASENAME).$$ext; then\
257 $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
258 fi;\
Glenn Randers-Pehrsond60b8fa2006-04-20 21:31:14 -0500259 done
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -0600260
261uninstall-hook:
Glenn Randers-Pehrson0b3634b2011-12-17 09:57:00 -0600262 cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h pnglibconf.h
Glenn Randers-Pehrsone6474622006-03-04 16:50:47 -0600263 rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc
264 rm -f $(DESTDIR)$(bindir)/libpng-config
Glenn Randers-Pehrson7e597912010-03-17 07:29:42 -0500265 rm -f $(DESTDIR)$(libdir)/libpng.a
266 rm -f $(DESTDIR)$(libdir)/libpng.la
John Bowler56355732012-01-23 23:01:27 -0600267 rm -f $(DESTDIR)$(libdir)/libpng.dll.a