Commit 77866eaf authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

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.
parent c74c6c91
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
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.
Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org> Thu May 4 02:04:46 2000 Tim Janik <timj@gtk.org>
* configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are * configure.in (STRIP_DUMMY): some Make 3.79 $(strip ) versions are
......
...@@ -19,8 +19,8 @@ EXTRA_DIST = \ ...@@ -19,8 +19,8 @@ EXTRA_DIST = \
glib.def \ glib.def \
makefile.msc \ makefile.msc \
makefile.msc.in \ makefile.msc.in \
makefile.cygwin \ makefile.mingw \
makefile.cygwin.in \ makefile.mingw.in \
giowin32.c \ giowin32.c \
glibconfig.h.win32 \ glibconfig.h.win32 \
glibconfig.h.win32.in \ glibconfig.h.win32.in \
...@@ -107,7 +107,7 @@ config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in ...@@ -107,7 +107,7 @@ config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
makefile.cygwin: $(top_builddir)/config.status $(top_srcdir)/makefile.cygwin.in makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
......
...@@ -4,9 +4,9 @@ General ...@@ -4,9 +4,9 @@ General
For more information about the port or GLib, GTk+ and the GIMP to For more information about the port or GLib, GTk+ and the GIMP to
native Windows, and pre-built binary packages, see native Windows, and pre-built binary packages, see
http://www.iki.fi/tml/gimp/win32/ . "Native" means that we use the http://www.iki.fi/tml/gimp/win32/ . "Native" means that we use the
Win32 API only, and not any POSIX emulation layer except that provided Win32 API only, and not any POSIX operating system emulation layer
by the Microsoft runtime C library. Additionally, a pthreads emulation except that provided by the Microsoft runtime C library. Additionally,
library is used. a pthreads emulation library is used.
To build GLib on Win32, you can use either the Microsoft compiler and To build GLib on Win32, you can use either the Microsoft compiler and
tools, or gcc. Both the compiler from MSVC 5.0 and from MSVC 6.0 have tools, or gcc. Both the compiler from MSVC 5.0 and from MSVC 6.0 have
...@@ -18,7 +18,7 @@ and .dll files) that do *not* require the cygwin runtime library. This ...@@ -18,7 +18,7 @@ and .dll files) that do *not* require the cygwin runtime library. This
is called "mingw". is called "mingw".
To test the GLib functions, go to the tests subdirectory and enter To test the GLib functions, go to the tests subdirectory and enter
`nmake -f makefile.msc check` or `make -f makefile.cygwin check`. `nmake -f makefile.msc check` or `make -f makefile.mingw check`.
If you would want to use the cygwin tools to generate executables that If you would want to use the cygwin tools to generate executables that
*do* use the cygwin runtime, the normal Unix configuration method *do* use the cygwin runtime, the normal Unix configuration method
...@@ -69,7 +69,7 @@ Before building you must get the pthreads library for Win32 from ...@@ -69,7 +69,7 @@ Before building you must get the pthreads library for Win32 from
http://sourceware.cygnus.com/pthreads-win32/. The pthreads-win32 http://sourceware.cygnus.com/pthreads-win32/. The pthreads-win32
snapshot from 1999-05-30 is the one that should be used. Edit the snapshot from 1999-05-30 is the one that should be used. Edit the
location of the pthreads library and include files in makefile.msc or location of the pthreads library and include files in makefile.msc or
makefile.cygwin. The pthreads distribution includes the precompiled dll makefile.mingw. The pthreads distribution includes the precompiled dll
and import libraries both for MSVC and gcc. and import libraries both for MSVC and gcc.
The pthreads for Win32 package that the thread support uses supposedly The pthreads for Win32 package that the thread support uses supposedly
...@@ -80,8 +80,8 @@ Where are the makefiles? ...@@ -80,8 +80,8 @@ Where are the makefiles?
======================== ========================
If you are building from a CVS snapshot, you will not have any If you are building from a CVS snapshot, you will not have any
makefile.msc or makefile.cygwin file. You should copy the makefile.msc or makefile.mingw file. You should copy the
corresponding makefile.msc.in or makefile.cygwin.in file to that name, corresponding makefile.msc.in or makefile.mingw.in file to that name,
and edit the line that sets GLIB_VER to the correct version number. and edit the line that sets GLIB_VER to the correct version number.
This is done automatically when an official distribution package is This is done automatically when an official distribution package is
...@@ -355,7 +355,7 @@ diff -ru2 ./w32api/include/wingdi.h ../../src/mingw-runtime-19991107/w32api/incl ...@@ -355,7 +355,7 @@ diff -ru2 ./w32api/include/wingdi.h ../../src/mingw-runtime-19991107/w32api/incl
5) Whew. That hopefully should be it. 5) Whew. That hopefully should be it.
Next, go back to the GLib directory and build using `make -f Next, go back to the GLib directory and build using `make -f
makefile.cygwin`. Building the dlls uses the script build-dll which makefile.mingw`. Building the dlls uses the script build-dll which
is somewhat of a hack. But I couldn't get things working in a cleaner is somewhat of a hack. But I couldn't get things working in a cleaner
way. way.
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
# Temporary hack until building dlls is easier with gcc -mno-cygwin # Temporary hack until building dlls is easier with gcc -mno-cygwin
# ("mingw32"). # ("mingw32").
# This is usable with cygwin b20.1 and egcs-2.91.66 19990314 # This is usable with cygwin b20.1 and gcc-2.95.2 as distributed by
# (egcs-1.1.2 release) or gcc-2.95(.2) as distributed by Mumit Khan. For # Mumit Khan. For other combinations, no idea.
# other combinations, no idea.
GCC="gcc" GCC="gcc"
DLLTOOL="dlltool" DLLTOOL="dlltool"
...@@ -29,6 +28,35 @@ for F in $ldargs; do ...@@ -29,6 +28,35 @@ for F in $ldargs; do
esac esac
done done
# Check if we have a resource file for this DLL.
resfile=""
if [ -f $library.rc ]; then
# Kludge to get the path to the win32 headers. Should work for both
# gcc running on cygwin, and bare mingw gcc, even if the make is
# running on cygwin (whew).
WIN32APIHEADERS=`echo "\#include <winver.h>" | $GCC -M -E - | tail -1 | sed -e 's![\\/]winver.h!!' | tr -d '\015'`
resfile=$library-win32res.o
objs="$objs $resfile"
# Check if we have a build number stamp file.
if [ -f $library-build.stamp ]; then
read number <$library-build.stamp
buildnumber=$[number+1]
echo Build number is $buildnumber
echo $buildnumber >$library-build.stamp
else
echo Using zero as build number
buildnumber=0
fi
m4 -DBUILDNUMBER=$buildnumber <$library.rc >$library-win32res.rc
windres --include-dir $WIN32APIHEADERS $library-win32res.rc $library-win32res.o
rm $library-win32res.rc
fi
# Build the DLL.
$GCC -mdll -mno-cygwin -Wl,--base-file,$library.base -o $dllfile $ldargs && $GCC -mdll -mno-cygwin -Wl,--base-file,$library.base -o $dllfile $ldargs &&
$DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs && $DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs &&
$GCC -mdll -mno-cygwin -Wl,--base-file,$library.base,$library.exp -o $dllfile $ldargs && $GCC -mdll -mno-cygwin -Wl,--base-file,$library.base,$library.exp -o $dllfile $ldargs &&
......
...@@ -370,6 +370,7 @@ EXPORTS ...@@ -370,6 +370,7 @@ EXPORTS
g_static_rw_lock_writer_unlock g_static_rw_lock_writer_unlock
g_str_equal g_str_equal
g_str_hash g_str_hash
g_strcanon
g_strcasecmp g_strcasecmp
g_strchomp g_strchomp
g_strchug g_strchug
......
...@@ -74,6 +74,17 @@ ...@@ -74,6 +74,17 @@
*/ */
#include <glibconfig.h> #include <glibconfig.h>
/* Define some mathematical constants that aren't available
* symbolically in some strict ISO C implementations.
*/
#define G_E 2.7182818284590452354E0
#define G_LN2 6.9314718055994530942E-1
#define G_LN10 2.3025850929940456840E0
#define G_PI 3.14159265358979323846E0
#define G_PI_2 1.57079632679489661923E0
#define G_PI_4 0.78539816339744830962E0
#define G_SQRT2 1.4142135623730950488E0
/* include varargs functions for assertment macros /* include varargs functions for assertment macros
*/ */
#include <stdarg.h> #include <stdarg.h>
......
...@@ -19,8 +19,8 @@ EXTRA_DIST = \ ...@@ -19,8 +19,8 @@ EXTRA_DIST = \
glib.def \ glib.def \
makefile.msc \ makefile.msc \
makefile.msc.in \ makefile.msc.in \
makefile.cygwin \ makefile.mingw \
makefile.cygwin.in \ makefile.mingw.in \
giowin32.c \ giowin32.c \
glibconfig.h.win32 \ glibconfig.h.win32 \
glibconfig.h.win32.in \ glibconfig.h.win32.in \
...@@ -107,7 +107,7 @@ config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in ...@@ -107,7 +107,7 @@ config.h.win32: $(top_builddir)/config.status $(top_srcdir)/config.h.win32.in
makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in makefile.msc: $(top_builddir)/config.status $(top_srcdir)/makefile.msc.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
makefile.cygwin: $(top_builddir)/config.status $(top_srcdir)/makefile.cygwin.in makefile.mingw: $(top_builddir)/config.status $(top_srcdir)/makefile.mingw.in
cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in glib.rc: $(top_builddir)/config.status $(top_srcdir)/glib.rc.in
......
...@@ -370,6 +370,7 @@ EXPORTS ...@@ -370,6 +370,7 @@ EXPORTS
g_static_rw_lock_writer_unlock g_static_rw_lock_writer_unlock
g_str_equal g_str_equal
g_str_hash g_str_hash
g_strcanon
g_strcasecmp g_strcasecmp
g_strchomp g_strchomp
g_strchug g_strchug
......
...@@ -74,6 +74,17 @@ ...@@ -74,6 +74,17 @@
*/ */
#include <glibconfig.h> #include <glibconfig.h>
/* Define some mathematical constants that aren't available
* symbolically in some strict ISO C implementations.
*/
#define G_E 2.7182818284590452354E0
#define G_LN2 6.9314718055994530942E-1
#define G_LN10 2.3025850929940456840E0
#define G_PI 3.14159265358979323846E0
#define G_PI_2 1.57079632679489661923E0
#define G_PI_4 0.78539816339744830962E0
#define G_SQRT2 1.4142135623730950488E0
/* include varargs functions for assertment macros /* include varargs functions for assertment macros
*/ */
#include <stdarg.h> #include <stdarg.h>
......
...@@ -657,12 +657,10 @@ g_tree_node_height (GTreeNode *node) ...@@ -657,12 +657,10 @@ g_tree_node_height (GTreeNode *node)
static GTreeNode* static GTreeNode*
g_tree_node_rotate_left (GTreeNode *node) g_tree_node_rotate_left (GTreeNode *node)
{ {
GTreeNode *left;
GTreeNode *right; GTreeNode *right;
gint a_bal; gint a_bal;
gint b_bal; gint b_bal;
left = node->left;
right = node->right; right = node->right;
node->right = right->left; node->right = right->left;
......
...@@ -101,7 +101,6 @@ g_win32_opendir (const char *dirname) ...@@ -101,7 +101,6 @@ g_win32_opendir (const char *dirname)
if (k && result->dir_name[k - 1] == '\\') if (k && result->dir_name[k - 1] == '\\')
{ {
result->dir_name[k - 1] = '\0'; result->dir_name[k - 1] = '\0';
k--;
} }
mask = g_strdup_printf ("%s\\*", result->dir_name); mask = g_strdup_printf ("%s\\*", result->dir_name);
......
## Makefile for building the GLib DLL with gcc for mingw. The build
## uses tools running on cygwin, however.
## Use: make -f makefile.mingw
# Change this to wherever you want to install the DLLs. This directory
# should be in your PATH.
BIN = /bin
GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
TOP = ..
include $(TOP)/build/win32/make.mingw
################################################################
# Nothing much configurable below
INCLUDES = -I .
DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
DLLS_TO_BUILD = \
glib-$(GLIB_VER).dll \
gmodule/gmodule-$(GLIB_VER).dll \
gthread/gthread-$(GLIB_VER).dll \
gobject/gobject-$(GLIB_VER).dll \
all : \
config.h \
glibconfig.h \
$(DLLS_TO_BUILD) \
testglib.exe \
testgdate.exe \
testgdateparser.exe
install : all
$(INSTALL) $(DLLS_TO_BUILD) $(BIN)
glib_OBJECTS = \
garray.o \
gasyncqueue.o \
gcache.o \
gcompletion.o \
gdataset.o \
gdate.o \
gerror.o \
ghook.o \
ghash.o \
giochannel.o \
giowin32.o \
glist.o \
gmain.o \
gmem.o \
gmessages.o \
gnode.o \
gprimes.o \
gqueue.o \
grand.o \
gslist.o \
gthread.o \
gthreadpool.o \
gtimer.o \
gtree.o \
grel.o \
gstring.o \
gstrfuncs.o \
gscanner.o \
gutils.o \
gwin32.o
glibconfig.h: glibconfig.h.win32
cp $< $@
config.h: config.h.win32
cp $< $@
makefile.mingw: makefile.mingw.in
sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
-e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
################ glib
glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) -luser32 -lwsock32
################ subdirectories
gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
cd gmodule && $(MAKE) -f makefile.mingw all
gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
cd gthread && $(MAKE) -f makefile.mingw all
gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
cd gobject && $(MAKE) -f makefile.mingw all
################ test progs
testglib.exe : glib-$(GLIB_VER).dll testglib.o
$(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
$(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
testgdate.o : testgdate.c
$(CC) -c $(CFLAGS) testgdate.c
testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
$(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
testgdateparser.o : testgdateparser.c
$(CC) -c $(CFLAGS) testgdateparser.c
################ other stuff
clean::
-rm config.h glibconfig.h gmodule/gmoduleconf.h
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> 2000-05-02 Tor Lillqvist <tml@iki.fi>
* gmodule-win32.c: No need to include <psapi.h> * gmodule-win32.c: No need to include <psapi.h>
......
...@@ -4,6 +4,8 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule \ ...@@ -4,6 +4,8 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule \
-DG_LOG_DOMAIN=g_log_domain_gmodule @GLIB_DEBUG_FLAGS@ -DG_LOG_DOMAIN=g_log_domain_gmodule @GLIB_DEBUG_FLAGS@
EXTRA_DIST = \ EXTRA_DIST = \
makefile.mingw \
makefile.mingw.in \
gmoduleconf.h.in \ gmoduleconf.h.in \
gmodule.def \ gmodule.def \
gmodule-dl.c \ gmodule-dl.c \
...@@ -53,6 +55,9 @@ testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@ ...@@ -53,6 +55,9 @@ testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@
gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in
cd $(top_builddir) && CONFIG_FILES=gmodule/$@ CONFIG_HEADERS= $(SHELL) ./config.status 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 .PHONY: files release
files: files:
......
## 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