1 ## Makefile for building the GLib test programs with gcc for mingw.
2 ## Use: make -f makefile.mingw check
6 include ../build/win32/make.mingw
8 # Possibly override GLib version in build\win32\module.defs
9 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
11 ################################################################
13 # Nothing much configurable below
15 INCLUDES = -I .. -I ../gmodule
16 DEFINES = -DHAVE_CONFIG_H
18 BUILD_DLL = ../build-dll
43 unicode-encoding.exe \
44 libmoduletestplugin_a.dll \
45 libmoduletestplugin_b.dll
49 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
50 makefile.mingw: makefile.mingw.in
51 sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
52 -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
58 $(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread-$(GLIB_VER) -L .. -lglib-$(GLIB_VER)
60 module-test.exe : module-test.o
61 $(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
62 $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
63 $(CC) $(CFLAGS) -Wl,--base-file,module-test.base,module-test.exp -o module-test.exe module-test.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
64 $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
65 $(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER) $(LDFLAGS)
67 libmoduletestplugin_a.dll : libmoduletestplugin_a.o
68 $(BUILD_DLL) libmoduletestplugin_a - - libmoduletestplugin_a.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
70 libmoduletestplugin_b.dll : libmoduletestplugin_b.o
71 $(BUILD_DLL) libmoduletestplugin_b - - libmoduletestplugin_b.o -L .. -lglib-$(GLIB_VER) -L ../gmodule -lgmodule-$(GLIB_VER)
74 @for P in $(TESTS) ; do echo $$P; ./$$P; done
75 @echo All tests successful.