mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
[devel] Enabled 'attribute' warnings that are relevant to library APIs
and callbacks. Changed rules for generation of the various symbol files and added a new rule for a DEF file (which is also added to the distribution). Updated the symbol file generation to stop it adding spurious spaces to EOL (coming from preprocessor macro expansion). Added a facility to join tokens in the output and rewrite *.dfn to use this.
This commit is contained in:
41
Makefile.in
41
Makefile.in
@@ -303,7 +303,7 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_SOURCES = png.c pngset.c pngget.c pngrutil
|
||||
pngtrans.c pngwutil.c \
|
||||
pngread.c pngrio.c pngwio.c pngwrite.c pngrtran.c \
|
||||
pngwtran.c pngmem.c pngerror.c pngpread.c \
|
||||
png.h pngconf.h pngpriv.h pngstruct.h pnginfo.h pngdebug.h
|
||||
%HEADERS%
|
||||
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_CPPFLAGS = @LIBPNG_DEFINES@
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \
|
||||
@@ -312,9 +312,6 @@ libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_LDFLAGS = -no-undefined \
|
||||
$(am__append_1) $(am__append_2)
|
||||
@HAVE_LD_VERSION_SCRIPT_FALSE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.sym
|
||||
@HAVE_LD_VERSION_SCRIPT_TRUE@libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@_la_DEPENDENCIES = libpng.vers
|
||||
|
||||
# Avoid depending upon Character Ranges.
|
||||
AN = '_abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
|
||||
pkginclude_HEADERS = png.h pngconf.h
|
||||
pkgconfig_DATA = libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc
|
||||
|
||||
@@ -332,13 +329,17 @@ EXTRA_DIST = \
|
||||
${srcdir}/contrib/pngsuite/* \
|
||||
${srcdir}/contrib/visupng/* \
|
||||
$(TESTS) \
|
||||
CMakeLists.txt example.c libpng-1.5.0beta14.txt
|
||||
CMakeLists.txt example.c libpng.def libpng-@PNGLIB_VERSION@.txt
|
||||
|
||||
CLEANFILES = pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers \
|
||||
libpng.sym
|
||||
CLEANFILES = dfn.c dfn?.out pngout.png libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@.pc \
|
||||
libpng@PNGLIB_MAJOR@@PNGLIB_MINOR@-config libpng.vers libpng.sym
|
||||
|
||||
MAINTAINERCLEANFILES = Makefile.in aclocal.m4 config.guess config.h.in \
|
||||
config.sub configure depcomp install-sh ltmain.sh missing
|
||||
config.sub configure depcomp install-sh ltmain.sh missing libpng.def
|
||||
|
||||
SYMBOL_CFLAGS = -DPNGLIB_LIBNAME='PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0'\
|
||||
-DPNGLIB_VERSION='@PNGLIB_VERSION@'\
|
||||
-DSYMBOL_PREFIX='$(SYMBOL_PREFIX)'
|
||||
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-am
|
||||
@@ -1211,21 +1212,17 @@ $(PNGLIB_BASENAME).pc: libpng.pc
|
||||
$(PNGLIB_BASENAME)-config: libpng-config
|
||||
cp libpng-config $@
|
||||
|
||||
libpng.sym: png.h pngconf.h
|
||||
rm -f $@ $@.new
|
||||
$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) -DPNG_BUILDSYMS $(srcdir)/png.h | \
|
||||
$(SED) -n -e \
|
||||
's|^.*PNG_FUNCTION_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
|
||||
-e 's|^.*PNG_DATA_EXPORT[ ]*\([$(AN)]*\).*$$|$(SYMBOL_PREFIX)\1|p' \
|
||||
>$@.new
|
||||
mv $@.new $@
|
||||
libpng.sym: scripts/sym.dfn png.h pngconf.h
|
||||
libpng.vers: scripts/vers.dfn png.h pngconf.h
|
||||
libpng.def: scripts/def.dfn png.h pngconf.h
|
||||
|
||||
libpng.vers: libpng.sym
|
||||
rm -f $@ $@.new
|
||||
echo PNG@PNGLIB_MAJOR@@PNGLIB_MINOR@_0 '{global:' > $@.new
|
||||
$(SED) s/$$/\;/ libpng.sym >> $@.new
|
||||
echo 'local: *; };' >> $@.new
|
||||
mv $@.new $@
|
||||
libpng.sym libpng.vers libpng.def:
|
||||
$(RM) -f $@ dfn.c dfn?.out
|
||||
echo '#include "$<"' >dfn.c
|
||||
$(CPP) @LIBPNG_DEFINES@ $(CPPFLAGS) $(SYMBOL_CFLAGS) dfn.c >dfn1.out
|
||||
$(SED) -n -e 's|^.*PNG_DEFN_MAGIC-\(.*\)-PNG_DEFN_END.*$$|\1|p' dfn1.out >dfn2.out
|
||||
$(SED) -e 's| *@@@ *||' -e 's| *$$||' dfn2.out >dfn3.out
|
||||
mv dfn3.out $@
|
||||
|
||||
test: check
|
||||
|
||||
|
||||
Reference in New Issue
Block a user