-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)
+testgmodule.exe : libgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.a 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-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ -L . -lgmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@ $(LFLAGS)