[cairo-commit] cairo/src Makefile.am,1.61,1.62
Tor Lillqvist
commit at pdx.freedesktop.org
Mon Aug 22 15:49:06 PDT 2005
Committed by: tml
Update of /cvs/cairo/cairo/src
In directory gabe:/tmp/cvs-serv3688/src
Modified Files:
Makefile.am
Log Message:
2005-08-22 Tor Lillqvist <tml at novell.com>
* configure.in: Calculate LT_CURRENT_MINUS_AGE (which forms part
of the DLL name on Win32), and AC_SUBST it.
* Makefile.am: Add target "zips" to create zip file based
distribution for Win32.
* src/Makefile.am: Produce a cairo.def file for distribution by
preprocessing the relevant header files and grepping for
declarations of functions that start with cairo_. Works for now,
will have to modify later if necessary. Use the .def file when
linking on Win32.
Index: Makefile.am
===================================================================
RCS file: /cvs/cairo/cairo/src/Makefile.am,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -d -r1.61 -r1.62
--- Makefile.am 17 Aug 2005 01:22:16 -0000 1.61
+++ Makefile.am 22 Aug 2005 22:49:04 -0000 1.62
@@ -34,6 +34,8 @@
if CAIRO_HAS_WIN32_SURFACE
libcairo_win32_headers = cairo-win32.h
libcairo_win32_sources += cairo-win32-surface.c cairo-win32-private.h
+export_symbols = -export-symbols cairo.def
+cairo_def_dependency = cairo.def
endif
if CAIRO_HAS_WIN32_FONT
libcairo_win32_sources += cairo-win32-font.c
@@ -54,6 +56,15 @@
libcairo_ft_sources = cairo-ft-font.c cairo-ft-private.h
endif
+# Headers that declare the functions in the cairo DLL API on Windows
+cairo_win32_api_headers = \
+ $(srcdir)/cairo.h \
+ $(srcdir)/cairo-ft.h \
+ $(srcdir)/cairo-pdf.h \
+ $(srcdir)/cairo-ps.h \
+ $(srcdir)/cairo-win32.h \
+ $(srcdir)/cairo-debug.h
+
# These names match automake style variable definition conventions so
# without these lines, automake will complain during the handling of
# the libcairo_la_LIBADD below. (The INCLUDES is an autoconf only
@@ -134,12 +145,35 @@
$(libcairo_win32_sources) \
cairoint.h
-libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined
+libcairo_la_LDFLAGS = -version-info @VERSION_INFO@ -no-undefined $(export_symbols)
INCLUDES = -I$(srcdir) -I$(top_srcdir)/pixman/src $(CAIRO_CFLAGS)
libcairo_la_LIBADD = $(top_builddir)/pixman/src/libpixman.la $(CAIRO_LIBS)
+libcairo_la_DEPENDENCIES = $(cairo_def_dependency)
+
+EXTRA_DIST = \
+ cairo.def
+
+cairo.def: $(cairo_win32_api_headers)
+ (echo EXPORTS; \
+ cat $(cairo_win32_api_headers) | \
+ grep -v -E '^# *include' | \
+ gcc \
+ -DCAIRO_HAS_PS_SURFACE \
+ -DCAIRO_HAS_PDF_SURFACE \
+ -DCAIRO_HAS_WIN32_SURFACE \
+ -DCAIRO_HAS_FT_FONT \
+ -DCAIRO_HAS_WIN32_FONT \
+ -DCAIRO_HAS_PNG_FUNCTIONS \
+ -E - | \
+ grep -E '^cairo_.* \(' | \
+ sed -e 's/\([^ ]*\).*/\1/' | \
+ sort; \
+ echo LIBRARY libcairo-$(LT_CURRENT_MINUS_AGE).dll; \
+ ) >$@
+
install-data-local:
@if test -f "$(DESTDIR)$(includedir)/cairo.h" || test -f "$(DESTDIR)$(includedir)/cairo-features.h" ; then \
echo "****************************************************************" ; \
More information about the cairo-commit
mailing list