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