summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-05-13 19:30:58 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-05-13 19:30:58 +0000
commit77866eaf9bff4e40223e326e99c40d0077a935b5 (patch)
treed8c774d845d50086c532770756c9fb317b2d9790 /gmodule
parentc74c6c91a6e0424d00ac0b71992555ce4f461117 (diff)
downloadglib-77866eaf9bff4e40223e326e99c40d0077a935b5.tar.gz
makefile.mingw.in tests/makefile.mingw.in Rename makefile.cygwin(.in) to
2000-05-13 Tor Lillqvist <tml@iki.fi> * makefile.mingw.in * tests/makefile.mingw.in * build-dll: Rename makefile.cygwin(.in) to makefile.mingw(.in), which better describes what it is. Move the build of gmodule, gthread and gobject DLLs to makefiles in those directories. Move resource file handling and build number bump to build-dll, where it sits much cleaner. * README.win32 * Makefile.am (EXTRA_DIST): Update accordingly. * glib.h: Add G_PI, G_PI_2, G_PI_4, G_E, G_LN2, G_LN10 and G_SQRT2. M_PI etc aren't necessarily in <math.h> in strict ISO C implementations. * glib.def: Add g_strcanon. * gtree.c (g_tree_node_rotate_left): Remove unused variables. * gwin32.c (g_win32_opendir): Remove unneeded statement. gmodule: * makefile.mingw.in: New file, with gmodule stuff moved from ../makefile.mingw.in. * Makefile.am: Add to EXTRA_DIST, and add rule to make makefile.mingw. gobject: * makefile.mingw.in * gobject.def * gobject.rc.in: New files, for Win32 (mingw) build. * Makefile.am: Add to EXTRA_DIST. Add rules to produce the corresponding non-*.in files. * gtype.h: (Win32:) Mark _g_type_fundamental_last for export/import from DLL. gthread: * makefile.mingw.in: New file, with gthread stuff moved from ../makefile.mingw.in. * Makefile.am: Add to EXTRA_DIST, add rule to build makefile.mingw.
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/ChangeLog7
-rw-r--r--gmodule/Makefile.am5
-rw-r--r--gmodule/makefile.mingw.in58
3 files changed, 70 insertions, 0 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog
index b47703683..211595b05 100644
--- a/gmodule/ChangeLog
+++ b/gmodule/ChangeLog
@@ -1,3 +1,10 @@
+2000-05-13 Tor Lillqvist <tml@iki.fi>
+
+ * makefile.mingw.in: New file, with gmodule stuff
+ moved from ../makefile.mingw.in.
+
+ * Makefile.am: Add to EXTRA_DIST, and add rule to make makefile.mingw.
+
2000-05-02 Tor Lillqvist <tml@iki.fi>
* gmodule-win32.c: No need to include <psapi.h>
diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am
index 2aa96aef3..e4d3b38d4 100644
--- a/gmodule/Makefile.am
+++ b/gmodule/Makefile.am
@@ -4,6 +4,8 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule \
-DG_LOG_DOMAIN=g_log_domain_gmodule @GLIB_DEBUG_FLAGS@
EXTRA_DIST = \
+ makefile.mingw \
+ makefile.mingw.in \
gmoduleconf.h.in \
gmodule.def \
gmodule-dl.c \
@@ -53,6 +55,9 @@ testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.mingw.in
+ cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
.PHONY: files release
files:
diff --git a/gmodule/makefile.mingw.in b/gmodule/makefile.mingw.in
new file mode 100644
index 000000000..2c9c9034a
--- /dev/null
+++ b/gmodule/makefile.mingw.in
@@ -0,0 +1,58 @@
+## Makefile for building the gmodule DLL with gcc for mingw. The build
+## uses tools running on cygwin, however.
+
+## Use: make -f makefile.mingw
+
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+TOP = ../..
+
+include $(TOP)/build/win32/make.mingw
+
+################################################################
+
+# Nothing much configurable below
+
+INCLUDES = -I .. -I .
+DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=g_log_domain_gmodule
+
+BUILD_DLL = ../build-dll
+
+all : \
+ gmoduleconf.h \
+ gmodule-$(GLIB_VER).dll \
+ testgmodule.exe
+
+makefile.mingw: makefile.mingw.in
+ sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
+ -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
+
+gmodule_OBJECTS = \
+ gmodule.o
+
+gmoduleconf.h: gmoduleconf.h.win32
+ cp $< $@
+
+
+gmodule-win32res.o : gmodule.rc gmodule-build.tmp
+
+gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule.def
+ $(BUILD_DLL) gmodule $(GLIB_VER) gmodule.def $(gmodule_OBJECTS) gmodule-win32res.o -L .. -lglib-$(GLIB_VER)
+
+################ test prog
+
+testgmodule.exe : gmodule-$(GLIB_VER).dll testgmodule.o libgplugin_a.dll libgplugin_b.dll
+# Wow, do we really have to do it like this to get some symbols
+# exported from a .exe? Apparently yes. Does the __declspec(dllexport)
+# actually do anything in gcc?
+ $(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base -o testgmodule.exe testgmodule.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
+ $(DLLTOOL) --base-file testgmodule.base --output-exp testgmodule.exp testgmodule.o
+ $(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base,testgmodule.exp -o testgmodule.exe testgmodule.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
+ $(DLLTOOL) --base-file testgmodule.base --output-exp testgmodule.exp testgmodule.o
+ $(CC) $(CFLAGS) -Wl,testgmodule.exp -o testgmodule.exe testgmodule.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
+
+libgplugin_a.dll : libgplugin_a.o
+ $(BUILD_DLL) libgplugin_a - - libgplugin_a.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
+
+libgplugin_b.dll : libgplugin_b.o
+ $(BUILD_DLL) libgplugin_b - - libgplugin_b.o -L .. -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)