Add ../* to PATH before running tests to find DLLs.
[platform/upstream/glib.git] / tests / makefile.msc.in
1 ## Makefile for building the GLib test programs with Microsoft C
2 ## Use: nmake -f makefile.msc check
3
4 TOP = ..\..
5
6 !INCLUDE ..\build\win32\make.msc
7
8 ################################################################
9
10 INCLUDES = -I .. -I ..\glib -I ..\gmodule
11 DEFINES = -DHAVE_CONFIG_H
12
13 NONAUTOMATIC_TESTS = \
14         testglib.exe    \
15         testgdate.exe   \
16         testgdateparser.exe \
17         patterntest.exe \
18         unicode-normalize.exe \
19         unicode-collate.exe
20
21 # mainloop-test removed for now until it is fixed
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         markup-test.exe \
31         module-test.exe \
32         node-test.exe   \
33         queue-test.exe  \
34         rand-test.exe   \
35         relation-test.exe\
36         shell-test.exe  \
37         slist-test.exe  \
38         spawn-test.exe  \
39 # strfunc-test doesn't compile with MSVC
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 .c.exe :
57         $(CC) $(CFLAGS) -c $<
58         $(CC) $(CFLAGS) -Fe$@ $< ..\glib\glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.lib ..\gmodule\gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.lib ..\gthread\gthread-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.lib $(LDFLAGS) user32.lib /subsystem:console
59
60 libmoduletestplugin_a.dll : libmoduletestplugin_a.obj
61         $(CC) $(CFLAGS) -LD libmoduletestplugin_a.obj ..\gmodule\gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.lib ..\glib\glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.lib $(LDFLAGS)
62
63 libmoduletestplugin_b.dll : libmoduletestplugin_b.obj
64         $(CC) $(CFLAGS) -LD libmoduletestplugin_b.obj ..\gmodule\gmodule-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.lib ..\glib\glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@.lib $(LDFLAGS)
65
66 check:  all
67         for %p in ($(TESTS)) do set PATH=..\glib;..\gmodule;..\gobject;..\gthread;%PATH% && %p