Add MSVC-specific text by Hans Breuer.
[platform/upstream/glib.git] / tests / makefile.mingw.in
1 ## Makefile for building the GLib test programs with gcc for mingw.
2 ## Use: make -f makefile.mingw check
3
4 TOP = ../..
5
6 include ../build/win32/make.mingw
7
8 ################################################################
9
10 # Nothing much configurable below
11
12 INCLUDES = -I .. -I ../glib -I ../gmodule
13 DEFINES = -DHAVE_CONFIG_H
14
15 NONAUTOMATIC_TESTS = \
16         testglib.exe    \
17         testgdate.exe   \
18         testgdateparser.exe \
19         patterntest.exe \
20         unicode-normalize.exe \
21         unicode-collate.exe
22
23 TESTS = \
24         array-test.exe  \
25         date-test.exe   \
26         dirname-test.exe\
27         gio-test.exe    \
28         hash-test.exe   \
29         list-test.exe   \
30         mainloop-test.exe \
31         markup-test.exe \
32         module-test.exe \
33         node-test.exe   \
34         queue-test.exe  \
35         rand-test.exe   \
36         relation-test.exe\
37         shell-test.exe  \
38         slist-test.exe  \
39         spawn-test.exe  \
40         strfunc-test.exe\
41         string-test.exe \
42         strtod-test.exe \
43         thread-test.exe \
44         threadpool-test.exe\
45         tree-test.exe   \
46         type-test.exe   \
47         unicode-caseconv.exe \
48         unicode-encoding.exe
49
50 DLLS = \
51         libmoduletestplugin_a.dll \
52         libmoduletestplugin_b.dll
53
54 all:    $(TESTS) $(NONAUTOMATIC_TESTS) $(DLLS)
55
56 .SUFFIXES: .c .i .exe
57
58 .c.exe:
59         $(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread-2.0 -L ../glib -lglib-2.0
60
61 module-test.exe : module-test.o
62         $(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0 $(LDFLAGS)
63         $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
64         $(CC) $(CFLAGS) -Wl,--base-file,module-test.base,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0 $(LDFLAGS)
65         $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
66         $(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0 $(LDFLAGS)
67
68 libmoduletestplugin_a.dll : libmoduletestplugin_a.o
69         $(BUILD_DLL) libmoduletestplugin_a - libmoduletestplugin_a.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0
70
71 libmoduletestplugin_b.dll : libmoduletestplugin_b.o
72         $(BUILD_DLL) libmoduletestplugin_b - libmoduletestplugin_b.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0
73
74 check:  all
75         @for P in $(TESTS) ; do echo $$P; PATH=../glib:../gmodule:../gobject:../gthread:$$PATH ./$$P; done
76         @echo All tests successful.