glib/tests/makefile.mingw.in

77 lines
2.2 KiB
Plaintext
Raw Normal View History

## 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\
Finally, a new and improved IO Channel and condition watch implementation 2000-07-30 Tor Lillqvist <tml@iki.fi> Finally, a new and improved IO Channel and condition watch implementation for Win32. Based on code provided by Craig Setera. When watching file descriptors, for which there is no select() like functionality on Win32 that would work on all Win32 platforms for all types of file descriptors (including anonymous pipes), we start a new thread that blocks while trying to read from the file descriptor. When the read returns, a Win32 Event is signalled that the polling routine eventually notices. Meanwhile, the data being read is stored in a circular buffer, from where the IO channel's read() method picks it up. If the buffer fills up the reading thread has to wait for space becoming available. For this another Win32 Event is used. The IO Channel's read() method signals this when it has read some data out of the buffer. The separate reader thread(s), and the circular buffer(s) with associated events mean lots of possibilities for fun parallellism errors. But it seems to work OK, i.e. GIMP runs. * gmain.c: Small changes to the Win32 polling function. (g_main_win32_get_poll_func): New function. Perhaps it would be a good idea to provide this on all platforms. * giowin32.c: The bulk of the new implementation. (g_io_channel_win32_wait_for_condition): New function. To be used where on Unix one does a select() on the channel's fd, like libgimp's gimp_extension_process(). Could be provided on all platforms. * glib.h: Update documentation for IO Channels on Win32. Remove the declarations for the as of now obsolete old functions related to IO Channels for pipes with "wakeup" messages. * glib.def: Some new functions. * tests/gio-test.c: New file, to test GIOChannel and main loop. * tests/Makefile.am * tests/makefile.mingw.in: Add it.
2000-07-29 22:59:07 +02:00
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-2.0 -L ../glib -lglib-2.0
module-test.exe : module-test.o
$(CC) $(CFLAGS) -Wl,--base-file,module-test.base -o module-test.exe module-test.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0 $(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-2.0 -L ../gmodule -lgmodule-2.0 $(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-2.0 -L ../gmodule -lgmodule-2.0 $(LDFLAGS)
libmoduletestplugin_a.dll : libmoduletestplugin_a.o
$(BUILD_DLL) libmoduletestplugin_a - libmoduletestplugin_a.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0
libmoduletestplugin_b.dll : libmoduletestplugin_b.o
$(BUILD_DLL) libmoduletestplugin_b - libmoduletestplugin_b.o -L ../glib -lglib-2.0 -L ../gmodule -lgmodule-2.0
check: all
@for P in $(TESTS) ; do echo $$P; PATH=../glib:../gmodule:../gobject:../gthread:$$PATH ./$$P; done
@echo All tests successful.