mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-12 13:49:22 +01:00
Update. Don't mention pthreads.
2001-09-04 Tor Lillqvist <tml@iki.fi> * README.win32: Update. Don't mention pthreads. * build-dll: Remove, moved to the build module. * glibconfig.h.win32.in: Don't mention pthreds here, either. * glib/gstrfuncs.c: Mark the correct variable for export from DLL. * glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to rename the win32_watch_funcs variable here, too. * */makefile.mingw.in: Don't use version number in import library name. Use whole version number in DLL name. Use build-dll from the build module.
This commit is contained in:
parent
267ff610fe
commit
07741c07d8
17
ChangeLog
17
ChangeLog
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
@ -1,3 +1,20 @@
|
||||
2001-09-04 Tor Lillqvist <tml@iki.fi>
|
||||
|
||||
* README.win32: Update. Don't mention pthreads.
|
||||
|
||||
* build-dll: Remove, moved to the build module.
|
||||
|
||||
* glibconfig.h.win32.in: Don't mention pthreds here, either.
|
||||
|
||||
* glib/gstrfuncs.c: Mark the correct variable for export from DLL.
|
||||
|
||||
* glib/giowin32.c (g_io_win32_msg_create_watch): Owen forgot to
|
||||
rename the win32_watch_funcs variable here, too.
|
||||
|
||||
* */makefile.mingw.in: Don't use version number in import library
|
||||
name. Use whole version number in DLL name. Use build-dll from the
|
||||
build module.
|
||||
|
||||
Tue Sep 4 01:50:24 2001 Tim Janik <timj@gtk.org>
|
||||
|
||||
* NEWS: updates for 1.3.7 release.
|
||||
|
93
README.win32
93
README.win32
@ -5,7 +5,7 @@ For more information about the port or GLib, GTk+ and the GIMP to
|
||||
native Windows, and pre-built binaries (DLLs), surf to
|
||||
http://www.gimp.org/win32/ . "Native" means that we use the Win32 API
|
||||
only, and no POSIX (Unix) emulation layer except that provided by the
|
||||
Microsoft runtime C library, and a pthreads emulation library.
|
||||
Microsoft runtime C library.
|
||||
|
||||
To build GLib on Win32, you can use either gcc or the Microsoft
|
||||
compiler and tools. Both the compiler from MSVC 5.0 and from MSVC 6.0
|
||||
@ -14,29 +14,29 @@ have been used successfully.
|
||||
But note that to just *use* GLib on Windows, there is no need to build
|
||||
it, prebuilt DLLs are available from the webiste above.
|
||||
|
||||
With gcc I mean gcc-2.95.2 as distributed by Mumit Khan, either as a
|
||||
mingw version (preferred), or running under cygwin. To successfully
|
||||
use gcc, follow the instructions below. We want to use gcc
|
||||
-mno-cygwin, i.e. produce executables (.exe and .dll files) that do
|
||||
*not* require the cygwin runtime library. This is called "mingw". I
|
||||
also use the -fnative-struct flag, which means that in order to use
|
||||
the prebuilt DLLs (especially of GTK+), you *must* also use that flag.
|
||||
With gcc I mean gcc-2.95.3 from www.mingw.org. It might be possible
|
||||
also to use gcc from Cygwin. (But also in that case, we want to use
|
||||
gcc -mno-cygwin, i.e. produce executables (.exe and .dll files) that
|
||||
do *not* require the cygwin runtime library. This is called "mingw".)
|
||||
|
||||
To successfully use gcc, follow the instructions below. I also use
|
||||
the -fnative-struct flag, which means that in order to use the
|
||||
prebuilt DLLs (especially of GTK+), you *must* also use that flag.
|
||||
(This flag means that the struct layout is identical to that used by
|
||||
MSVC.)
|
||||
|
||||
If you would want to use the cygwin tools to generate a GLib that
|
||||
*does* use the cygwin runtime, the normal Unix configuration method
|
||||
If you would want to use the Cygwin tools to generate a GLib that
|
||||
*does* use the Cygwin runtime, the normal Unix configuration method
|
||||
should work as if on Unix. Note that successfully producing shared
|
||||
libraries (DLLs) most probably requires you to have a very new libtool
|
||||
(from March 2001), and to replace the libtool.m4 included in
|
||||
acinclude.m4 with the new one, and to replace ltmain.sh.
|
||||
libraries (DLLs) most probably requires you to have a very new
|
||||
libtool. (And a new libtool probably requires rather new autoconf and
|
||||
automake.)
|
||||
|
||||
It is also possible to use the ./configure mechanism when building for
|
||||
a mingw configuration. You should be running cygwin for the configure
|
||||
script to work, obviously. The same libtool issue has to be taken into
|
||||
account as when building for Cygwin: You most probably should have a
|
||||
libtool from March 2001 or so, and replace libtool.m4 (in
|
||||
acinclude.m4) and ltmain.sh.
|
||||
It might also be possible to use the ./configure mechanism when
|
||||
building for a mingw configuration. You should be running Cygwin for
|
||||
the configure script to work, obviously. The same libtool issue has to
|
||||
be taken into account as when building for Cygwin: You most probably
|
||||
should have a very new libtool.
|
||||
|
||||
The following preprocessor macros are used for conditional compilation
|
||||
related to Win32:
|
||||
@ -62,9 +62,9 @@ Additionally, there are the compiler-specific macros:
|
||||
- __GNUC__ is defined when using GCC
|
||||
- _MSC_VER is defined when using the Microsoft compiler
|
||||
|
||||
G_OS_WIN32 implies using the Microsoft C runtime MSVCRT.DLL. GLib or
|
||||
software using it is not known to work with the older CRTDLL.DLL
|
||||
runtime.
|
||||
G_OS_WIN32 implies using the Microsoft C runtime MSVCRT.DLL. GLib is
|
||||
not known to work with the older CRTDLL.DLL runtime, or the static
|
||||
Microsoft C runtime libraries.
|
||||
|
||||
Building software that use GLib or GTk+
|
||||
=======================================
|
||||
@ -73,27 +73,14 @@ Even building software that just *use* GLib or GTk+ also require to
|
||||
have the right compiler set up the right way, so if you intend to use
|
||||
gcc, follow the relevant instructions below in that case, too.
|
||||
|
||||
Pthreads library
|
||||
================
|
||||
|
||||
Before building you must get the pthreads library for Win32 from
|
||||
http://sourceware.cygnus.com/pthreads-win32/. The pthreads-win32
|
||||
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
|
||||
makefile.mingw. The pthreads distribution includes the precompiled dll
|
||||
and import libraries both for MSVC and gcc. Later versions might also
|
||||
work.
|
||||
|
||||
The pthreads for Win32 package that the thread support uses supposedly
|
||||
isn't quite ready yet, and thus threads stuff should not be relied
|
||||
upon for anything serious.
|
||||
|
||||
Libiconv
|
||||
========
|
||||
|
||||
Before building GLib you must also have the libiconv library, either
|
||||
from the same website mentioned above, or from it's homepage at
|
||||
http://clisp.cons.org/~haible/packages-libiconv.html.
|
||||
http://clisp.cons.org/~haible/packages-libiconv.html. Libiconv has
|
||||
makefiles for building with MS Visual C only, but as it is one source
|
||||
file only, building iot "by hand" with gcc isn't hard.
|
||||
|
||||
Where are the makefiles?
|
||||
========================
|
||||
@ -101,7 +88,7 @@ Where are the makefiles?
|
||||
If you are building from a CVS snapshot, you will not have any
|
||||
makefile.mingw or makefile.msc file. You should copy the corresponding
|
||||
makefile.mingw.in or makefile.msc.in file to that name, and edit the
|
||||
line that sets GLIB_VER to the correct version number.
|
||||
@GLIB_VERSION@ strings to the correct version number.
|
||||
|
||||
This is done automatically when an official GLib source distribution
|
||||
package is built.
|
||||
@ -109,36 +96,28 @@ package is built.
|
||||
Building GLib with gcc
|
||||
======================
|
||||
|
||||
I use the latest gcc, gcc-2.95.2. Version 2.95 will most probably also
|
||||
work.
|
||||
I use the latest gcc, gcc-2.95.3. Version 2.95.2 will most probably
|
||||
also work.
|
||||
|
||||
You can either use gcc running on cygwin, or the "pure" mingw
|
||||
You can either use gcc running on Cygwin, or the "pure" mingw
|
||||
gcc. Using the latter is much easier.
|
||||
|
||||
Just fetch the latest version of gcc for mingw and the msvcrt runtime,
|
||||
currently from
|
||||
ftp://ftp.nanotech.wisc.edu/pub/khan/gnu-win32/mingw32/snapshots/gcc-2.95.2-1/
|
||||
.
|
||||
|
||||
Download the three zip archives: the gcc-<version>-msvcrt,
|
||||
mingw-msvcrt-<timestamp> and binutils-<timestamp>-msvcrt, and unpack
|
||||
them in a suitable directory.
|
||||
from www.mingw.org..
|
||||
|
||||
Set up your PATH so that the gcc from the bin directory that got
|
||||
created above is the one that gets used. You can skip steps 1--5
|
||||
below. Even if you run the mingw gcc, you still want to have cygwin to
|
||||
run make in.
|
||||
created above is the one that gets used. Even if you run the mingw
|
||||
gcc, you still want to have Cygwin to run make in.
|
||||
|
||||
If you want to run a cygwin-based gcc, it gets a bit more
|
||||
If you want to run a Cygwin-based gcc, it gets a bit more
|
||||
complicated. We still want gcc to produce code that does not use
|
||||
cygwin, but the msvcrt runtime. The way to do this can be quite
|
||||
complex, and the instructions are not included here. Contact me if you
|
||||
want some possibly outdated, misleading and incomplete advice.
|
||||
Cygwin, but the msvcrt runtime. In theory it should work to use the
|
||||
-no-cygwin flag, but I haven't tested that lately.
|
||||
|
||||
Building with MSVC
|
||||
==================
|
||||
|
||||
If using the Microsoft toolchain, build with `nmake -f
|
||||
makefile.msc`. Install with `nmake -f makefile.msc install`.
|
||||
makefile.msc`.
|
||||
|
||||
--Tor Lillqvist <tml@iki.fi>
|
||||
|
71
build-dll
71
build-dll
@ -1,71 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Temporary hack until building dlls is easier with gcc -mno-cygwin
|
||||
# ("mingw32").
|
||||
|
||||
# This is usable with cygwin 1.1.x and gcc-2.95.2 for mingw as
|
||||
# distributed by Mumit Khan. For other combinations, no idea.
|
||||
|
||||
GCC="gcc"
|
||||
DLLTOOL="dlltool"
|
||||
AS=as
|
||||
|
||||
library=$1; shift
|
||||
version=$1; shift;
|
||||
def=$1; shift
|
||||
ldargs="$*"
|
||||
|
||||
defswitch=""
|
||||
[ -n "$def" -a "$def" != '-' ] && defswitch="--def $def"
|
||||
|
||||
libname=$library
|
||||
[ $version != '-' ] && libname=$library-$version
|
||||
dllfile=$libname.dll
|
||||
|
||||
for F in $ldargs; do
|
||||
case $F in
|
||||
*.[ao]) objs="$objs $F";;
|
||||
esac
|
||||
done
|
||||
|
||||
# Check if we have a resource file for this DLL.
|
||||
resfile=""
|
||||
if [ -f $library.rc ]; then
|
||||
resfile=$library-win32res.o
|
||||
objs="$objs $resfile"
|
||||
ldargs="$ldargs $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 $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 &&
|
||||
$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 &&
|
||||
$DLLTOOL --as=$AS --dllname $dllfile $defswitch --base-file $library.base --output-exp $library.exp $objs &&
|
||||
$GCC -mdll -mno-cygwin -Wl,$library.exp -o $dllfile $ldargs &&
|
||||
$DLLTOOL --as=$AS --dllname $dllfile $defswitch --output-lib lib$libname.a $objs
|
||||
|
||||
# Finally, also build import libraries for the Microsoft linker. You
|
||||
# will either need to have some decent version of MSVC, or get lib.exe
|
||||
# (and link.exe) from the (freely downloadable) Microsoft Platform SDK.
|
||||
|
||||
if type -p lib.exe && [ -n "$def" -a "$def" != '-' ]; then
|
||||
lib -name:$libname.dll -def:$def -out:$libname.lib
|
||||
fi
|
||||
|
||||
rm $library.base $library.exp 2>/dev/null
|
@ -749,7 +749,7 @@ g_io_win32_msg_create_watch (GIOChannel *channel,
|
||||
GIOWin32Watch *watch;
|
||||
GSource *source;
|
||||
|
||||
source = g_source_new (&win32_watch_funcs, sizeof (GIOWin32Watch));
|
||||
source = g_source_new (&g_io_watch_funcs, sizeof (GIOWin32Watch));
|
||||
watch = (GIOWin32Watch *)source;
|
||||
|
||||
watch->channel = channel;
|
||||
|
@ -53,9 +53,6 @@
|
||||
* inteferes with g_strsignal() on some OSes
|
||||
*/
|
||||
|
||||
#if defined(G_PLATFORM_WIN32) && defined(__GNUC__)
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
static const guint16 ascii_table_data[256] = {
|
||||
0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004, 0x004,
|
||||
0x004, 0x104, 0x104, 0x004, 0x104, 0x104, 0x004, 0x004,
|
||||
@ -76,6 +73,9 @@ static const guint16 ascii_table_data[256] = {
|
||||
/* the upper 128 are all zeroes */
|
||||
};
|
||||
|
||||
#if defined(G_PLATFORM_WIN32) && defined(__GNUC__)
|
||||
__declspec(dllexport)
|
||||
#endif
|
||||
const guint16 * const g_ascii_table = ascii_table_data;
|
||||
|
||||
gchar*
|
||||
|
@ -5,10 +5,7 @@
|
||||
|
||||
TOP = ../..
|
||||
|
||||
include $(TOP)/build/win32/make.mingw
|
||||
|
||||
# Possibly override GLib version in build/win32/module.defs
|
||||
GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
|
||||
include ../build/win32/make.mingw
|
||||
|
||||
################################################################
|
||||
|
||||
@ -21,7 +18,7 @@ DEPCFLAGS = $(INTL_CFLAGS) $(LIBICONV_CFLAGS)
|
||||
all : \
|
||||
../config.h \
|
||||
../glibconfig.h \
|
||||
glib-$(GLIB_VER).dll \
|
||||
glib-@GLIB_VERSION@.dll \
|
||||
gspawn-win32-helper.exe
|
||||
|
||||
glib_OBJECTS = \
|
||||
@ -77,54 +74,14 @@ glib_OBJECTS = \
|
||||
|
||||
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@,' <$< >$@
|
||||
sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
|
||||
endif
|
||||
|
||||
################ glib
|
||||
################ The glib DLL
|
||||
|
||||
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
|
||||
glib-@GLIB_VERSION@.dll : $(glib_OBJECTS) glib.def
|
||||
$(BUILD_DLL) glib @GLIB_VERSION@ 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)
|
||||
$(CC) $(CFLAGS) -mwindows -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib
|
||||
|
||||
################ 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
|
||||
|
@ -124,8 +124,8 @@ typedef struct _GMutex* GStaticMutex;
|
||||
typedef union _GSystemThread GSystemThread;
|
||||
union _GSystemThread
|
||||
{
|
||||
/* The size of the data array should be sizeof (pthread_t) */
|
||||
/* This value corresponds to the 1999-05-30 version of pthreads-win32 */
|
||||
/* The size of the data array is sizeof (GThreadData *), from
|
||||
* gthread-win32.c */
|
||||
char data[4];
|
||||
double dummy_double;
|
||||
void *dummy_pointer;
|
||||
|
@ -31,6 +31,7 @@ extern "C" {
|
||||
#define G_MODULE_IMPL_WIN32 3
|
||||
#define G_MODULE_IMPL_OS2 4
|
||||
#define G_MODULE_IMPL_BEOS 5
|
||||
#define G_MODULE_IMPL_DYLD 6
|
||||
|
||||
#define G_MODULE_IMPL G_MODULE_IMPL_WIN32
|
||||
#undef G_MODULE_HAVE_DLERROR
|
||||
|
@ -7,9 +7,6 @@ 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
|
||||
@ -17,17 +14,15 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
|
||||
INCLUDES = -I .. -I ../glib -I .
|
||||
DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GModule\" -DG_ENABLE_DEBUG
|
||||
|
||||
BUILD_DLL = ../build-dll
|
||||
|
||||
all : \
|
||||
gmoduleconf.h \
|
||||
gmodule-$(GLIB_VER).dll \
|
||||
testgmodule.exe
|
||||
gmodule-@GLIB_VERSION@.dll \
|
||||
testgmodule.exe \
|
||||
libgplugin_a.dll libgplugin_b.dll
|
||||
|
||||
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@,' <$< >$@
|
||||
sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
|
||||
endif
|
||||
|
||||
gmodule_OBJECTS = \
|
||||
@ -36,23 +31,26 @@ gmodule_OBJECTS = \
|
||||
gmoduleconf.h: gmoduleconf.h.win32
|
||||
cp $< $@
|
||||
|
||||
gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule.def
|
||||
$(BUILD_DLL) gmodule $(GLIB_VER) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib-$(GLIB_VER)
|
||||
################ The gmodule DLL
|
||||
|
||||
gmodule-@GLIB_VERSION@.dll : $(gmodule_OBJECTS) gmodule.def
|
||||
$(BUILD_DLL) gmodule @GLIB_VERSION@ $(CFLAGS) gmodule.def $(gmodule_OBJECTS) -L ../glib -lglib
|
||||
|
||||
################ 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 ../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 ../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 ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER) $(LDFLAGS)
|
||||
testgmodule.exe : gmodule-@GLIB_VERSION@.dll testgmodule.o
|
||||
# We have to generate an .exp file separately with dlltool, and link
|
||||
# with that. Sigh.
|
||||
dlltool --output-exp testgmodule.exp testgmodule.o
|
||||
$(CC) $(CFLAGS) -o testgmodule.exe testgmodule.o testgmodule.exp -L ../glib -lglib -L . -lgmodule $(LFLAGS)
|
||||
|
||||
libgplugin_a.dll : libgplugin_a.o
|
||||
$(BUILD_DLL) libgplugin_a - - libgplugin_a.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
|
||||
$(BUILD_DLL) libgplugin_a - libgplugin_a.o -L ../glib -lglib -L . -lgmodule
|
||||
|
||||
libgplugin_b.dll : libgplugin_b.o
|
||||
$(BUILD_DLL) libgplugin_b - - libgplugin_b.o -L ../glib -lglib-$(GLIB_VER) -L . -lgmodule-$(GLIB_VER)
|
||||
$(BUILD_DLL) libgplugin_b - libgplugin_b.o -L ../glib -lglib -L . -lgmodule
|
||||
|
||||
################ Other stuff
|
||||
|
||||
clean::
|
||||
-rm gmoduleconf.h
|
||||
|
@ -7,9 +7,6 @@ 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
|
||||
@ -22,13 +19,12 @@ srcdir=.
|
||||
BUILD_DLL = ../build-dll
|
||||
|
||||
all : \
|
||||
gobject-$(GLIB_VER).dll \
|
||||
gobject-@GLIB_VERSION@.dll \
|
||||
glib-genmarshal.exe
|
||||
|
||||
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@,' \
|
||||
sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' \
|
||||
-e 's,@RE[B]UILD@,,' <$< >$@
|
||||
endif
|
||||
|
||||
@ -49,11 +45,11 @@ gobject_OBJECTS = \
|
||||
gvaluetransform.o \
|
||||
gvaluetypes.o
|
||||
|
||||
gobject-$(GLIB_VER).dll : $(srcdir)/stamp-gmarshal.h gmarshal.c $(gobject_OBJECTS) gobject.def
|
||||
$(BUILD_DLL) gobject $(GLIB_VER) gobject.def $(gobject_OBJECTS) -L .. -lglib-$(GLIB_VER)
|
||||
gobject-@GLIB_VERSION@.dll : $(srcdir)/stamp-gmarshal.h gmarshal.c $(gobject_OBJECTS) gobject.def
|
||||
$(BUILD_DLL) gobject @GLIB_VERSION@ gobject.def $(gobject_OBJECTS) -L ../glib -lglib
|
||||
|
||||
glib-genmarshal.exe : glib-genmarshal.c
|
||||
$(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L .. -lglib-$(GLIB_VER)
|
||||
$(CC) -o $@ $(CFLAGS) -UGOBJECT_COMPILATION $< -L ../glib -lglib
|
||||
|
||||
# Copied from Makefile.am:
|
||||
# initial creation of the real stamp-* files
|
||||
|
@ -7,9 +7,6 @@ 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
|
||||
@ -17,19 +14,16 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
|
||||
INCLUDES = -I .. -I ../glib -I .
|
||||
DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=\"GThread\" -DG_ENABLE_DEBUG
|
||||
|
||||
BUILD_DLL = ../build-dll
|
||||
|
||||
all : \
|
||||
gthread-$(GLIB_VER).dll
|
||||
gthread-@GLIB_VERSION@.dll
|
||||
|
||||
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@,' <$< >$@
|
||||
sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
|
||||
endif
|
||||
|
||||
gthread_OBJECTS = \
|
||||
gthread-impl.o
|
||||
|
||||
gthread-$(GLIB_VER).dll : $(gthread_OBJECTS) gthread.def
|
||||
$(BUILD_DLL) gthread $(GLIB_VER) gthread.def $(gthread_OBJECTS) -L ../glib -lglib-$(GLIB_VER)
|
||||
gthread-@GLIB_VERSION@.dll : $(gthread_OBJECTS) gthread.def
|
||||
$(BUILD_DLL) gthread @GLIB_VERSION@ gthread.def $(gthread_OBJECTS) -L ../glib -lglib
|
||||
|
@ -5,9 +5,6 @@ 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
|
||||
@ -15,8 +12,6 @@ GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
|
||||
INCLUDES = -I .. -I ../glib -I ../gmodule
|
||||
DEFINES = -DHAVE_CONFIG_H
|
||||
|
||||
BUILD_DLL = ../build-dll
|
||||
|
||||
TESTS = \
|
||||
testglib.exe \
|
||||
testgdate.exe \
|
||||
@ -53,27 +48,26 @@ all: $(TESTS) $(DLLS)
|
||||
|
||||
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@,' <$< >$@
|
||||
sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
|
||||
endif
|
||||
|
||||
.SUFFIXES: .c .i .exe
|
||||
|
||||
.c.exe:
|
||||
$(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread-$(GLIB_VER) -L ../glib -lglib-$(GLIB_VER)
|
||||
$(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread -L ../glib -lglib
|
||||
|
||||
module-test.exe : module-test.o
|
||||
$(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L ../glib -lglib -L ../gmodule -lgmodule $(LDFLAGS)
|
||||
$(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
|
||||
$(CC) $(CFLAGS) -Wl,--base-file,module-test.base,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -Wl,--base-file,module-test.base,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib -L ../gmodule -lgmodule $(LDFLAGS)
|
||||
$(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
|
||||
$(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
|
||||
$(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib -L ../gmodule -lgmodule $(LDFLAGS)
|
||||
|
||||
libmoduletestplugin_a.dll : libmoduletestplugin_a.o
|
||||
$(BUILD_DLL) libmoduletestplugin_a - - libmoduletestplugin_a.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
|
||||
$(BUILD_DLL) libmoduletestplugin_a - libmoduletestplugin_a.o -L ../glib -lglib -L ../gmodule -lgmodule
|
||||
|
||||
libmoduletestplugin_b.dll : libmoduletestplugin_b.o
|
||||
$(BUILD_DLL) libmoduletestplugin_b - - libmoduletestplugin_b.o -L ../glib -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
|
||||
$(BUILD_DLL) libmoduletestplugin_b - libmoduletestplugin_b.o -L ../glib -lglib -L ../gmodule -lgmodule
|
||||
|
||||
check: all
|
||||
@for P in $(TESTS) ; do echo $$P; ./$$P; done
|
||||
|
Loading…
x
Reference in New Issue
Block a user