]> git.saurik.com Git - wxWidgets.git/blame - src/png/Makefile.am
Check for invalid items in generic wxDataViewCtrl::GetSelections().
[wxWidgets.git] / src / png / Makefile.am
CommitLineData
970f6abe
VZ
1# Makefile.am:
2# Source file for Makefile.in (and hence Makefile)
3#
970f6abe
VZ
4
5PNGLIB_BASENAME= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@
6
7# libpng does not follow GNU file name conventions
8AUTOMAKE_OPTIONS = foreign
9
10# test programs - run on make check, make distcheck
11check_PROGRAMS= pngtest
12pngtest_SOURCES = pngtest.c
b61cc19c 13pngtest_LDADD = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
970f6abe
VZ
14TESTS = test-pngtest.sh
15TESTS_ENVIRONMENT= srcdir=$(srcdir)
16
17# man pages
18dist_man_MANS= libpng.3 libpngpf.3 png.5
19
20# generate the -config scripts if required
b61cc19c
PC
21binconfigs= libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
22EXTRA_SCRIPTS= libpng-config libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config
970f6abe
VZ
23bin_SCRIPTS= @binconfigs@
24
25# rules to build libpng, only build the old library on request
b61cc19c
PC
26lib_LTLIBRARIES=libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.la
27# EXTRA_LTLIBRARIES= libpng.la
28libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngset.c pngget.c pngrutil.c \
29 pngtrans.c pngwutil.c \
970f6abe
VZ
30 pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
31 pngwtran.c pngmem.c pngerror.c pngpread.c \
b61cc19c 32 png.h pngconf.h pngpriv.h
970f6abe 33
b61cc19c 34libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
970f6abe 35
b61cc19c
PC
36libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined -export-dynamic \
37 -version-number @PNGLIB_MAJOR@@PNGLIB_MINOR@:@PNGLIB_RELEASE@:0
970f6abe
VZ
38
39if HAVE_LD_VERSION_SCRIPT
40 # Versioned symbols and restricted exports
b61cc19c
PC
41 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -Wl,--version-script=libpng.vers
42 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
970f6abe
VZ
43else
44 # Only restricted exports when possible
b61cc19c
PC
45 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS += -export-symbols libpng.sym
46 libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
970f6abe 47endif
970f6abe
VZ
48
49# Avoid depending upon Character Ranges.
50AN = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
51
52#distribute headers in /usr/include/libpng/*
53pkgincludedir= $(includedir)/$(PNGLIB_BASENAME)
54pkginclude_HEADERS= png.h pngconf.h
55
56# pkg-config stuff, note that libpng.pc is always required in order
57# to get the correct library
58pkgconfigdir = @pkgconfigdir@
b61cc19c 59pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
970f6abe
VZ
60
61#extra source distribution files.
62EXTRA_DIST= \
b61cc19c 63 ANNOUNCE CHANGES INSTALL LICENSE README TODO \
970f6abe 64 pngtest.png pngbar.png pngnow.png pngbar.jpg autogen.sh \
970f6abe
VZ
65 ${srcdir}/projects/visualc6/* \
66 ${srcdir}/projects/visualc71/* \
b61cc19c 67 ${srcdir}/projects/xcode/* \
970f6abe
VZ
68 ${srcdir}/scripts/* \
69 ${srcdir}/contrib/gregbook/* \
b61cc19c 70 ${srcdir}/contrib/pngminim/* \
970f6abe
VZ
71 ${srcdir}/contrib/pngminus/* \
72 ${srcdir}/contrib/pngsuite/* \
73 ${srcdir}/contrib/visupng/* \
74 $(TESTS) \
b61cc19c 75 example.c libpng-*.txt
970f6abe 76
b61cc19c 77CLEANFILES= pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers \
970f6abe
VZ
78libpng.sym
79
80MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
81config.sub configure depcomp install-sh ltmain.sh missing
82
83$(PNGLIB_BASENAME).pc: libpng.pc
84 cp libpng.pc $@
85
86$(PNGLIB_BASENAME)-config: libpng-config
87 cp libpng-config $@
88
89libpng.sym: png.h pngconf.h
90 rm -f $@ $@.new
91 $(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
92 $(SED) -n -e \
93 's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
94 -e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
95 >$@.new
96 mv $@.new $@
97
98libpng.vers: libpng.sym
99 rm -f $@ $@.new
100 echo PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0 '{global:' > $@.new
101 $(SED) s/$$/\;/ libpng.sym >> $@.new
102 echo 'local: *; };' >> $@.new
103 mv $@.new $@
104
105test: check
106
107# install the .../include headers as links to the new ones
108install-data-hook:
109 cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
110 cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/png.h png.h
b61cc19c
PC
111 cd $(DESTDIR)$(includedir); $(LN_S) $(PNGLIB_BASENAME)/pngconf.h \
112 pngconf.h
970f6abe
VZ
113 cd $(DESTDIR)$(pkgconfigdir); rm -f libpng.pc
114 cd $(DESTDIR)$(pkgconfigdir); $(LN_S) $(PNGLIB_BASENAME).pc libpng.pc
115
b61cc19c 116# do evil things to libpng to cause libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@ to be used
970f6abe
VZ
117install-exec-hook:
118 cd $(DESTDIR)$(bindir); rm -f libpng-config
119 cd $(DESTDIR)$(bindir); $(LN_S) $(PNGLIB_BASENAME)-config libpng-config
120 @set -x;\
121 cd $(DESTDIR)$(libdir);\
b61cc19c 122 for ext in a la so so.@PNGLIB_MAJOR@@PNGLIB_MINOR@.@PNGLIB_RELEASE@ sl dylib dll.a; do\
970f6abe
VZ
123 rm -f libpng.$$ext;\
124 if test -f $(PNGLIB_BASENAME).$$ext; then\
125 $(LN_S) $(PNGLIB_BASENAME).$$ext libpng.$$ext;\
126 fi;\
127 done
128
129uninstall-hook:
130 cd $(DESTDIR)$(includedir); rm -f png.h pngconf.h
131 rm -f $(DESTDIR)$(pkgconfigdir)/libpng.pc
132 rm -f $(DESTDIR)$(bindir)/libpng-config