• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1## Makefile for building the GLib test programs with Microsoft C
2## Use: nmake -f makefile.msc check
3
4TOP = ..\..
5
6!INCLUDE ..\build\win32\make.msc
7
8################################################################
9
10INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I ..\glib -I ..\gmodule
11DEFINES = -DHAVE_CONFIG_H -DENABLE_REGEX
12
13NONAUTOMATIC_TESTS = \
14	testglib.exe	\
15	testgdate.exe	\
16	testgdateparser.exe \
17	unicode-normalize.exe \
18	unicode-collate.exe
19
20TESTS = \
21	atomic-test.exe \
22	array-test.exe	\
23	asyncqueue-test.exe \
24	base64-test.exe \
25	bit-test.exe \
26	bookmarkfile-test.exe \
27	child-test.exe \
28	checksum-test.exe \
29	completion-test.exe \
30	convert-test.exe \
31	date-test.exe	\
32	dirname-test.exe \
33	env-test.exe \
34	errorcheck-mutex-test.exe \
35	file-test.exe \
36	gio-test.exe	\
37	iochannel-test.exe \
38	hash-test.exe	\
39	keyfile-test.exe \
40	list-test.exe	\
41	mainloop-test.exe \
42	mapping-test.exe \
43	markup-escape-test.exe \
44	markup-test.exe	\
45#main?	memchunks.exe \
46	module-test.exe	\
47	node-test.exe	\
48	option-test.exe \
49	patterntest.exe \
50	printf-test.exe \
51	queue-test.exe	\
52	qsort-test.exe \
53	rand-test.exe	\
54	regex-test.exe \
55	relation-test.exe \
56#_?	sequence-test.exe \
57	shell-test.exe	\
58	slice-color.exe \
59	slice-test.exe	\
60	slist-test.exe	\
61	spawn-test.exe	\
62# strfunc-test doesn't compile with MSVC
63#	strfunc-test.exe\
64	string-test.exe	\
65# strtod-test doesn't either
66#	strtod-test.exe \
67	thread-test.exe	\
68	threadpool-test.exe\
69	tree-test.exe	\
70	type-test.exe	\
71	unicode-caseconv.exe \
72	unicode-encoding.exe \
73	utf8-validate.exe \
74	utf8-pointer.exe \
75	uri-test.exe \
76	\
77	gio-ls.exe
78
79DLLS = \
80	libmoduletestplugin_a.dll \
81	libmoduletestplugin_b.dll
82
83all :	$(TESTS) $(NONAUTOMATIC_TESTS) $(DLLS)
84
85.c.exe :
86	$(CC) $(CFLAGS) -c $<
87	$(CC) $(CFLAGS) -Fe$@ $< ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console
88
89gio-ls.exe : gio-ls.obj
90	$(CC) $(CFLAGS) -Fe$@ gio-ls.obj \
91	..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib \
92	..\gobject\gobject-2.0.lib ..\gio\gio-2.0.lib \
93	$(LDFLAGS) user32.lib /subsystem:console
94
95slice-test.exe : memchunks.obj slice-test.obj
96	$(CC) $(CFLAGS) -Fe$@ memchunks.obj slice-test.obj \
97	..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console
98
99libmoduletestplugin_a.dll : libmoduletestplugin_a.obj
100	$(CC) $(CFLAGS) -LD libmoduletestplugin_a.obj ..\gmodule\gmodule-2.0.lib ..\glib\glib-2.0.lib $(LDFLAGS)
101
102libmoduletestplugin_b.dll : libmoduletestplugin_b.obj
103	$(CC) $(CFLAGS) -LD libmoduletestplugin_b.obj ..\gmodule\gmodule-2.0.lib ..\glib\glib-2.0.lib $(LDFLAGS)
104
105check:	all
106	for %p in ($(TESTS)) do set PATH=..\glib;..\gmodule;..\gobject;..\gthread;%PATH% && %p
107