summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2010-07-11 18:48:38 +0200
committerBenjamin Otte <otte@redhat.com>2010-07-11 18:53:42 +0200
commit120b78ada7eed6424f07a688854657d0c3ad68f8 (patch)
treec47b2e399a90dc479314e3fcf9dbe981940cfb78
parentd6362a0d76753cb6f85f0dbd567a3ec7b7b08696 (diff)
build: Split boilerplate lib generation into two so's
Same thing as what was previously done for libcairo.so: Build an intermediate lib for the (potential) C++ stuff.
-rw-r--r--boilerplate/Makefile.am31
-rw-r--r--boilerplate/Makefile.sources7
2 files changed, 26 insertions, 12 deletions
diff --git a/boilerplate/Makefile.am b/boilerplate/Makefile.am
index 547f4156..82aa80fc 100644
--- a/boilerplate/Makefile.am
+++ b/boilerplate/Makefile.am
@@ -14,7 +14,14 @@ AM_CPPFLAGS = \
$(NULL)
AM_LDFLAGS = $(CAIRO_LDFLAGS)
-EXTRA_LTLIBRARIES += libcairoboilerplate.la
+if BUILD_CXX
+cxx_boilerplate_lib = libcairoboilerplate_cxx.la
+else
+cxx_boilerplate_lib =
+endif
+
+EXTRA_LTLIBRARIES += libcairoboilerplate.la $(cxx_boilerplate_lib)
+
libcairoboilerplate_la_SOURCES = \
$(enabled_cairo_boilerplate_headers) \
@@ -22,24 +29,34 @@ libcairoboilerplate_la_SOURCES = \
$(enabled_cairo_boilerplate_sources) \
cairo-boilerplate-constructors.c \
$(NULL)
-libcairoboilerplate_la_LIBADD = $(top_builddir)/src/libcairo.la
+libcairoboilerplate_cxx_la_SOURCES = \
+ $(enabled_cairo_boilerplate_cxx_sources) \
+ $(NULL)
+libcairoboilerplate_la_LIBADD = $(top_builddir)/src/libcairo.la \
+ $(cxx_boilerplate_lib) \
+ $(CAIRO_LIBS) \
+ $(CAIROBOILERPLATE_LIBS) \
+ $(NULL)
+libcairoboilerplate_cxx_la_LIBADD = $(top_builddir)/src/libcairo.la \
+ $(CAIRO_LIBS) \
+ $(CAIROBOILERPLATE_LIBS) \
+ $(NULL)
+
if CAIRO_HAS_DL
libcairoboilerplate_la_LIBADD += -ldl
endif
if CAIRO_HAS_BEOS_SURFACE
# BeOS system headers trigger this warning
-AM_CPPFLAGS += -Wno-multichar
+libcairoboilerplate_cxx_la_CXXFLAGS = -Wno-multichar
endif
if CAIRO_HAS_WIN32_SURFACE
libcairoboilerplate_la_LIBADD += -lwinspool
endif
-libcairoboilerplate_la_LIBADD += $(CAIROBOILERPLATE_LIBS)
-
-cairo-boilerplate-constructors.c: Makefile $(enabled_cairo_boilerplate_sources) make-cairo-boilerplate-constructors.sh
- (cd $(srcdir) && sh ./make-cairo-boilerplate-constructors.sh $(enabled_cairo_boilerplate_sources)) > $@
+cairo-boilerplate-constructors.c: Makefile $(enabled_cairo_boilerplate_sources) $(enabled_cairo_boilerplate_cxx_sources) make-cairo-boilerplate-constructors.sh
+ (cd $(srcdir) && sh ./make-cairo-boilerplate-constructors.sh $(enabled_cairo_boilerplate_sources) $(enabled_cairo_boilerplate_cxx_sources)) > $@
BUILT_SOURCES += cairo-boilerplate-constructors.c
EXTRA_DIST += $(BUILT_SOURCES) make-cairo-boilerplate-constructors.sh
diff --git a/boilerplate/Makefile.sources b/boilerplate/Makefile.sources
index d247510f..63ef34e4 100644
--- a/boilerplate/Makefile.sources
+++ b/boilerplate/Makefile.sources
@@ -19,10 +19,7 @@ cairo_boilerplate_private = \
cairo-boilerplate-private.h \
$(NULL)
-# automake is stupid enough to always use c++ linker if we enable the
-# following lines, even if beos surface is not enabled. Disable it for now.
-#libcairoboilerplate_la_SOURCES += cairo-boilerplate-beos.cpp
-
+cairo_boilerplate_beos_cxx_sources = cairo-boilerplate-beos.cpp
cairo_boilerplate_directfb_sources = cairo-boilerplate-directfb.c
cairo_boilerplate_drm_sources = cairo-boilerplate-drm.c
cairo_boilerplate_glx_sources = cairo-boilerplate-glx.c
@@ -30,7 +27,7 @@ cairo_boilerplate_wgl_sources = cairo-boilerplate-wgl.c
cairo_boilerplate_egl_sources = cairo-boilerplate-egl.c
cairo_boilerplate_pdf_sources = cairo-boilerplate-pdf.c
cairo_boilerplate_ps_sources = cairo-boilerplate-ps.c
-cairo_boilerplate_qt_sources = cairo-boilerplate-qt.cpp
+cairo_boilerplate_qt_cxx_sources = cairo-boilerplate-qt.cpp
cairo_boilerplate_quartz_sources = cairo-boilerplate-quartz.c
cairo_boilerplate_script_sources = cairo-boilerplate-script.c
cairo_boilerplate_skia_sources = cairo-boilerplate-skia.c