makefile.mingw.in 2.25 KB
Newer Older
1 2
## Makefile for building the GLib test programs with gcc for mingw.
## 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

Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
15
NONAUTOMATIC_TESTS = \
16 17 18
	testglib.exe	\
	testgdate.exe	\
	testgdateparser.exe \
Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
19 20 21 22 23 24 25
	patterntest.exe \
	unicode-normalize.exe \
	unicode-collate.exe

# mainloop-test removed for now until it is fixed

TESTS = \
26 27 28
	array-test.exe	\
	date-test.exe	\
	dirname-test.exe\
29
	gio-test.exe	\
30 31
	hash-test.exe	\
	list-test.exe	\
Tor Lillqvist's avatar
Tor Lillqvist committed
32
	markup-test.exe	\
33
	module-test.exe	\
34 35 36 37
	node-test.exe	\
	queue-test.exe	\
	rand-test.exe	\
	relation-test.exe\
38
	shell-test.exe	\
39
	slist-test.exe	\
40
	spawn-test.exe	\
41
	strfunc-test.exe\
Tor Lillqvist's avatar
Tor Lillqvist committed
42
	string-test.exe	\
Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
43
	strtod-test.exe \
44
	thread-test.exe	\
45
	threadpool-test.exe\
46
	tree-test.exe	\
47
	type-test.exe	\
Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
48 49
	unicode-caseconv.exe \
	unicode-encoding.exe
50 51

DLLS = \
52 53
	libmoduletestplugin_a.dll \
	libmoduletestplugin_b.dll
54

Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
55
all:	$(TESTS) $(NONAUTOMATIC_TESTS) $(DLLS)
56

57
.SUFFIXES: .c .i .exe
58

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

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

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

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

75
check:	all
Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
76
	@for P in $(TESTS) ; do echo $$P; PATH=../glib:../gmodule:../gobject:../gthread:$$PATH ./$$P; done
77
	@echo All tests successful.