4db12b267a2dacc40a38ad6d82abeaa5c4edc7d4
[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 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
50 makefile.mingw: makefile.mingw.in
51         sed -e 's,@GLIB[_]VERSION@,@GLIB_VERSION@,' <$< >$@
52 endif
53
54 .SUFFIXES: .c .i .exe
55
56 .c.exe:
57         $(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread -L ../glib -lglib
58
59 module-test.exe : module-test.o
60         $(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L ../glib -lglib -L ../gmodule -lgmodule $(LDFLAGS)
61         $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
62         $(CC) $(CFLAGS) -Wl,--base-file,module-test.base,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib -L ../gmodule -lgmodule $(LDFLAGS)
63         $(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
64         $(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib -L ../gmodule -lgmodule $(LDFLAGS)
65
66 libmoduletestplugin_a.dll : libmoduletestplugin_a.o
67         $(BUILD_DLL) libmoduletestplugin_a - libmoduletestplugin_a.o -L ../glib -lglib -L ../gmodule -lgmodule
68
69 libmoduletestplugin_b.dll : libmoduletestplugin_b.o
70         $(BUILD_DLL) libmoduletestplugin_b - libmoduletestplugin_b.o -L ../glib -lglib -L ../gmodule -lgmodule
71
72 check:  all
73         @for P in $(TESTS) ; do echo $$P; ./$$P; done
74         @echo All tests successful.