summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2001-09-17 00:41:39 +0000
committerTor Lillqvist <tml@src.gnome.org>2001-09-17 00:41:39 +0000
commit020b44f5ac1b27e26bbd6da4a6b4c466d36cad78 (patch)
tree5865da447ab5dbfe91dcfbaa6c15e93f30506b1d /gmodule
parent545a6a7616471a11c20d22f2ab1f2f4f621e99d1 (diff)
Add variable for LT_CURRENT minus LT_AGE (the suffix used by libtool on
2001-09-17 Tor Lillqvist <tml@iki.fi> * configure.in: Add variable for LT_CURRENT minus LT_AGE (the suffix used by libtool on Win32 for DLLs). Set variables for the compiled resource files on Windows. Handle the native Win32 gthread stuff. * glib/Makefile.am * gmodule/Makefile.am * gobject/Makefile.am: (Win32) Add minor hacks to link in the object file produced from the resource file. Use the lt-compile-resource script from the build module. The non-hack way would be to teach libtool, autoconf and automake about .rc files (which are a kind of source code, after all, that gets compiled to object files). But then there would be problems for those who wouldn't have bleeding edge auto* and libtool. * glib/glib.def * gobject/gobject.def: Updates. * glib/glib.rc.in * gmodule/gmodule.rc.in * gobject/gobject.rc.in * gthread/gthread.rc.in: Update InternalName and OriginalFilename to match libtool's naming convention for DLLs. * glib/gutils.c: Ditto when constructing the DLL name in the definition for GLIB_LOCALE_DIR. * glib/makefile.mingw.in * gmodule/makefile.mingw.in * gobject/makefile.mingw.in * gthread/makefile.mingw.in: Update import library names.
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/Makefile.am9
-rw-r--r--gmodule/makefile.mingw.in22
2 files changed, 18 insertions, 13 deletions
diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am
index faa8d1d20..22d451cb5 100644
--- a/gmodule/Makefile.am
+++ b/gmodule/Makefile.am
@@ -48,7 +48,9 @@ libgmodule_1_3_la_LDFLAGS = \
-version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \
-export-dynamic $(no_undefined) $(export_symbols)
-libgmodule_1_3_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
+libgmodule_1_3_la_LIBADD = @G_MODULE_WIN32_RESOURCE@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ $(libglib)
+
+libgmodule_1_3_la_DEPENDENCIES = @G_MODULE_WIN32_RESOURCE@
libgplugin_a_la_SOURCES = libgplugin_a.c
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module $(no_undefined)
@@ -62,6 +64,11 @@ noinst_PROGRAMS = testgmodule
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
testgmodule_LDADD = libgmodule-1.3.la $(libglib) @G_MODULE_LIBS@
+if OS_WIN32
+@G_MODULE_WIN32_RESOURCE@ : gmodule.rc
+ $(top_srcdir)/build/win32/lt-compile-resource gmodule.rc @G_MODULE_WIN32_RESOURCE@
+endif
+
gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
diff --git a/gmodule/makefile.mingw.in b/gmodule/makefile.mingw.in
index 416c7d4da..45a7169d1 100644
--- a/gmodule/makefile.mingw.in
+++ b/gmodule/makefile.mingw.in
@@ -16,15 +16,10 @@ DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" -DG_ENABLE_DEBUG
all : \
gmoduleconf.h \
- gmodule-@GLIB_VERSION@.dll \
+ libgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a \
testgmodule.exe \
libgplugin_a.dll libgplugin_b.dll
-ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
-makefile.mingw: makefile.mingw.in
- sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
-endif
-
gmodule_OBJECTS = \
gmodule.o
@@ -33,22 +28,25 @@ gmoduleconf.h: gmoduleconf.h.win32
################ The gmodule DLL
-gmodule-@GLIB_VERSION@.dll : $(gmodule_OBJECTS) gmodule.def
- $(BUILD_DLL) gmodule @GLIB_VERSION@ $(CFLAGS) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib
+libgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a : $(gmodule_OBJECTS) gmodule.def gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc
+ $(BUILD_DLL) gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ @LT_CURRENT:@LT_REVISION@:@LT_AGE@ $(CFLAGS) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.rc : gmodule.rc
+ cp $< $@
################ test prog
-testgmodule.exe : gmodule-@GLIB_VERSION@.dll testgmodule.o
+testgmodule.exe : libgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a testgmodule.o
# We have to generate an .exp file separately with dlltool, and link
# with that. Sigh.
dlltool --output-exp testgmodule.exp testgmodule.o
- $(CC) $(CFLAGS) -o testgmodule.exe testgmodule.o testgmodule.exp -L ../glib -lglib -L . -lgmodule $(LFLAGS)
+ $(CC) $(CFLAGS) -o testgmodule.exe testgmodule.o testgmodule.exp -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ $(LFLAGS)
libgplugin_a.dll : libgplugin_a.o
- $(BUILD_DLL) libgplugin_a - libgplugin_a.o -L ../glib -lglib -L . -lgmodule
+ $(BUILD_DLL) libgplugin_a - libgplugin_a.o -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
libgplugin_b.dll : libgplugin_b.o
- $(BUILD_DLL) libgplugin_b - libgplugin_b.o -L ../glib -lglib -L . -lgmodule
+ $(BUILD_DLL) libgplugin_b - libgplugin_b.o -L ../glib -lglib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
################ Other stuff