glib/gmodule/makefile.mingw.in
Tor Lillqvist 8e847255e8 Revamp to be like makefile.mingw.in, make the MSVC build actually work
2000-10-06  Tor Lillqvist  <tml@iki.fi>

	* makefile.msc.in: Revamp to be like makefile.mingw.in, make
	the MSVC build actually work again.

	* gmodule/makefile.msc.in
	* gobject/makefile.msc.in
	* gthread/makefile.msc.in: New files, like their mingw counterparts.

	* gmodule/Makefile.am
	* gobject/Makefile.am
	* gthread/Makefile.am: Make and distribute them.

	* */makefile.mingw.in: Allow override of GLib version number from
	the build/win32/module.defs file.

	* glib.def: Add new entry point.

	Fixes from Hans Breuer:

	* glib.h (struct DIR): Keep the last readdir result cached inside
	the DIR struct, to enable several DIRs being open simultaneously.

	* gwin32.c (g_win32_readdir): Use the above instead of static.

	* giowin32.c (g_io_channel_win32_make_pollfd): Insert cast to keep
	MSVC happy.
2000-10-06 21:32:59 +00:00

57 lines
2.1 KiB
Plaintext

## Makefile for building the gmodule 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 .. -I .
DEFINES = -DHAVE_CONFIG_H -DG_LOG_DOMAIN=g_log_domain_gmodule
BUILD_DLL = ../build-dll
all : \
gmoduleconf.h \
gmodule-$(GLIB_VER).dll \
testgmodule.exe
makefile.mingw: makefile.mingw.in
sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
-e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
gmodule_OBJECTS = \
gmodule.o
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)
################ 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 .. -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)
$(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)
libgplugin_a.dll : libgplugin_a.o
$(BUILD_DLL) libgplugin_a - - libgplugin_a.o -L .. -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)