[gxml] Enable generation of DLL for GXml
- From: Daniel Espinosa Ortiz <despinosa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gxml] Enable generation of DLL for GXml
- Date: Thu, 1 May 2014 18:21:09 +0000 (UTC)
commit 3c4984bff980b0d5510223727126f4f162530378
Author: Daniel Espinosa <esodan gmail com>
Date: Wed Apr 30 17:18:58 2014 -0500
Enable generation of DLL for GXml
configure.ac | 2 +-
gxml/Makefile.am | 34 +++++++++++++++-------------------
gxml/xom/Makefile.am | 6 +++---
3 files changed, 19 insertions(+), 23 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index cd5a7eb..b0c54a4 100644
--- a/configure.ac
+++ b/configure.ac
@@ -67,7 +67,7 @@ AC_PROG_CC
AM_PROG_CC_C_O
# Initialise libtools (handles library creation) with stuff from above
-LT_INIT()
+LT_INIT(win32-dll)
PKG_PROG_PKG_CONFIG([0.21])
GLIB_GSETTINGS
diff --git a/gxml/Makefile.am b/gxml/Makefile.am
index b22d9fc..c1fabde 100644
--- a/gxml/Makefile.am
+++ b/gxml/Makefile.am
@@ -4,7 +4,7 @@ SUBDIRS = . xom
# Empty variable to be added elements later
CLEANFILES=
-
+BUILT_SOURCES=
### Library
@@ -116,12 +116,15 @@ EXTRA_DIST = \
$(NULL)
GITIGNOREFILES = \
- $(libgxml_0_4_la_SOURCES:.vala=.c) \
+ $(sources:.vala=.c) \
libgxml_0_4_la_vala.stamp \
$(NULL)
+# This makes GObject Introspection optional and requires to use --enable-instrospection switch on configure
+if HAVE_INTROSPECTION
+
### GObject Introspection
# dlname:
# Extract our dlname like libfolks does, see bgo#658002 and bgo#585116
@@ -129,8 +132,6 @@ GITIGNOREFILES = \
libgxml_dlname = \
`$(SED) -n "s/^dlname='\([A-Za-z0-9.+-]\+\)'/\1/p" libgxml-0.4.la`
-# This makes GObject Introspection optional and requires to use --enable-instrospection switch on configure
-if HAVE_INTROSPECTION
AM_VALAFLAGS += \
--gir=GXml-$(API_VERSION).gir
@@ -154,32 +155,29 @@ if PLATFORM_WIN32
AM_VALAFLAGS += \
--symbols=gxml.symbols
-libgxml_0_4_la_LDFLAGS += -export-symbols $(builddir)/libgxml-0.4.def
-libgxml_0_4_la_DEPENDENCIES = libgxml-0.4.def
+libgxml_0_4_la_LDFLAGS += -shared -o libgxml-0.4.dll -no-undefined \
+ -out-imlib -export-all-symbols -output-def
libgxml-0.4.def: gxml.symbols
- (echo -e EXPORTS; $(CPP) -P $(DEF_FLAGS) - <$(srcdir)/gxml.symbols | sed -e '/^$$/d' -e 's/^/ /' -e
's/G_GNUC_[^ ]*//g' | sort) > gxml.def.tmp && mv gxml.def.tmp libgxml-0.4.def
-
-libgxml-0.4.lib: libgxml-0.4.def
- $(DLLTOOL) --dllname libgxml-0.4.a --def libgxml-0.4.def --output-lib libgxml-0.4.lib
-
-libgxml-0.4.lib: libgxml-0.4.la
-libgxmllibdir=$(libdir)
-libgxmllib_DATA=libgxml-0.4.lib
+ (echo -e EXPRTS; $(CPP) -P $(DEF_FLAGS) - <$^ | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g' |
sort) > gxml.def.tmp && mv gxml.def.tmp libgxml-0.4.def
libgxml-0.4.def: libgxml-0.4.la
libgxmldefdir=$(libdir)
libgxmldef_DATA=libgxml-0.4.def
CLEANFILES += \
- gxml.symbols
+ gxml.symbols \
+ libgxml-0.4.def \
+ libgxml-0.4.lib \
+ libgxml-0.4.dll
+BUILT_SOURCES += libgxml-0.4.def
endif
### Files to clean
-BUILT_SOURCES = \
+BUILT_SOURCES += \
gxml_0_4_la_vala.stamp \
gxml.h \
gxml-0.4.vapi \
@@ -190,7 +188,5 @@ CLEANFILES += \
namespace-info.vala \
$(sources:.vala=.c) \
gxml-0.4.vapi \
- gxml.h \
- $(gir_DATA) \
- $(typelib_DATA)
+ gxml.h
diff --git a/gxml/xom/Makefile.am b/gxml/xom/Makefile.am
index 22db115..2082542 100644
--- a/gxml/xom/Makefile.am
+++ b/gxml/xom/Makefile.am
@@ -112,6 +112,9 @@ GITIGNOREFILES = \
+# This makes GObject Introspection optional and requires to use --enable-instrospection switch on configure
+if HAVE_INTROSPECTION
+
### GObject Introspection
# dlname:
# Extract our dlname like libfolks does, see bgo#658002 and bgo#585116
@@ -119,9 +122,6 @@ GITIGNOREFILES = \
libxom_dlname = \
`$(SED) -n "s/^dlname='\([A-Za-z0-9.+-]\+\)'/\1/p" libxom-0.4.la`
-# This makes GObject Introspection optional and requires to use --enable-instrospection switch on configure
-if HAVE_INTROSPECTION
-
AM_VALAFLAGS += \
--gir=Xom-$(API_VERSION).gir
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]