diff options
author | Tor Lillqvist <tml@src.gnome.org> | 1999-01-16 23:46:42 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 1999-01-16 23:46:42 +0000 |
commit | f477518c3af60dccfdd172abee0c7368e8f44189 (patch) | |
tree | a49e3518958eb7d6525068b2489b3e87f724d145 /makefile.msc | |
parent | 883776f0353e0cf3bf60f854bb1795e921748dcd (diff) |
Merge in current Win32 version. Almost no Unix code touched.
* README.win32: More text.
* config.h.win32 glibconfig.h.win32: Update to match the
corresponding generated files on Unix.
* makefile.msc: Update with new source files, and gthread
library. Use the compiler flag -MD instead of using -D_DLL and
"/nodefaultlib:libc msvcrt.lib" in the link phase.
* glib.def: Include new functions, drop removed ones.
* glib.h: Add comments about main loop and polling on Win32. (In
general, it's only for the GIMP's use.) Add Win32 IO Channel
functions. Remove the obsoleted old IO Channel stuff (which was
in #if 0 already).
* giowin32.c: New file.
* gmain.c: Include config.h, conditionalize <sys/time.h>
inclusion. Add g_poll implementation for Win32 (only for the
GIMP's needs for now, it's hard or even impossible to be as clean
and generic as on Unix). Implement g_get_current_time on Win32. If
threads aren't supported, don't try to wake up main thread's
loop. On Win32, use a semaphore and not a pipe to wake up the main
loop.
* gmessages.c: On Win32, allocate a console window if the standard
output handle is invalid before writing to stdout, and reopen stdout
to that console window.
* giochannel.c: Conditionalize unistd.h inclusion. Some indentation
cleanup.
* gstrfuncs.c: Include <signal.h>.
* gutils.c: On Win32, also check the HOMEDRIVE and HOMEPATH
environment variables.
* gmodule-dl.c gmodule-dld.c: In
_g_module_build_path, don't add the "lib" prefix and
".so" or ".sl" suffix if already there.
* gmodule-win32.c: Likewise for the ".dll" suffix.
* gthread-posix.c: Conditionalize <sys/time.h> inclusion.
Diffstat (limited to 'makefile.msc')
-rw-r--r-- | makefile.msc | 72 |
1 files changed, 57 insertions, 15 deletions
diff --git a/makefile.msc b/makefile.msc index 6a7f9b6e2..3b2b77fb5 100644 --- a/makefile.msc +++ b/makefile.msc @@ -1,24 +1,29 @@ -## Makefile for building the GLib and gmodule dll with Microsoft C +## Makefile for building the GLib, gmodule and gthread dlls with Microsoft C ## Use: nmake -f makefile.msc install # Change this to wherever you want to install the DLLs. This directory # should be in your PATH. BIN = C:\bin +# This is the Cygnus pthread-win32, +# see http://sourceware.cygnus.com/pthreads-win32/ +PTHREAD_LIB = ..\lib\pthread.lib +PTHREAD_INC = ..\include + ################################################################ # Nothing much configurable below # cl -? described the options -CC = cl -G5 -GF -Ox -W3 -D_DLL -nologo +CC = cl -G5 -GF -Ox -W3 -MD -nologo -LDFLAGS = /link /nodefaultlib:libc msvcrt.lib # /debug:full /debugtype:cv +# No general LDFLAGS needes +LDFLAGS = /link INSTALL = copy -TOUCH = copy makefile.msc+nul GLIB_VER = 1.1 -CFLAGS = -I. +CFLAGS = -I. -DHAVE_CONFIG_H all : \ glibconfig.h \ @@ -26,24 +31,34 @@ all : \ glib-$(GLIB_VER).dll \ gmodule\gmoduleconf.h \ gmodule-$(GLIB_VER).dll \ + gthread-$(GLIB_VER).dll \ testglib.exe \ - testgmodule.exe + testgmodule.exe \ + testgdate.exe \ + testgdateparser.exe \ + testgthread.exe install : all $(INSTALL) glib-$(GLIB_VER).dll $(BIN) $(INSTALL) gmodule-$(GLIB_VER).dll $(BIN) + $(INSTALL) gthread-$(GLIB_VER).dll $(BIN) glib_OBJECTS = \ garray.obj \ gcache.obj \ gcompletion.obj \ gdataset.obj \ + gdate.obj \ gerror.obj \ ghook.obj \ ghash.obj \ + giochannel.obj \ + giowin32.obj \ glist.obj \ + gmain.obj \ gmem.obj \ gmessages.obj \ + gmutex.obj \ gnode.obj \ gprimes.obj \ gslist.obj \ @@ -55,8 +70,8 @@ glib_OBJECTS = \ gscanner.obj \ gutils.obj -glib-$(GLIB_VER).dll : $(glib_OBJECTS) - $(CC) $(CFLAGS) -MD -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) user32.lib advapi32.lib $(LDFLAGS) /def:glib.def +glib-$(GLIB_VER).dll : $(glib_OBJECTS) glib.def + $(CC) $(CFLAGS) -LD -Feglib-$(GLIB_VER).dll $(glib_OBJECTS) user32.lib advapi32.lib wsock32.lib $(LDFLAGS) /def:glib.def glibconfig.h: glibconfig.h.win32 copy glibconfig.h.win32 glibconfig.h @@ -65,44 +80,71 @@ config.h: config.h.win32 copy config.h.win32 config.h .c.obj : - $(CC) $(CFLAGS) -GD -c -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $< + $(CC) $(CFLAGS) -GD -c -DGLIB_COMPILATION -DG_LOG_DOMAIN=g_log_domain_glib $< gmodule_OBJECTS = \ gmodule.obj gmodule-$(GLIB_VER).dll : $(gmodule_OBJECTS) - $(CC) $(CFLAGS) -MD -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule\gmodule.def + $(CC) $(CFLAGS) -LD -Fegmodule-$(GLIB_VER).dll $(gmodule_OBJECTS) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gmodule\gmodule.def gmodule.obj : gmodule\gmodule.c gmodule\gmodule-win32.c - $(CC) $(CFLAGS) -Igmodule -c -DG_LIB_DOMAIN=g_log_domain_gmodule gmodule\gmodule.c + $(CC) $(CFLAGS) -GD -Igmodule -c -DG_LOG_DOMAIN=g_log_domain_gmodule gmodule\gmodule.c gmodule\gmoduleconf.h: gmodule\gmoduleconf.h.win32 copy gmodule\gmoduleconf.h.win32 gmodule\gmoduleconf.h +gthread_OBJECTS = \ + gthread.obj + +gthread-$(GLIB_VER).dll : $(gthread_OBJECTS) + $(CC) $(CFLAGS) -LD -Fegthread-$(GLIB_VER).dll $(gthread_OBJECTS) glib-$(GLIB_VER).lib $(PTHREAD_LIB) glib-$(GLIB_VER).lib $(LDFLAGS) /def:gthread\gthread.def + +gthread.obj : gthread\gthread.c gthread\gthread-posix.c + $(CC) $(CFLAGS) -GD -I$(PTHREAD_INC) -DG_LOG_DOMAIN=\"GThread\" -c gthread\gthread.c + testglib.exe : glib-$(GLIB_VER).dll testglib.obj - $(CC) $(CFLAGS) -MD -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /map + $(CC) $(CFLAGS) -Fetestglib.exe testglib.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console testglib.obj : testglib.c $(CC) -c $(CFLAGS) testglib.c +testgdate.exe : glib-$(GLIB_VER).dll testgdate.obj + $(CC) $(CFLAGS) -Fetestgdate.exe testgdate.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console + +testgdate.obj : testgdate.c + $(CC) -c $(CFLAGS) testgdate.c + +testgdateparser.exe : glib-$(GLIB_VER).dll testgdateparser.obj + $(CC) $(CFLAGS) -Fetestgdateparser.exe testgdateparser.obj glib-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console + +testgdateparser.obj : testgdateparser.c + $(CC) -c $(CFLAGS) testgdateparser.c + testgmodule.exe : glib-$(GLIB_VER).dll gmodule-$(GLIB_VER).dll testgmodule.obj libgplugin_a.dll libgplugin_b.dll - $(CC) $(CFLAGS) -MD testgmodule.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) + $(CC) $(CFLAGS) testgmodule.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) /subsystem:console testgmodule.obj : gmodule\testgmodule.c $(CC) $(CFLAGS) -Igmodule -c gmodule\testgmodule.c libgplugin_a.dll : libgplugin_a.obj - $(CC) $(CFLAGS) -MD -LD libgplugin_a.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) + $(CC) $(CFLAGS) -LD libgplugin_a.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) libgplugin_a.obj : gmodule\libgplugin_a.c $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_a.c libgplugin_b.dll : libgplugin_b.obj - $(CC) $(CFLAGS) -MD -LD libgplugin_b.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) + $(CC) $(CFLAGS) -LD libgplugin_b.obj glib-$(GLIB_VER).lib gmodule-$(GLIB_VER).lib $(LDFLAGS) libgplugin_b.obj : gmodule\libgplugin_b.c $(CC) $(CFLAGS) -Igmodule -c gmodule\libgplugin_b.c +testgthread.exe : glib-$(GLIB_VER).dll gthread-$(GLIB_VER).dll testgthread.obj + $(CC) $(CFLAGS) testgthread.obj glib-$(GLIB_VER).lib gthread-$(GLIB_VER).lib $(PTHREAD_LIB) $(LDFLAGS) /subsystem:console + +testgthread.obj : gthread\testgthread.c + $(CC) $(CFLAGS) -I$(PTHREAD_INC) -c gthread\testgthread.c + clean: del config.h del glibconfig.h |