glib/makefile.mingw.in
Tor Lillqvist fb4de1c50d Some more debugging output. (g_io_channel_win32_poll): Remove unused vars.
2000-10-16  Tor Lillqvist  <tml@iki.fi>

	* giowin32.c (reader_thread): Some more debugging output.
	(g_io_channel_win32_poll): Remove unused vars.

	* gfileutils.c: Changes for Win32, with no unistd.h and no
	S_ISLNK().

	* gspawn-win32.c: Implementation of the g_spwan_* functions for
	Win32. Due to the general non-Unixness of Win32, much of the
	functionality that is relatively clean to implement on Unix, is
	hard to do on Win32. We must use a separate helper program to
	change directory, close extra file descriptors, redirect the std
	ones, as needed, and only then start the child process. No child
	process pid can be returned, unfortunately. Or if we used
	CreateProcess directly, it probably could. (Now we use the spawnv*
	functions from msvcrt.)

	* glib.def: Add new entry points.

	* glib.def
	* giowin32.c: Remove g_io_channel_win32_wait_for_condition(),
	g_io_channel_win32_poll() subsumes it.

	* gbacktrace.h: G_BREAKPOINT for MSVC (on the ix86).

	* gwin32.c (g_win32_getlocale): Use "sp" for
	LANG_CROATIAN+SUBLANG_SERBIAN_LATIN.

	* makefile.{mingw,msc}.in (glib_OBJECTS): Add new files.
	Add gspawn-win32-helper.exe rule.

	* tests/makefile.{mingw,msc}.in (TESTS): Add shell-test and
	spawn-test.

	* tests/spawn-test.c: (run_tests): On Win32, don't try to run
	/bin/sh, but ipconfig (no special significance in choosing that,
	just a program that outputs something to stdout).
2000-10-16 18:54:29 +00:00

138 lines
3.1 KiB
Plaintext

## Makefile for building the GLib DLL with gcc for mingw. The build
## uses tools running on cygwin, however.
## Use: make -f makefile.mingw
# Change this to wherever you want to install the DLLs. This directory
# should be in your PATH.
BIN = /bin
TOP = ..
include build/win32/make.mingw
# Possibly override GLib version in build/win32/module.defs
GLIB_VER = @GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@
################################################################
# Nothing much configurable below
INCLUDES = -I .
DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib
DEPCFLAGS = $(LIBICONV_CFLAGS)
DLLS_TO_BUILD = \
glib-$(GLIB_VER).dll \
gmodule/gmodule-$(GLIB_VER).dll \
gthread/gthread-$(GLIB_VER).dll \
gobject/gobject-$(GLIB_VER).dll \
all : \
config.h \
glibconfig.h \
$(DLLS_TO_BUILD) \
gspawn-win32-helper.exe \
testglib.exe \
testgdate.exe \
testgdateparser.exe
install : all
$(INSTALL) $(DLLS_TO_BUILD) $(BIN)
glib_OBJECTS = \
garray.o \
gasyncqueue.o \
gbacktrace.o \
gcache.o \
gcompletion.o \
gconvert.o \
gdataset.o \
gdate.o \
gerror.o \
gfileutils.o \
ghook.o \
ghash.o \
giochannel.o \
giowin32.o \
glist.o \
gmain.o \
gmem.o \
gmessages.o \
gnode.o \
gprimes.o \
gqueue.o \
grand.o \
gshell.o \
gslist.o \
gspawn-win32.o \
gthread.o \
gthreadpool.o \
gtimer.o \
gtree.o \
grel.o \
gstring.o \
gstrfuncs.o \
gscanner.o \
gunidecomp.o \
guniprop.o \
gutf8.o \
gutils.o \
gwin32.o
glibconfig.h: glibconfig.h.win32
cp $< $@
config.h: config.h.win32
cp $< $@
makefile.mingw: makefile.mingw.in
sed -e 's,@GLIB[_]MAJOR_VERSION@,@GLIB_MAJOR_VERSION@,' \
-e 's,@GLIB[_]MINOR_VERSION@,@GLIB_MINOR_VERSION@,' <$< >$@
################ glib
glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def
./build-dll glib $(GLIB_VER) glib.def $(glib_OBJECTS) $(LIBICONV_LIBS) -luser32 -lwsock32
gspawn-win32-helper.exe : gspawn-win32.c
$(CC) $(CFLAGS) -mwindows -DGSPAWN_HELPER -DG_LOG_DOMAIN=\"gspawn-win32-helper\" -o $@ $< -L . -lglib-$(GLIB_VER)
################ subdirectories
gmodule/gmodule-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
cd gmodule && $(MAKE) -f makefile.mingw all
gthread/gthread-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
cd gthread && $(MAKE) -f makefile.mingw all
gobject/gobject-$(GLIB_VER).dll : glib-$(GLIB_VER).dll
cd gobject && $(MAKE) -f makefile.mingw all
################ test progs
testglib.o : testglib.c
$(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testglib\" $<
testglib.exe : glib-$(GLIB_VER).dll testglib.o
$(CC) $(CFLAGS) -o testglib testglib.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
testgdate.o : testgdate.c
$(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdate\" $<
testgdate.exe : glib-$(GLIB_VER).dll testgdate.o
$(CC) $(CFLAGS) -o testgdate.exe testgdate.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
testgdateparser.o : testgdateparser.c
$(CC) -c $(CFLAGS) -DG_LOG_DOMAIN=\"testgdateparser\" $<
testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.o
$(CC) $(CFLAGS) -o testgdateparser.exe testgdateparser.o -L . -lglib-$(GLIB_VER) $(LDFLAGS)
################ other stuff
clean::
-rm config.h glibconfig.h gmodule/gmoduleconf.h