summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2000-10-06 21:32:59 +0000
committerTor Lillqvist <tml@src.gnome.org>2000-10-06 21:32:59 +0000
commit8e847255e8c396a5bacbbf2897ad78e36ee47900 (patch)
tree3d6227b8a25700022f9fe6b59531a3b349be17d5 /gmodule
parent0c6a1ee5310d872ad1f2bfdbc54df721a239c05f (diff)
downloadglib-8e847255e8c396a5bacbbf2897ad78e36ee47900.tar.gz
Revamp to be like makefile.mingw.in, make the MSVC build actually work
2000-10-06 Tor Lillqvist <tml@iki.fi> * makefile.msc.in: Revamp to be like makefile.mingw.in, make the MSVC build actually work again. * gmodule/makefile.msc.in * gobject/makefile.msc.in * gthread/makefile.msc.in: New files, like their mingw counterparts. * gmodule/Makefile.am * gobject/Makefile.am * gthread/Makefile.am: Make and distribute them. * */makefile.mingw.in: Allow override of GLib version number from the build/win32/module.defs file. * glib.def: Add new entry point. Fixes from Hans Breuer: * glib.h (struct DIR): Keep the last readdir result cached inside the DIR struct, to enable several DIRs being open simultaneously. * gwin32.c (g_win32_readdir): Use the above instead of static. * giowin32.c (g_io_channel_win32_make_pollfd): Insert cast to keep MSVC happy.
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/Makefile.am5
-rw-r--r--gmodule/makefile.mingw.in5
-rw-r--r--gmodule/makefile.msc.in48
3 files changed, 56 insertions, 2 deletions
diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am
index 4ac2ea1e7..659d00cac 100644
--- a/gmodule/Makefile.am
+++ b/gmodule/Makefile.am
@@ -6,6 +6,8 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule \
EXTRA_DIST = \
makefile.mingw \
makefile.mingw.in \
+ makefile.msc \
+ makefile.msc.in \
gmoduleconf.h.in \
gmodule.def \
gmodule-dl.c \
@@ -58,6 +60,9 @@ gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gmodule/makefile.msc.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
index e127c0fd2..f90a2ced9 100644
--- a/gmodule/makefile.mingw.in
+++ b/gmodule/makefile.mingw.in
@@ -3,12 +3,13 @@
## Use: make -f makefile.mingw
-GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
-
TOP = ../..
include ../build/win32/make.mingw
+# Possibly override GLib version in build\win32\module.defs
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
################################################################
# Nothing much configurable below
diff --git a/gmodule/makefile.msc.in b/gmodule/makefile.msc.in
new file mode 100644
index 000000000..c9bfb17b2
--- /dev/null
+++ b/gmodule/makefile.msc.in
@@ -0,0 +1,48 @@
+## Makefile for building the gmodule dll with Microsoft C
+## Use: nmake -f makefile.msc install
+
+TOP = ..\..
+
+!INCLUDE $(TOP)\build\win32\make.msc
+
+# Possibly override GLib version in build\win32\module.defs
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+################################################################
+
+# Nothing much configurable below
+
+INCLUDES = -I .. -I .
+DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=g_log_domain_gmodule
+
+all : \
+ gmoduleconf.h \
+ gmodule-$(GLIB_VER).dll \
+ testgmodule.exe
+
+gmodule_OBJECTS = \
+ gmodule.obj
+
+gmoduleconf.h: gmoduleconf.h.win32
+ copy gmoduleconf.h.win32 gmoduleconf.h
+
+makefile.msc: makefile.msc.in
+ $(SED) -e s,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@, \
+ -e s,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@, <makefile.msc.in >$@
+
+gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule.def
+ $(CC) $(CFLAGS) -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) ..\glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule.def
+
+################ test prog
+
+testgmodule.exe : gmodule-$(GLIB_VER).dll testgmodule.obj libgplugin_a.dll libgplugin_b.dll
+ $(CC) $(CFLAGS) testgmodule.obj gmodule-$(GLIB_VER).lib ..\glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
+
+libgplugin_a.dll : libgplugin_a.obj
+ $(CC) $(CFLAGS) -LD libgplugin_a.obj gmodule-$(GLIB_VER).lib ..\glib-$(GLIB_VER).lib $(LDFLAGS)
+
+libgplugin_b.dll : libgplugin_b.obj
+ $(CC) $(CFLAGS) -LD libgplugin_b.obj gmodule-$(GLIB_VER).lib ..\glib-$(GLIB_VER).lib $(LDFLAGS)
+
+clean::
+ del gmoduleconf.h