Commit 74b4d8c2 authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

After being away for about five months, I'm back working on this... For

2001-08-30  Tor Lillqvist  <tml@iki.fi>

	After being away for about five months, I'm back working on
	this...  For now, still using same build setup for Win32. Probably
	will change to not including version numbers in the import library
	names, though. (But the DLL names would still include them,
	possibly even also the micro version number.) That would be more
	Unix-like. Also, will have to check out newest mingw tool versions
	to see if the build-dll script now can be retired.

	* makefile.mingw
	* makefile.msc: New files, no need to generate from .in as
	they don't contain references to automake variables.

	* makefile.mingw.in
	* makefile.msc.in: Removed.

	* glib.rc.in: Remove
	* glib/glib.rc.in: Moved here.

	* Makefile.am
	* glib/Makefile.am: Corresponding changes.

	* glib/glib.def: Fix typo, add new entries.

	* glib/gspawn-win32-helper.c: More debugging. Doesn't work
	currently (or then it never has on Win2k, which I now use?)

	* glib/gstrfuncs.c
	* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.

	* */makefile.mingw.in: Reflect new location of glib library.
parent 66529cef
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
2001-08-30 Tor Lillqvist <tml@iki.fi>
After being away for about five months, I'm back working on
this... For now, still using same build setup for Win32. Probably
will change to not including version numbers in the import library
names, though. (But the DLL names would still include them,
possibly even also the micro version number.) That would be more
Unix-like. Also, will have to check out newest mingw tool versions
to see if the build-dll script now can be retired.
* makefile.mingw
* makefile.msc: New files, no need to generate from .in as
they don't contain references to automake variables.
* makefile.mingw.in
* makefile.msc.in: Removed.
* glib.rc.in: Remove
* glib/glib.rc.in: Moved here.
* Makefile.am
* glib/Makefile.am: Corresponding changes.
* glib/glib.def: Fix typo, add new entries.
* glib/gspawn-win32-helper.c: More debugging. Doesn't work
currently (or then it never has on Win2k, which I now use?)
* glib/gstrfuncs.c
* glib/gstrfuncs.h: Mark g_ascii_table for export/import on Win32.
* */makefile.mingw.in: Reflect new location of glib library.
2001-08-30 Michael Natterer <mitch@gimp.org>
* glib/giochannel.h: (struct GIOChannel): "gboolean foo : 1"
......
......@@ -15,12 +15,11 @@ EXTRA_DIST = \
sanity_check \
README.win32 \
TODO.xml \
makefile.msc.in \
makefile.mingw.in \
makefile.msc \
makefile.mingw \
glibconfig.h.win32.in \
config.h.win32.in \
build-dll \
glib.rc.in \
glib-2.0.pc.in \
gobject-2.0.pc.in \
gmodule-2.0.pc.in \
......@@ -32,8 +31,6 @@ EXTRA_DIST = \
# These may be in the builddir too
BUILT_EXTRA_DIST = \
makefile.msc \
makefile.mingw \
glibconfig.h.win32 \
config.h.win32 \
glib.rc \
......@@ -70,12 +67,6 @@ glibconfig.h.win32: $(top_builddir)/config.status $(top_srcdir)/glibconfig.h.win
config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
......
......@@ -7,6 +7,12 @@ EXTRA_DIST = \
gen-unicode-tables.pl \
glib.def
# These may be in the builddir too
BUILT_EXTRA_DIST = \
makefile.msc \
makefile.mingw \
glib.rc
lib_LTLIBRARIES = libglib-1.3.la
libglib_1_3_la_SOURCES = \
......
......@@ -12,10 +12,15 @@ EXPORTS
g_array_sized_new
g_array_sort
g_array_sort_with_data
g_ascii_digit_value
g_ascii_strcasecmp
g_ascii_strncasecmp
g_ascii_strdown
g_ascii_strup
g_ascii_table
g_ascii_tolower
g_ascii_toupper
g_ascii_xdigit_value
g_async_queue_length
g_async_queue_length_unlocked
g_async_queue_lock
......@@ -194,7 +199,7 @@ EXPORTS
g_io_channel_get_buffer_condition
g_io_channel_get_buffer_size
g_io_channel_get_buffered
g_io_channel_get_close_of_unref
g_io_channel_get_close_on_unref
g_io_channel_get_encoding
g_io_channel_get_flags
g_io_channel_get_line_term
......@@ -211,7 +216,7 @@ EXPORTS
g_io_channel_seek_position
g_io_channel_set_buffer_size
g_io_channel_set_buffered
g_io_channel_set_close_of_unref
g_io_channel_set_close_on_unref
g_io_channel_set_encoding
g_io_channel_set_flags
g_io_channel_set_line_term
......@@ -338,6 +343,7 @@ EXPORTS
g_node_reverse_children
g_node_traverse
g_node_unlink
g_nullify_pointer
g_on_error_query
g_on_error_stack_trace
g_parse_debug_string
......@@ -433,6 +439,7 @@ EXPORTS
g_set_print_handler
g_set_printerr_handler
g_set_warning_handler
g_shell_error_quark
g_shell_parse_argv
g_shell_quote
g_shell_unquote
......@@ -562,6 +569,9 @@ EXPORTS
g_strreverse
g_strsignal
g_strsplit
g_strrstr
g_strrstr_len
g_strstr_len
g_strtod
g_strup
g_thread_create_full
......
......@@ -24,12 +24,23 @@
#define GSPAWN_HELPER
#include "gspawn-win32.c" /* For shared definitions */
static GString *debugstring;
static void
write_err_and_exit (gint fd,
gint msg)
{
gint en = errno;
if (debug)
{
debugstring = g_string_new ("");
g_string_append (debugstring,
g_strdup_printf ("writing error code %d and errno %d",
msg, en));
MessageBox (NULL, debugstring->str, "gspawn-win32-helper", 0);
}
write (fd, &msg, sizeof(msg));
write (fd, &en, sizeof(en));
......@@ -59,7 +70,7 @@ WinMain (struct HINSTANCE__ *hInstance,
int i;
int fd;
int mode;
GString *debugstring;
gint zero = 0;
SETUP_DEBUG();
......@@ -212,7 +223,9 @@ WinMain (struct HINSTANCE__ *hInstance,
if (spawnv (mode, __argv[ARG_PROGRAM], __argv+ARG_PROGRAM) < 0)
write_err_and_exit (child_err_report_fd, CHILD_SPAWN_FAILED);
}
write (child_err_report_fd, &zero, sizeof (zero));
write (child_err_report_fd, &zero, sizeof (zero));
Sleep (10000);
return 0;
}
......@@ -32,13 +32,10 @@
* Thus, we must in most cases use a helper program to handle closing
* of (inherited) file descriptors and changing of directory. In fact,
* we do it all the time.
*
* This source file contains the source for that helper program.
* To compile it, #define GSPAWN_HELPER.
*/
/* Define this to get some logging all the time */
/* #define G_SPAWN_WIN32_DEBUG */
#define G_SPAWN_WIN32_DEBUG
#include "glib.h"
......
......@@ -53,6 +53,9 @@
* inteferes with g_strsignal() on some OSes
*/
#if defined(G_PLATFORM_WIN32) && defined(__GNUC__)
__declspec(dllexport)
#endif
const guint16 g_ascii_table[256] = {
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004,
0x004, 0x104, 0x104, 0x004, 0x104, 0x104, 0x004, 0x004,
......
......@@ -47,7 +47,7 @@ typedef enum {
G_ASCII_XDIGIT = 1 << 10
} GAsciiType;
extern const guint16 g_ascii_table[256];
GLIB_VAR const guint16 g_ascii_table[256];
#define g_ascii_isalnum(c) \
((g_ascii_table[(guchar) (c)] & G_ASCII_ALNUM) != 0)
......
......@@ -83,11 +83,11 @@ endif
################ glib
#glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
# ./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
dllwrap --mno-cygwin --dllname glib-$(GLIB_VER).dll --implib glib-$(GLIB_VER).lib --def glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
../build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
#glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
# dllwrap --mno-cygwin --dllname glib-$(GLIB_VER).dll --implib glib-$(GLIB_VER).lib --def glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
gspawn-win32-helper.exe : gspawn-win32-helper.c
$(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
......
......@@ -94,4 +94,4 @@ gspawn-win32-helper.exe : gspawn-win32-helper.c glib-$(GLIB_VER).dll
clean::
del ..\config.h
del glibconfig.h
del ..\glibconfig.h
......@@ -14,7 +14,7 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
# Nothing much configurable below
INCLUDES = -I .. -I .
INCLUDES = -I .. -I ../glib -I .
DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" -DG_ENABLE_DEBUG
BUILD_DLL = ../build-dll
......@@ -37,7 +37,7 @@ gmoduleconf.h: gmoduleconf.h.win32
cp $< $@
gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule.def
$(BUILD_DLL) gmodule $(GLIB_VER) gmodule.def $(gmodule_OBJECTS) -L .. -lglib-$(GLIB_VER)
$(BUILD_DLL) gmodule $(GLIB_VER) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib-$(GLIB_VER)
################ test prog
......@@ -45,14 +45,14 @@ testgmodule.exe : gmodule-$(GLIB_VER).dll testgmodule.o libgplugin_a.dll libgplu
# 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)
$(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base -o testgmodule.exe testgmodule.o -L ../glib -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)
$(CC) $(CFLAGS) -Wl,--base-file,testgmodule.base,testgmodule.exp -o testgmodule.exe testgmodule.o -L ../glib -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)
$(CC) $(CFLAGS) -Wl,testgmodule.exp -o testgmodule.exe testgmodule.o -L ../glib -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)
$(BUILD_DLL) libgplugin_a - - libgplugin_a.o -L ../glib -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)
$(BUILD_DLL) libgplugin_b - - libgplugin_b.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
......@@ -14,7 +14,7 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
# Nothing much configurable below
INCLUDES = -I .. -I .
INCLUDES = -I .. -I ../glib -I .
DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=g_log_domain_gruntime -DG_ENABLE_DEBUG
srcdir=.
......
......@@ -14,7 +14,7 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
# Nothing much configurable below
INCLUDES = -I .. -I .
INCLUDES = -I .. -I ../glib -I .
DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GThread\" -DG_ENABLE_DEBUG
BUILD_DLL = ../build-dll
......@@ -32,4 +32,4 @@ gthread_OBJECTS = \
gthread-impl.o
gthread-$(GLIB_VER).dll : $(gthread_OBJECTS) gthread.def
$(BUILD_DLL) gthread $(GLIB_VER) gthread.def $(gthread_OBJECTS) -L .. -lglib-$(GLIB_VER)
$(BUILD_DLL) gthread $(GLIB_VER) gthread.def $(gthread_OBJECTS) -L ../glib -lglib-$(GLIB_VER)
## Makefile for building the GLib DLLs with gcc for mingw. The build
## uses tools running on cygwin, however.
## Use: make -f makefile.mingw
PARTS=glib gmodule gthread gobject tests
all :
for D in $(PARTS); do (cd $$D && $(MAKE) -f makefile.mingw all); done
clean :
for D in $(PARTS); do (cd $$D && $(MAKE) -f makefile.mingw clean); done
## Makefile for building the GLib DLL with gcc for mingw. The build
## uses tools running on cygwin, however.
## Use: make -f makefile.mingw
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
INCLUDES = -I .
DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib -DG_ENABLE_DEBUG -DDLL_EXPORT
DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
DLLS_TO_BUILD = \
glib-$(GLIB_VER).dll \
sub-gmodule \
sub-gthread \
sub-gobject
all : \
config.h \
glibconfig.h \
$(DLLS_TO_BUILD) \
gspawn-win32-helper.exe \
testglib.exe \
testgdate.exe \
testgdateparser.exe
glib_OBJECTS = \
garray.o \
gasyncqueue.o \
gbacktrace.o \
gcache.o \
gcompletion.o \
gconvert.o \
gdataset.o \
gdate.o \
gerror.o \
gfileutils.o \
ghash.o \
ghook.o \
giochannel.o \
giowin32.o \
glist.o \
gmain.o \
gmarkup.o \
gmem.o \
gmessages.o \
gnode.o \
gpattern.o \
gprimes.o \
gqsort.o \
gqueue.o \
grand.o \
grel.o \
gscanner.o \
gshell.o \
gslist.o \
gspawn-win32.o \
gstrfuncs.o \
gstring.o \
gthread.o \
gthreadpool.o \
gtimer.o \
gtree.o \
gunibreak.o \
gunidecomp.o \
guniprop.o \
gutf8.o \
gutils.o \
gwin32.o
glibconfig.h: glibconfig.h.win32
cp $< $@
config.h: config.h.win32
cp $< $@
ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
makefile.mingw: makefile.mingw.in
sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
-e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
endif
################ glib
glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(INTL_LIBS) $(LIBICONV_LIBS) -luser32 -lwsock32
gspawn-win32-helper.exe : gspawn-win32-helper.c
$(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
################ subdirectories
sub-gmodule :
cd gmodule && $(MAKE) -f makefile.mingw all
sub-gthread :
cd gthread && $(MAKE) -f makefile.mingw all
sub-gobject :
cd gobject && $(MAKE) -f makefile.mingw all
################ test progs
testglib.o : testglib.c
$(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
testglib.exe : glib-$(GLIB_VER).dll testglib.o
$(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
testgdate.o : testgdate.c
$(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
$(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
testgdateparser.o : testgdateparser.c
$(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
$(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
################ other stuff
clean::
-rm config.h glibconfig.h gmodule/gmoduleconf.h
## Makefile for building the GLib dlls with Microsoft C
## Use: nmake -f makefile.msc
TOP = ..
!INCLUDE $(TOP)\build\win32\make.msc
PARTS = glib gmodule gthread gobject tests
all : \
......@@ -12,15 +8,17 @@ all : \
sub-all
sub-all:
for %d in ($(PARTS)) do nmake -nologo -f makefile.msc sub-one THIS=%d
for %d in ($(PARTS)) do nmake -nologo -f makefile.msc sub-one THIS=%d TARGET=all
clean : sub-clean
sub-clean:
for %d in ($(PARTS)) do nmake -nologo -f makefile.msc sub-one THIS=%d TARGET=clean
sub-one:
@cd $(THIS)
@nmake -nologo -f makefile.msc
@nmake -nologo -f makefile.msc $(TARGET)
@cd ..
config.h: config.h.win32
copy config.h.win32 config.h
glibconfig.h: glibconfig.h.win32
copy glibconfig.h.win32 glibconfig.h
......@@ -12,12 +12,15 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
# Nothing much configurable below
INCLUDES = -I .. -I ../gmodule
INCLUDES = -I .. -I ../glib -I ../gmodule
DEFINES = -DHAVE_CONFIG_H
BUILD_DLL = ../build-dll
TESTS = \
testglib.exe \
testgdate.exe \
testgdateparser.exe \
array-test.exe \
date-test.exe \
dirname-test.exe\
......@@ -41,10 +44,12 @@ TESTS = \