12bba68e6f5187b45b0eaed89168b43ceb6faa84
[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 # mainloop-test removed for now until it is fixed
16
17 TESTS = \
18         testglib.exe    \
19         testgdate.exe   \
20         testgdateparser.exe \
21         array-test.exe  \
22         date-test.exe   \
23         dirname-test.exe\
24         gio-test.exe    \
25         hash-test.exe   \
26         list-test.exe   \
27         markup-test.exe \
28         module-test.exe \
29         node-test.exe   \
30         queue-test.exe  \
31         rand-test.exe   \
32         relation-test.exe\
33         shell-test.exe  \
34         slist-test.exe  \
35         spawn-test.exe  \
36         strfunc-test.exe\
37         string-test.exe \
38         thread-test.exe \
39         threadpool-test.exe\
40         tree-test.exe   \
41         type-test.exe   \
42         unicode-encoding.exe \
43
44 DLLS = \
45         libmoduletestplugin_a.dll \
46         libmoduletestplugin_b.dll
47
48 all:    $(TESTS) $(DLLS)
49
50 .SUFFIXES: .c .i .exe
51
52 .c.exe:
53         $(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread-1.3 -L ../glib -lglib-1.3
54
55 module-test.exe : module-test.o
56         $(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)
57         $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
58         $(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)
59         $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
60         $(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3 $(LDFLAGS)
61
62 libmoduletestplugin_a.dll : libmoduletestplugin_a.o
63         $(BUILD_DLL) libmoduletestplugin_a - libmoduletestplugin_a.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3
64
65 libmoduletestplugin_b.dll : libmoduletestplugin_b.o
66         $(BUILD_DLL) libmoduletestplugin_b - libmoduletestplugin_b.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3
67
68 check:  all
69         @for P in $(TESTS) ; do echo $$P; ./$$P; done
70         @echo All tests successful.