+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
+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.
+
2000-10-05 Sebastian Wilhelmi <wilhelmi@ira.uka.de>
* glib.h: Changed alloca stuff a bit: when we have a working
if (win32_channel->data_avail_event == NULL)
create_events (win32_channel);
- fd->fd = win32_channel->data_avail_event;
+ fd->fd = (gint) win32_channel->data_avail_event;
fd->events = condition;
if (win32_channel->thread_id == 0)
g_node_first_sibling
g_node_get_root
g_node_insert
+ g_node_insert_after
g_node_insert_before
g_node_is_ancestor
g_node_last_child
# define closedir g_win32_closedir
# define NAME_MAX 255
-struct DIR
-{
- gchar *dir_name;
- gboolean just_opened;
- guint find_file_handle;
- gpointer find_file_data;
-};
-typedef struct DIR DIR;
struct dirent
{
gchar d_name[NAME_MAX + 1];
};
+
+struct DIR
+{
+ gchar *dir_name;
+ gboolean just_opened;
+ guint find_file_handle;
+ gpointer find_file_data;
+ struct dirent readdir_result;
+};
+typedef struct DIR DIR;
+
/* emulation functions */
extern int g_win32_ftruncate (gint f,
guint size);
if (win32_channel->data_avail_event == NULL)
create_events (win32_channel);
- fd->fd = win32_channel->data_avail_event;
+ fd->fd = (gint) win32_channel->data_avail_event;
fd->events = condition;
if (win32_channel->thread_id == 0)
g_node_first_sibling
g_node_get_root
g_node_insert
+ g_node_insert_after
g_node_insert_before
g_node_is_ancestor
g_node_last_child
# define closedir g_win32_closedir
# define NAME_MAX 255
-struct DIR
-{
- gchar *dir_name;
- gboolean just_opened;
- guint find_file_handle;
- gpointer find_file_data;
-};
-typedef struct DIR DIR;
struct dirent
{
gchar d_name[NAME_MAX + 1];
};
+
+struct DIR
+{
+ gchar *dir_name;
+ gboolean just_opened;
+ guint find_file_handle;
+ gpointer find_file_data;
+ struct dirent readdir_result;
+};
+typedef struct DIR DIR;
+
/* emulation functions */
extern int g_win32_ftruncate (gint f,
guint size);
struct dirent*
g_win32_readdir (DIR *dir)
{
- static struct dirent result;
gchar *basename;
g_return_val_if_fail (dir != NULL, NULL);
basename = g_path_get_basename (((LPWIN32_FIND_DATA) dir->find_file_data)->cFileName);
- strcpy (result.d_name, basename);
+ strcpy (dir->readdir_result.d_name, basename);
g_free (basename);
- return &result;
+ return &dir->readdir_result;
}
void
# should be in your PATH.
BIN = /bin
-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
-## Makefile for building the GLib, gmodule and gthread dlls with Microsoft C
+## Makefile for building the GLib dlls with Microsoft C
## Use: nmake -f makefile.msc install
# Change this to wherever you want to install the DLLs. This directory
# should be in your PATH.
BIN = C:\bin
-# This is the location of pthreads for Win32,
-# see http://sourceware.cygnus.com/pthreads-win32/
-# We want the 1999-05-30 snapshot.
-PTHREADS = ..\pthreads-snap-1999-05-30
-PTHREAD_LIB = $(PTHREADS)\pthread.lib
-PTHREAD_INC = -I $(PTHREADS)
+TOP = ..
-################################################################
-
-# Nothing much configurable below
+!INCLUDE $(TOP)\build\win32\make.msc
-!IFNDEF DEBUG
-# Full optimization:
-OPTIMIZE = -Ox -MD
-LINKDEBUG =
-!ELSE
-# Debugging:
-OPTIMIZE = -Zi -MDd
-LINKDEBUG = /debug
-!ENDIF
+# Possibly override GLib version in build\win32\module.defs
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
-# cl -? describes the options
-CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo
+################################################################
-# No general LDFLAGS needed
-LDFLAGS = /link $(LINKDEBUG)
-INSTALL = copy
+# Nothing much configurable below
-GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+INCLUDES = -I .
+DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
+DEPCFLAGS = $(LIBICONV_CFLAGS)
-CFLAGS = -I. -DHAVE_CONFIG_H
+DLLS_TO_BUILD = \
+ glib-$(GLIB_VER).dll \
+ sub-gmodule \
+ sub-gthread \
+ sub-gobject
all : \
- glibconfig.h \
config.h \
- glib-$(GLIB_VER).dll \
- gmodule\gmoduleconf.h \
- gmodule-$(GLIB_VER).dll \
- gthread-$(GLIB_VER).dll \
+ glibconfig.h \
+ $(DLLS_TO_BUILD) \
testglib.exe \
- testgmodule.exe \
testgdate.exe \
testgdateparser.exe
install : all
- $(INSTALL) glib-$(GLIB_VER).dll $(BIN)
- $(INSTALL) gmodule-$(GLIB_VER).dll $(BIN)
- $(INSTALL) gthread-$(GLIB_VER).dll $(BIN)
+ copy glib-$(GLIB_VER).dll $(BIN)
glib_OBJECTS = \
garray.obj \
gasyncqueue.obj \
+ gbacktrace.obj \
gcache.obj \
gcompletion.obj \
gdataset.obj \
gdate.obj \
gerror.obj \
+ gconvert.obj \
ghash.obj \
ghook.obj \
giochannel.obj \
gutils.obj \
gwin32.obj
-glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
- $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
-
glibconfig.h: glibconfig.h.win32
copy glibconfig.h.win32 glibconfig.h
config.h: config.h.win32
copy config.h.win32 config.h
-.c.obj :
- $(CC) $(CFLAGS) -GD -c -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $<
+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 >$@
-.c.i :
- $(CC) $(CFLAGS) -GD -E -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $< >$@
+################ glib
-gmodule_OBJECTS = \
- gmodule.obj
+glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
+ $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) $(LIBICONV_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
-gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule\gmodule.def
- $(CC) $(CFLAGS) -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule\gmodule.def
+################ subdirectories
-gmodule.obj : gmodule\gmodule.c gmodule\gmodule-win32.c
- $(CC) $(CFLAGS) -GD -Igmodule -c -DG_LOG_DOMAIN=g_log_domain_gmodule gmodule\gmodule.c
+sub-gmodule :
+ cd gmodule
+ -$(MAKE) -f makefile.msc all
+ cd ..
-gmodule\gmoduleconf.h: gmodule\gmoduleconf.h.win32
- copy gmodule\gmoduleconf.h.win32 gmodule\gmoduleconf.h
+sub-gthread :
+ cd gthread
+ -$(MAKE) -f makefile.msc all
+ cd ..
-gthread_OBJECTS = \
- gthread-impl.obj
+sub-gobject :
+ cd gobject
+ -$(MAKE) -f makefile.msc all
+ cd ..
-gthread-$(GLIB_VER).dll : $(gthread_OBJECTS) gthread\gthread.def
- $(CC) $(CFLAGS) -LD -Fegthread-$(GLIB_VER).dll $(gthread_OBJECTS) glib-$(GLIB_VER).lib $(PTHREAD_LIB) $(LDFLAGS) /def:gthread\gthread.def
+################ test progs
-gthread-impl.obj : gthread\gthread-impl.c gthread\gthread-posix.c
- $(CC) $(CFLAGS) -GD $(PTHREAD_INC) -DG_LOG_DOMAIN=\"GThread\" -c gthread\gthread-impl.c
+testglib.obj : testglib.c
+ $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" testglib.c
testglib.exe : glib-$(GLIB_VER).dll testglib.obj
$(CC) $(CFLAGS) -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-testglib.obj : testglib.c
- $(CC) -c $(CFLAGS) testglib.c
+testgdate.obj : testgdate.c
+ $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" testgdate.c
testgdate.exe : glib-$(GLIB_VER).dll testgdate.obj
$(CC) $(CFLAGS) -Fetestgdate.exe testgdate.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-testgdate.obj : testgdate.c
- $(CC) -c $(CFLAGS) testgdate.c
+testgdateparser.obj : testgdateparser.c
+ $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" testgdateparser.c
testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.obj
$(CC) $(CFLAGS) -Fetestgdateparser.exe testgdateparser.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-testgdateparser.obj : testgdateparser.c
- $(CC) -c $(CFLAGS) testgdateparser.c
-
-testgmodule.exe : glib-$(GLIB_VER).dll gmodule-$(GLIB_VER).dll testgmodule.obj libgplugin_a.dll libgplugin_b.dll
- $(CC) $(CFLAGS) testgmodule.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-
-testgmodule.obj : gmodule\testgmodule.c
- $(CC) $(CFLAGS) -Igmodule -c gmodule\testgmodule.c
-
-libgplugin_a.dll : libgplugin_a.obj
- $(CC) $(CFLAGS) -LD libgplugin_a.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS)
-
-libgplugin_a.obj : gmodule\libgplugin_a.c
- $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_a.c
-
-libgplugin_b.dll : libgplugin_b.obj
- $(CC) $(CFLAGS) -LD libgplugin_b.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS)
-
-libgplugin_b.obj : gmodule\libgplugin_b.c
- $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_b.c
+################ other stuff
-clean:
+clean::
del config.h
del glibconfig.h
- del gmodule\gmoduleconf.h
- del *.exe
- del *.obj
- del *.dll
- del *.lib
- del *.err
- del *.map
- del *.sym
- del *.exp
- del *.lk1
- del *.mk1
- del *.pdb
- del *.ilk
+ cd gmodule
+ $(MAKE) -f makefile.msc clean
+ cd ..
+ cd gthread
+ $(MAKE) -f makefile.msc clean
+ cd ..
+ cd gobject
+ $(MAKE) -f makefile.msc clean
+ cd ..
EXTRA_DIST = \
makefile.mingw \
makefile.mingw.in \
+ makefile.msc \
+ makefile.msc.in \
gmoduleconf.h.in \
gmodule.def \
gmodule-dl.c \
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:
## 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
--- /dev/null
+## 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
EXTRA_DIST += \
makefile.mingw \
makefile.mingw.in \
+ makefile.msc \
+ makefile.msc.in \
gobject.def \
gobject.rc \
gobject.rc.in
makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gobject/makefile.msc.in
+ cd $(top_builddir) && CONFIG_FILES=gobject/$@ CONFIG_HEADERS= $(SHELL) ./config.status
## 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
--- /dev/null
+## Makefile for building the gobject dll with Microsoft C
+## Use: nmake -f makefile.msc install
+
+TOP = ..\..
+
+!INCLUDE $(TOP)\build\win32\make.msc
+
+# Possibly override GLib version in build\win32\object.defs
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+################################################################
+
+# Nothing much configurable below
+
+INCLUDES = -I .. -I .
+DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_gobject
+
+all : \
+ gobject-$(GLIB_VER).dll
+
+gobject_OBJECTS = \
+ gvalue.obj \
+ gvaluetypes.obj \
+ gparam.obj \
+ gparamspecs.obj \
+ genums.obj \
+ gobject.obj \
+ gtype.obj
+
+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 >$@
+
+gobject-$(GLIB_VER).dll : $(gobject_OBJECTS) gobject.def
+ $(CC) $(CFLAGS) -LD -Fegobject-$(GLIB_VER).dll $(gobject_OBJECTS) ..\glib-$(GLIB_VER).lib $(LDFLAGS) /def:gobject.def
EXTRA_DIST = \
makefile.mingw \
makefile.mingw.in \
+ makefile.msc \
+ makefile.msc.in \
gthread-posix.c \
gthread-solaris.c \
gthread-none.c \
makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/gthread/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=gthread/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+makefile.msc: $(top_builddir)/config.status $(top_srcdir)/gthread/makefile.msc.in
+ cd $(top_builddir) && CONFIG_FILES=gthread/$@ CONFIG_HEADERS= $(SHELL) ./config.status
## 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
--- /dev/null
+## Makefile for building the gthread dll with Microsoft C
+## Use: nmake -f makefile.msc install
+
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+
+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=\"GThread\"
+DEPCFLAGS = $(PTHREAD_CFLAGS)
+
+all : \
+ gthread-$(GLIB_VER).dll
+
+gthread_OBJECTS = \
+ gthread-impl.obj
+
+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 >$@
+
+gthread-$(GLIB_VER).dll : $(gthread_OBJECTS) gthread.def
+ $(CC) $(CFLAGS) -LD -Fegthread-$(GLIB_VER).dll $(gthread_OBJECTS) ..\glib-$(GLIB_VER).lib $(PTHREAD_LIBS) $(LDFLAGS) /def:gthread.def
struct dirent*
g_win32_readdir (DIR *dir)
{
- static struct dirent result;
gchar *basename;
g_return_val_if_fail (dir != NULL, NULL);
basename = g_path_get_basename (((LPWIN32_FIND_DATA) dir->find_file_data)->cFileName);
- strcpy (result.d_name, basename);
+ strcpy (dir->readdir_result.d_name, basename);
g_free (basename);
- return &result;
+ return &dir->readdir_result;
}
void
# should be in your PATH.
BIN = /bin
-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
-## Makefile for building the GLib, gmodule and gthread dlls with Microsoft C
+## Makefile for building the GLib dlls with Microsoft C
## Use: nmake -f makefile.msc install
# Change this to wherever you want to install the DLLs. This directory
# should be in your PATH.
BIN = C:\bin
-# This is the location of pthreads for Win32,
-# see http://sourceware.cygnus.com/pthreads-win32/
-# We want the 1999-05-30 snapshot.
-PTHREADS = ..\pthreads-snap-1999-05-30
-PTHREAD_LIB = $(PTHREADS)\pthread.lib
-PTHREAD_INC = -I $(PTHREADS)
+TOP = ..
-################################################################
-
-# Nothing much configurable below
+!INCLUDE $(TOP)\build\win32\make.msc
-!IFNDEF DEBUG
-# Full optimization:
-OPTIMIZE = -Ox -MD
-LINKDEBUG =
-!ELSE
-# Debugging:
-OPTIMIZE = -Zi -MDd
-LINKDEBUG = /debug
-!ENDIF
+# Possibly override GLib version in build\win32\module.defs
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
-# cl -? describes the options
-CC = cl -G5 -GF $(OPTIMIZE) -W3 -nologo
+################################################################
-# No general LDFLAGS needed
-LDFLAGS = /link $(LINKDEBUG)
-INSTALL = copy
+# Nothing much configurable below
-GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+INCLUDES = -I .
+DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
+DEPCFLAGS = $(LIBICONV_CFLAGS)
-CFLAGS = -I. -DHAVE_CONFIG_H
+DLLS_TO_BUILD = \
+ glib-$(GLIB_VER).dll \
+ sub-gmodule \
+ sub-gthread \
+ sub-gobject
all : \
- glibconfig.h \
config.h \
- glib-$(GLIB_VER).dll \
- gmodule\gmoduleconf.h \
- gmodule-$(GLIB_VER).dll \
- gthread-$(GLIB_VER).dll \
+ glibconfig.h \
+ $(DLLS_TO_BUILD) \
testglib.exe \
- testgmodule.exe \
testgdate.exe \
testgdateparser.exe
install : all
- $(INSTALL) glib-$(GLIB_VER).dll $(BIN)
- $(INSTALL) gmodule-$(GLIB_VER).dll $(BIN)
- $(INSTALL) gthread-$(GLIB_VER).dll $(BIN)
+ copy glib-$(GLIB_VER).dll $(BIN)
glib_OBJECTS = \
garray.obj \
gasyncqueue.obj \
+ gbacktrace.obj \
gcache.obj \
gcompletion.obj \
gdataset.obj \
gdate.obj \
gerror.obj \
+ gconvert.obj \
ghash.obj \
ghook.obj \
giochannel.obj \
gutils.obj \
gwin32.obj
-glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
- $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
-
glibconfig.h: glibconfig.h.win32
copy glibconfig.h.win32 glibconfig.h
config.h: config.h.win32
copy config.h.win32 config.h
-.c.obj :
- $(CC) $(CFLAGS) -GD -c -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $<
+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 >$@
-.c.i :
- $(CC) $(CFLAGS) -GD -E -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $< >$@
+################ glib
-gmodule_OBJECTS = \
- gmodule.obj
+glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
+ $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) $(LIBICONV_LIBS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def
-gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule\gmodule.def
- $(CC) $(CFLAGS) -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule\gmodule.def
+################ subdirectories
-gmodule.obj : gmodule\gmodule.c gmodule\gmodule-win32.c
- $(CC) $(CFLAGS) -GD -Igmodule -c -DG_LOG_DOMAIN=g_log_domain_gmodule gmodule\gmodule.c
+sub-gmodule :
+ cd gmodule
+ -$(MAKE) -f makefile.msc all
+ cd ..
-gmodule\gmoduleconf.h: gmodule\gmoduleconf.h.win32
- copy gmodule\gmoduleconf.h.win32 gmodule\gmoduleconf.h
+sub-gthread :
+ cd gthread
+ -$(MAKE) -f makefile.msc all
+ cd ..
-gthread_OBJECTS = \
- gthread-impl.obj
+sub-gobject :
+ cd gobject
+ -$(MAKE) -f makefile.msc all
+ cd ..
-gthread-$(GLIB_VER).dll : $(gthread_OBJECTS) gthread\gthread.def
- $(CC) $(CFLAGS) -LD -Fegthread-$(GLIB_VER).dll $(gthread_OBJECTS) glib-$(GLIB_VER).lib $(PTHREAD_LIB) $(LDFLAGS) /def:gthread\gthread.def
+################ test progs
-gthread-impl.obj : gthread\gthread-impl.c gthread\gthread-posix.c
- $(CC) $(CFLAGS) -GD $(PTHREAD_INC) -DG_LOG_DOMAIN=\"GThread\" -c gthread\gthread-impl.c
+testglib.obj : testglib.c
+ $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" testglib.c
testglib.exe : glib-$(GLIB_VER).dll testglib.obj
$(CC) $(CFLAGS) -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-testglib.obj : testglib.c
- $(CC) -c $(CFLAGS) testglib.c
+testgdate.obj : testgdate.c
+ $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" testgdate.c
testgdate.exe : glib-$(GLIB_VER).dll testgdate.obj
$(CC) $(CFLAGS) -Fetestgdate.exe testgdate.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-testgdate.obj : testgdate.c
- $(CC) -c $(CFLAGS) testgdate.c
+testgdateparser.obj : testgdateparser.c
+ $(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" testgdateparser.c
testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.obj
$(CC) $(CFLAGS) -Fetestgdateparser.exe testgdateparser.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-testgdateparser.obj : testgdateparser.c
- $(CC) -c $(CFLAGS) testgdateparser.c
-
-testgmodule.exe : glib-$(GLIB_VER).dll gmodule-$(GLIB_VER).dll testgmodule.obj libgplugin_a.dll libgplugin_b.dll
- $(CC) $(CFLAGS) testgmodule.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
-
-testgmodule.obj : gmodule\testgmodule.c
- $(CC) $(CFLAGS) -Igmodule -c gmodule\testgmodule.c
-
-libgplugin_a.dll : libgplugin_a.obj
- $(CC) $(CFLAGS) -LD libgplugin_a.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS)
-
-libgplugin_a.obj : gmodule\libgplugin_a.c
- $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_a.c
-
-libgplugin_b.dll : libgplugin_b.obj
- $(CC) $(CFLAGS) -LD libgplugin_b.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS)
-
-libgplugin_b.obj : gmodule\libgplugin_b.c
- $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_b.c
+################ other stuff
-clean:
+clean::
del config.h
del glibconfig.h
- del gmodule\gmoduleconf.h
- del *.exe
- del *.obj
- del *.dll
- del *.lib
- del *.err
- del *.map
- del *.sym
- del *.exp
- del *.lk1
- del *.mk1
- del *.pdb
- del *.ilk
+ cd gmodule
+ $(MAKE) -f makefile.msc clean
+ cd ..
+ cd gthread
+ $(MAKE) -f makefile.msc clean
+ cd ..
+ cd gobject
+ $(MAKE) -f makefile.msc clean
+ cd ..
## Makefile for building the GLib test programs with Microsoft C
## Use: nmake -f makefile.msc check
-################################################################
+TOP = ..\..
-# Nothing much configurable below
+!INCLUDE $(TOP)\build\win32\make.msc
-# cl -? describes the options
-CC = cl -G5 -GF -Ox -W3 -MD -nologo
+# Possibly override GLib version in build\win32\module.defs
+GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
-# No general LDFLAGS needed
-LDFLAGS = /link
+################################################################
-GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
+# Nothing much configurable below
-CFLAGS = -I.. -DHAVE_CONFIG_H
+INCLUDES = -I..
+DEFINES = -DHAVE_CONFIG_H
TESTS = \
array-test.exe \
rand-test.exe \
relation-test.exe\
slist-test.exe \
- strfunc-test.exe\
+# strfunc-test.exe\
string-test.exe \
thread-test.exe \
threadpool-test.exe\
all : $(TESTS)
+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 >$@
+
.c.exe :
$(CC) $(CFLAGS) -c $<
- $(CC) $(CFLAGS) -Fe$@ $< ..\glib-$(GLIB_VER).lib ..\gthread-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
+ $(CC) $(CFLAGS) -Fe$@ $< ..\glib-$(GLIB_VER).lib ..\gmodule\gmodule-$(GLIB_VER).lib ..\gthread\gthread-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console
check: all
for %p in ($(TESTS)) do %p
-
-clean:
- del *.exe
- del *.obj
- del *.dll
- del *.lib
- del *.err
- del *.map
- del *.sym
- del *.exp
- del *.pdb