diff options
Diffstat (limited to 'gmodule')
-rw-r--r-- | gmodule/ChangeLog | 7 | ||||
-rw-r--r-- | gmodule/Makefile.am | 5 | ||||
-rw-r--r-- | gmodule/makefile.mingw.in | 58 |
3 files changed, 70 insertions, 0 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog index b47703683..211595b05 100644 --- a/gmodule/ChangeLog +++ b/gmodule/ChangeLog @@ -1,3 +1,10 @@ +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> * gmodule-win32.c: No need to include <psapi.h> diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am index 2aa96aef3..e4d3b38d4 100644 --- a/gmodule/Makefile.am +++ b/gmodule/Makefile.am @@ -4,6 +4,8 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/gmodule \ -DG_LOG_DOMAIN=g_log_domain_gmodule @GLIB_DEBUG_FLAGS@ EXTRA_DIST = \ + makefile.mingw \ + makefile.mingw.in \ gmoduleconf.h.in \ gmodule.def \ gmodule-dl.c \ @@ -53,6 +55,9 @@ testgmodule_LDADD = libgmodule.la $(libglib) @G_MODULE_LIBS@ gmodule.rc: $(top_builddir)/config.status $(top_srcdir)/gmodule/gmodule.rc.in 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 files: diff --git a/gmodule/makefile.mingw.in b/gmodule/makefile.mingw.in new file mode 100644 index 000000000..2c9c9034a --- /dev/null +++ b/gmodule/makefile.mingw.in @@ -0,0 +1,58 @@ +## 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 + +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-win32res.o : gmodule.rc gmodule-build.tmp + +gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) gmodule.def + $(BUILD_DLL) gmodule $(GLIB_VER) gmodule.def $(gmodule_OBJECTS) gmodule-win32res.o -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) |