summaryrefslogtreecommitdiff
path: root/tests/makefile.mingw.in
blob: c666e251ff38cbac105c7f31ec55e69ef1ddbe72 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
## Makefile for building the GLib test programs with gcc for mingw.
## Use: make -f makefile.mingw check

TOP = ../..

include ../build/win32/make.mingw

################################################################

# Nothing much configurable below

INCLUDES = -I .. -I ../glib -I ../gmodule
DEFINES = -DHAVE_CONFIG_H

NONAUTOMATIC_TESTS = \
	testglib.exe	\
	testgdate.exe	\
	testgdateparser.exe \
	patterntest.exe \
	unicode-normalize.exe \
	unicode-collate.exe

TESTS = \
	array-test.exe	\
	date-test.exe	\
	dirname-test.exe\
	gio-test.exe	\
	hash-test.exe	\
	list-test.exe	\
	mainloop-test.exe \
	markup-test.exe	\
	module-test.exe	\
	node-test.exe	\
	queue-test.exe	\
	rand-test.exe	\
	relation-test.exe\
	shell-test.exe	\
	slist-test.exe	\
	spawn-test.exe	\
	strfunc-test.exe\
	string-test.exe	\
	strtod-test.exe \
	thread-test.exe	\
	threadpool-test.exe\
	tree-test.exe	\
	type-test.exe	\
	unicode-caseconv.exe \
	unicode-encoding.exe

DLLS = \
	libmoduletestplugin_a.dll \
	libmoduletestplugin_b.dll

all:	$(TESTS) $(NONAUTOMATIC_TESTS) $(DLLS)

.SUFFIXES: .c .i .exe

.c.exe:
	$(CC) $(CFLAGS) -o $@ $< -L ../gthread -lgthread-1.3 -L ../glib -lglib-1.3

module-test.exe : module-test.o
	$(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)
	$(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
	$(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)
	$(DLLTOOL) --base-file module-test.base --output-exp module-test.exp module-test.o
	$(CC) $(CFLAGS) -Wl,module-test.exp -o module-test.exe module-test.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3 $(LDFLAGS)

libmoduletestplugin_a.dll : libmoduletestplugin_a.o
	$(BUILD_DLL) libmoduletestplugin_a - libmoduletestplugin_a.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3

libmoduletestplugin_b.dll : libmoduletestplugin_b.o
	$(BUILD_DLL) libmoduletestplugin_b - libmoduletestplugin_b.o -L ../glib -lglib-1.3 -L ../gmodule -lgmodule-1.3

check:	all
	@for P in $(TESTS) ; do echo $$P; PATH=../glib:../gmodule:../gobject:../gthread:$$PATH ./$$P; done
	@echo All tests successful.