More Win32 automake macros. For .def files: GLIB_DEF, GMODULE_DEF,
[platform/upstream/glib.git] / tests / makefile.mingw.in
index 6763811..1c11bf4 100644 (file)
@@ -1,52 +1,69 @@
 ## Makefile for building the GLib test programs with gcc for mingw.
 ## Use: make -f makefile.mingw check
 
-GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
-
 TOP = ../..
 
-include $(TOP)/build/win32/make.mingw
+include ../build/win32/make.mingw
 
 ################################################################
 
 # Nothing much configurable below
 
-INCLUDES = -I .. 
+INCLUDES = -I .. -I ../glib -I ../gmodule
 DEFINES = -DHAVE_CONFIG_H
 
 TESTS = \
+       testglib.exe    \
+       testgdate.exe   \
+       testgdateparser.exe \
        array-test.exe  \
        date-test.exe   \
        dirname-test.exe\
+       gio-test.exe    \
        hash-test.exe   \
        list-test.exe   \
+       mainloop-test.exe\
+       markup-test.exe \
+       module-test.exe \
        node-test.exe   \
        queue-test.exe  \
        rand-test.exe   \
        relation-test.exe\
+       shell-test.exe  \
        slist-test.exe  \
+       spawn-test.exe  \
        strfunc-test.exe\
        string-test.exe \
        thread-test.exe \
        threadpool-test.exe\
        tree-test.exe   \
-       type-test.exe
+       type-test.exe   \
+       unicode-encoding.exe \
 
-all:   $(TESTS)
+DLLS = \
+       libmoduletestplugin_a.dll \
+       libmoduletestplugin_b.dll
 
-makefile.mingw: makefile.mingw.in
-       sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
-           -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
+all:   $(TESTS) $(DLLS)
 
-.SUFFIXES: .c .exe
+.SUFFIXES: .c .i .exe
 
 .c.exe:
-       $(CC) $(CFLAGS) -c $<
-       $(CC) $(CFLAGS) -o $@ $< -L .. -lglib-$(GLIB_VER) -L ../gthread -lgthread-$(GLIB_VER)
+       $(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread -L ../glib -lglib-1.3
+
+module-test.exe : module-test.o
+       $(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3 $(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-1.3 -L ../gmodule -lgmodule-1.3 $(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-1.3 -L ../gmodule -lgmodule-1.3 $(LDFLAGS)
+
+libmoduletestplugin_a.dll : libmoduletestplugin_a.o
+       $(BUILD_DLL) libmoduletestplugin_a - libmoduletestplugin_a.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3
+
+libmoduletestplugin_b.dll : libmoduletestplugin_b.o
+       $(BUILD_DLL) libmoduletestplugin_b - libmoduletestplugin_b.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3
 
 check: all
        @for P in $(TESTS) ; do echo $$P; ./$$P; done
        @echo All tests successful.
-
-clean::
-       -rm *.exe *.o