Use the _LIBADD dependencies on libglib only on Win32.
[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 # Possibly override GLib version in build\win32\module.defs
9 GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
10
11 ################################################################
12
13 # Nothing much configurable below
14
15 INCLUDES = -I .. 
16 DEFINES = -DHAVE_CONFIG_H
17
18 TESTS = \
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         node-test.exe   \
28         queue-test.exe  \
29         rand-test.exe   \
30         relation-test.exe\
31         shell-test.exe  \
32         slist-test.exe  \
33         spawn-test.exe  \
34         strfunc-test.exe\
35         string-test.exe \
36         thread-test.exe \
37         threadpool-test.exe\
38         tree-test.exe   \
39         type-test.exe   \
40         unicode-encoding.exe
41
42 all:    $(TESTS)
43
44 ifeq ($(wildcard makefile.mingw.in),makefile.mingw.in)
45 makefile.mingw: makefile.mingw.in
46         sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
47             -e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
48 endif
49
50 .SUFFIXES: .c .exe
51
52 .c.exe:
53         $(CC) $(CFLAGS) -o $@ $< -L .. -lglib-$(GLIB_VER) -L ../gthread -lgthread-$(GLIB_VER)
54
55 check:  all
56         @for P in $(TESTS) ; do echo $$P; ./$$P; done
57         @echo All tests successful.