[glib] Updated msvc build files



commit 75ef01824803c70f42d412c19d4e61904702e461
Author: Hans Breuer <hans breuer org>
Date:   Sat May 30 15:29:23 2009 +0200

    Updated msvc build files
---
 README.win32           |   13 ++++--
 config.h.win32.in      |    3 +
 gio/makefile.msc       |   82 ++++++++++++++++------------------
 gio/win32/makefile.msc |   35 +++++++++++++++
 glib/makefile.msc.in   |  114 ++++++++++++++++++++++++++----------------------
 glibconfig.h.win32.in  |    5 ++
 tests/makefile.msc.in  |   39 ++++++++--------
 7 files changed, 172 insertions(+), 119 deletions(-)

diff --git a/README.win32 b/README.win32
index 8491997..f5623d2 100644
--- a/README.win32
+++ b/README.win32
@@ -161,14 +161,14 @@ reference manual) for more information.
 Building with MSVC
 ==================
 
-If you are building from a SVN snapshot, you will not have any
+If you are building from a GIT snapshot, you will not have all
 makefile.msc files. You should copy the corresponding makefile.msc.in
 file to that name, and replace any @...@ strings with the correct
-value.
+value (or use the python script de-in.py from http://hans.breuer.org/gtk/de-in.py).
 
 This is done automatically when an official GLib source distribution
 package is built, so if you get GLib from a source distribution
-package, there should be makefile.msc files ready to use (after some
+package, there should be makefile.msc files ready to use (possibly after some
 editing).
 
 The hand-written makefile.msc files, and the stuff in the "build"
@@ -180,7 +180,12 @@ you want to use the VC-UI you can simply create wrapper .dsp makefiles
 (read the VC docs how to do so).
 
 Some modules may require Perl to auto-generate files. The goal (at
-least Hans's) is to not require any more tools.
+least Hans's) is to not require any more tools. Of course you need
+the Microsoft Platform SDK in a recent enough - but not too recent - version.
+The last PSDK for Visual Studio 6 is:
+  http://www.microsoft.com/msdownload/platformsdk/sdkupdate/psdk-full.htm
+At least install the Core SDK, maybe also the "Tablet PC SDK".
+
 
 Build with:
 
diff --git a/config.h.win32.in b/config.h.win32.in
index 7eff542..104cd9d 100644
--- a/config.h.win32.in
+++ b/config.h.win32.in
@@ -598,6 +598,9 @@
 /* Define to 1 if you have the `wcslen' function. */
 #define HAVE_WCSLEN 1
 
+/* We are not checking for windows.h, why this? */
+#define HAVE_WINSOCK2_H 1
+
 /* Define if you have the 'wint_t' type. */
 #define HAVE_WINT_T 1
 
diff --git a/gio/makefile.msc b/gio/makefile.msc
index 906ec40..57656c5 100644
--- a/gio/makefile.msc
+++ b/gio/makefile.msc
@@ -5,7 +5,7 @@ PACKAGE = gio
 PKG_VER = 2.0
 !INCLUDE $(TOP)\glib\build\win32\make.msc
 
-# SUBDIRS = fam
+SUBDIRS = win32
 
 sub-all: 
 	for %d in ($(SUBDIRS)) do nmake -nologo -f makefile.msc sub-one THIS=%d
@@ -38,6 +38,7 @@ gio_headers =			\
 	gdatainputstream.h 	\
 	gdataoutputstream.h 	\
 	gdrive.h 		\
+	gemblem.h		\
 	gemblemedicon.h		\
 	gfile.h 		\
 	gfileattribute.h 	\
@@ -76,6 +77,7 @@ gio_headers =			\
 OBJECTS = \
 	gappinfo.obj \
 	gasynchelper.obj \
+	gasyncinitable.obj \
 	gasyncresult.obj \
 	gbufferedinputstream.obj \
 	gbufferedoutputstream.obj \
@@ -86,6 +88,7 @@ OBJECTS = \
 #	gdesktopappinfo.obj \
 	gdrive.obj \
 	gdummyfile.obj \
+	gemblem.obj \
 	gemblemedicon.obj \
 	gfile.obj \
 	gfileattribute.obj \
@@ -93,29 +96,51 @@ OBJECTS = \
 	gfileicon.obj \
 	gfileinfo.obj \
 	gfileinputstream.obj \
+	gfileiostream.obj \
 	gfilemonitor.obj \
 	gfilenamecompleter.obj \
 	gfileoutputstream.obj \
 	gfilterinputstream.obj \
 	gfilteroutputstream.obj \
 	gicon.obj \
+	ginetaddress.obj \
+	ginetsocketaddress.obj \
+	ginitable.obj \
 	ginputstream.obj \
 	gioenumtypes.obj \
 	gioerror.obj \
 	giomodule.obj \
 	gioscheduler.obj \
+	giostream.obj \
 	gloadableicon.obj \
+	glocalfileiostream.obj \
 	gmemoryinputstream.obj \
 	gmemoryoutputstream.obj \
 	gmount.obj \
 	gmountoperation.obj \
 	gnativevolumemonitor.obj \
+	gnetworkaddress.obj \
+	gnetworkservice.obj \
 	goutputstream.obj \
 	gpollfilemonitor.obj \
+	gresolver.obj \
 	gseekable.obj \
 	gsimpleasyncresult.obj \
-#	gsocketinputstream.obj \
-#	gsocketoutputstream.obj \
+	gsocket.obj \
+	gsocketaddress.obj \
+	gsocketaddressenumerator.obj \
+	gsocketclient.obj \
+	gsocketconnectable.obj \
+	gsocketconnection.obj \
+	gsocketcontrolmessage.obj \
+	gsocketlistener.obj \
+	gsocketservice.obj \
+	gsocketinputstream.obj \
+	gsocketoutputstream.obj \
+	gsrvtarget.obj \
+	gtcpconnection.obj \
+	gthreadedresolver.obj \
+	gthreadedsocketservice.obj \
 	gthemedicon.obj \
 	gunionvolumemonitor.obj \
 	gvfs.obj \
@@ -133,10 +158,9 @@ OBJECTS = \
 	gwin32appinfo.obj \
 	\
 	gio-marshal.obj \
-	gwin32directorymonitor.obj \
 	gwin32mount.obj \
-#	gwin32volume.obj \
-	gwin32volumemonitor.obj
+	gwin32volumemonitor.obj \
+	gwin32resolver.obj 
 
 libgio_2_0_la_LIBADD = \
 	$(top_builddir)/glib/libglib-2.0.la \
@@ -159,39 +183,9 @@ unix_sources = \
 	gunixvolumemonitor.h \
 	$(NULL)
 
-NULL = \
-	
-
-libgio_2_0_la_LDFLAG = \
-	-export-dynamic \
-	$(no_undefined) \
-	-export-symbols-regex \
-	'^g_.*'
-
-giounixincludedi = \
-	$(includedir)/gio-unix-2.0/gio
-
-platform_libadd = \
-	-lshlwapi
-
 marshal_sources = \
 	gio-marshal.h gio-marshal.c $(NULL)
 
-gioincludedi = \
-	$(includedir)/glib-2.0/gio/
-
-EXTRA_DIST = \
-	gio-marshal.list $(NULL)
-
-CLEANFILES = \
-	$(marshal_sources) $(NULL)
-
-no_undefined = \
-	-no-undefined
-
-giounixinclude_HEADERS = \
-	gunixmounts.h $(NULL)
-
 GLIB_GEN_MARSHAL = ..\gobject\glib-genmarshal.exe 
 
 gio-marshal.h: gio-marshal.list
@@ -226,12 +220,13 @@ local_sources = \
 
 all : \
 	$(PRJ_TOP)\config.h \
+	sub-all	\
 	gioalias.h		\
 	gioaliasdef.c		\
 	gio-marshal.c \
 	gioenumtypes.h		\
 	gioenumtypes.c		\
-	libgio-$(PKG_VER).dll
+	libgio-$(PKG_VER)-0.dll
 
 
 $(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
@@ -255,16 +250,17 @@ gio.def: gio.symbols
 		-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
 		-DG_GNUC_PRINTF=;G_GNUC_PRINTF gio.symbols >> gio.def
 
-gwin32directorymonitor.obj : win32\gwin32directorymonitor.c 
-	$(CC) $(CFLAGS) -I win32 -c win32\gwin32directorymonitor.c
-
 RESOURCE = $(PACKAGE).res
 
-libgio-$(PKG_VER).dll : $(OBJECTS) $(PACKAGE).def
-	$(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER).dll $(OBJECTS) \
+$(PACKAGE).res : $(PACKAGE).rc
+	rc -DBUILDNUMBER=0 -r -fo $(PACKAGE).res $(PACKAGE).rc
+
+libgio-$(PKG_VER)-0.dll : $(OBJECTS) win32\giowin32.lib $(PACKAGE).def $(RESOURCE)
+	$(CC) $(CFLAGS) -LD -Felibgio-$(PKG_VER)-0.dll $(OBJECTS) $(RESOURCE) \
 	..\glib\glib-2.0.lib ..\gobject\gobject-2.0.lib ..\gmodule\gmodule-2.0.lib \
+	win32\giowin32.lib \
 	$(INTL_LIBS) \
-	kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib mpr.lib $(LDFLAGS) \
+	kernel32.lib user32.lib advapi32.lib shell32.lib wsock32.lib ws2_32.lib dnsapi.lib mpr.lib $(LDFLAGS) \
 	/implib:gio-2.0.lib /def:$(PACKAGE).def
 
 .c.obj :
diff --git a/gio/win32/makefile.msc b/gio/win32/makefile.msc
new file mode 100644
index 0000000..d3946a2
--- /dev/null
+++ b/gio/win32/makefile.msc
@@ -0,0 +1,35 @@
+TOP = ..\..\..
+PRJ_TOP = ..\..
+PACKAGE = giowin32
+PKG_VER = 2.0
+!INCLUDE $(TOP)\glib\build\win32\make.msc
+
+INCLUDES = \
+	-FImsvc_recommended_pragmas.h \
+	-I .. -I ..\.. -I ..\..\glib -I ..\..\gmodule -I . \
+	$(INTL_CFLAGS)
+
+DEFINES = \
+	-DG_LOG_DOMAIN=\"GLib-GIO\" \
+	-DGIO_MODULE_DIR=\"$(libdir)/gio/modules\" \
+	-DGIO_COMPILATION
+
+OBJECTS = \
+	gwin32directorymonitor.obj \
+	gwinhttpfile.obj \
+	gwinhttpfileinputstream.obj \
+	gwinhttpfileoutputstream.obj \
+	gwinhttpvfs.obj \
+
+all : \
+	$(PRJ_TOP)\config.h \
+	$(PACKAGE).lib
+
+$(PRJ_TOP)\config.h: $(PRJ_TOP)\config.h.win32
+	copy $(PRJ_TOP)\config.h.win32 $(PRJ_TOP)\config.h
+
+$(PACKAGE).lib : $(OBJECTS)
+	lib /out:$(PACKAGE).lib $(OBJECTS)
+
+.c.obj :
+	$(CC) $(CFLAGS) -c $(PKG_CFLAGS) $<
diff --git a/glib/makefile.msc.in b/glib/makefile.msc.in
index ebaeff3..e13673a 100644
--- a/glib/makefile.msc.in
+++ b/glib/makefile.msc.in
@@ -8,7 +8,11 @@ TOP = ..\..
 ################################################################
 
 INCLUDES = -FImsvc_recommended_pragmas.h -I . -I ..
-DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" -DG_ENABLE_DEBUG -DPCRE_STATIC
+DEFINES = \
+	-DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" \
+	-DG_ENABLE_DEBUG -DPCRE_STATIC -DG_DISABLE_DEPRECATED \
+	-DDLL_EXPORT=1
+
 DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(DIRENT_CFLAGS)
 
 all :				\
@@ -21,6 +25,7 @@ all :				\
 	libglib-2.0-0.dll \
 	glib- GLIB_MAJOR_VERSION@  GLIB_MINOR_VERSION@s.lib \
 	gspawn-win32-helper.exe	\
+	gspawn-win32-helper-console.exe	\
 
 
 gnulib\gnulib.lib :
@@ -39,56 +44,58 @@ glib_OBJECTS =			\
 	gatomic.obj	\
 	gbacktrace.obj		\
 	gbase64.obj	\
-	gbookmarkfile.obj 	\
-	gcache.obj		\
+	gbookmarkfile.obj \
+	gcache.obj \
 	gchecksum.obj	\
-	gcompletion.obj		\
-	gconvert.obj		\
-	gdataset.obj		\
-	gdate.obj		\
-	gdir.obj	\
-	gerror.obj		\
-	gfileutils.obj		\
-	ghash.obj		\
-	ghook.obj		\
-	giochannel.obj		\
-	giowin32.obj		\
-	gkeyfile.obj		\
-	glist.obj		\
-	gmain.obj		\
+	gcompletion.obj	\
+	gconvert.obj \
+	gdataset.obj \
+	gdate.obj \
+	gdir.obj \
+	gerror.obj \
+	gfileutils.obj \
+	ghash.obj \
+	ghostutils.obj \
+	ghook.obj \
+	giochannel.obj \
+	giowin32.obj \
+	gpoll.obj \
+	gkeyfile.obj \
+	glist.obj \
+	gmain.obj \
 	gmappedfile.obj	\
-	gmarkup.obj		\
-	gmem.obj		\
-	gmessages.obj		\
-	gnode.obj		\
-	goption.obj	\
-	gpattern.obj	\
-	gprimes.obj		\
-	gprintf.obj	\
-	gqsort.obj		\
-	gqueue.obj		\
-	grand.obj		\
-	gregex.obj		\
-	grel.obj		\
-	gscanner.obj		\
-	gsequence.obj	\
-	gshell.obj		\
-	gslice.obj	\
-	gslist.obj		\
-	gspawn-win32.obj	\
-	gstdio.obj	\
-	gstrfuncs.obj		\
-	gstring.obj		\
-	gtestutils.obj	\
-	gthread.obj		\
-	gthreadpool.obj		\
-	gtimer.obj		\
-	gtree.obj		\
-	gunibreak.obj		\
-	gunicollate.obj		\
-	gunidecomp.obj		\
-	guniprop.obj		\
-	gurifuncs.obj	\
+	gmarkup.obj \
+	gmem.obj \
+	gmessages.obj \
+	gnode.obj \
+	goption.obj \
+	gpattern.obj \
+	gprimes.obj \
+	gprintf.obj \
+	gqsort.obj \
+	gqueue.obj \
+	grand.obj \
+	gregex.obj \
+	grel.obj \
+	gscanner.obj \
+	gsequence.obj \
+	gshell.obj \
+	gslice.obj \
+	gslist.obj \
+	gspawn-win32.obj \
+	gstdio.obj \
+	gstrfuncs.obj \
+	gstring.obj \
+	gtestutils.obj \
+	gthread.obj \
+	gthreadpool.obj \
+	gtimer.obj \
+	gtree.obj \
+	gunibreak.obj \
+	gunicollate.obj \
+	gunidecomp.obj \
+	guniprop.obj \
+	gurifuncs.obj \
 	gutf8.obj		\
 	gutils.obj		\
 	gwin32.obj		\
@@ -106,14 +113,14 @@ galias.h: glib.symbols
 galiasdef.c: glib.symbols
 	  perl makegalias.pl -def < glib.symbols > galiasdef.c
 
-localcharset.c : libcharset/localcharset.c
-	copy libcharset\localcharset.c localcharset.c
+localcharset.obj : libcharset\localcharset.c
+	$(CC) $(CFLAGS) -DLIBDIR=\".\" -c libcharset\localcharset.c
 
 glib.def: glib.symbols
 	echo EXPORTS > glib.def
 	cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES \
 		-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
-		-DG_GNUC_PRINTF=;G_GNUC_PRINTF glib.symbols >> glib.def
+		-DG_GNUC_PRINTF=;G_GNUC_PRINTF -DG_GNUC_FORMAT=;G_GNUC_FORMAT glib.symbols >> glib.def
 
 glib.res : glib.rc
 	rc -DBUILDNUMBER=0 -r -fo glib.res glib.rc
@@ -133,6 +140,9 @@ libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib pcre\pcre.lib glib.def gli
 gspawn-win32-helper.exe : gspawn-win32-helper.c libglib-2 0- LT_CURRENT_MINUS_AGE@.dll
 	$(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:windows user32.lib
 
+gspawn-win32-helper-console.exe : gspawn-win32-helper.c libglib-2 0- LT_CURRENT_MINUS_AGE@.dll
+	$(CC) $(CFLAGS) -Fe$@ -DG_LOG_DOMAIN=\"gspawn-win32-helper\" gspawn-win32-helper.c glib-2.0.lib $(LDFLAGS) /subsystem:console user32.lib
+
 ################ other stuff
 
 clean::
diff --git a/glibconfig.h.win32.in b/glibconfig.h.win32.in
index eb1bfdd..59f24c8 100644
--- a/glibconfig.h.win32.in
+++ b/glibconfig.h.win32.in
@@ -255,9 +255,14 @@ union _GSystemThread
  */
 typedef void * GPid;
 
+#define GLIB_SYSDEF_AF_UNIX 1
 #define GLIB_SYSDEF_AF_INET 2
 #define GLIB_SYSDEF_AF_INET6 23
 
+#define GLIB_SYSDEF_MSG_OOB       1
+#define GLIB_SYSDEF_MSG_PEEK      2
+#define GLIB_SYSDEF_MSG_DONTROUTE 4
+
 G_END_DECLS
 
 #endif /* GLIBCONFIG_H */
diff --git a/tests/makefile.msc.in b/tests/makefile.msc.in
index d801fa0..f87c58f 100644
--- a/tests/makefile.msc.in
+++ b/tests/makefile.msc.in
@@ -19,7 +19,6 @@ NONAUTOMATIC_TESTS = \
 
 TESTS = \
 	atomic-test.exe \
-	array-test.exe	\
 	asyncqueue-test.exe \
 	base64-test.exe \
 	bit-test.exe \
@@ -36,36 +35,36 @@ TESTS = \
 	gio-test.exe	\
 	iochannel-test.exe \
 	hash-test.exe	\
-	keyfile-test.exe \
 	list-test.exe	\
 	mainloop-test.exe \
 	mapping-test.exe \
+#c99	markup-collect.exe \
 	markup-escape-test.exe \
 	markup-test.exe	\
 #main?	memchunks.exe \
 	module-test.exe	\
 	node-test.exe	\
-	option-test.exe \
+#c99	onceinit.exe \
 	patterntest.exe \
-	printf-test.exe \
 	queue-test.exe	\
 	qsort-test.exe \
-	rand-test.exe	\
 	regex-test.exe \
 	relation-test.exe \
-#_?	sequence-test.exe \
+	scannerapi.exe \
+	sequence-test.exe \
 	shell-test.exe	\
 	slice-color.exe \
+#unistd	slice-concurrent.exe\
+	slice-threadinit.exe \
 	slice-test.exe	\
 	slist-test.exe	\
 	spawn-test.exe	\
-# strfunc-test doesn't compile with MSVC
-#	strfunc-test.exe\
-	string-test.exe	\
-# strtod-test doesn't either
-#	strtod-test.exe \
+	testingbase64.exe \
 	thread-test.exe	\
-	threadpool-test.exe\
+	threadpool-test.exe \
+#unistd	timeloop-basic.exe \
+#unistd	timeloop-closure.exe \
+#unistd	timeloop.exe \
 	tree-test.exe	\
 	type-test.exe	\
 	unicode-caseconv.exe \
@@ -73,8 +72,8 @@ TESTS = \
 	utf8-validate.exe \
 	utf8-pointer.exe \
 	uri-test.exe \
-	\
-	gio-ls.exe
+	\
+	gio-ls.exe
 
 DLLS = \
 	libmoduletestplugin_a.dll \
@@ -86,12 +85,12 @@ all :	$(TESTS) $(NONAUTOMATIC_TESTS) $(DLLS)
 	$(CC) $(CFLAGS) -c $<
 	$(CC) $(CFLAGS) -Fe$@ $< ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console
 
-gio-ls.exe : gio-ls.obj
-	$(CC) $(CFLAGS) -Fe$@ gio-ls.obj \
-	..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib \
-	..\gobject\gobject-2.0.lib ..\gio\gio-2.0.lib \
-	$(LDFLAGS) user32.lib /subsystem:console
-
+gio-ls.exe : gio-ls.obj
+	$(CC) $(CFLAGS) -Fe$@ gio-ls.obj \
+	..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib \
+	..\gobject\gobject-2.0.lib ..\gio\gio-2.0.lib \
+	$(LDFLAGS) user32.lib /subsystem:console
+
 slice-test.exe : memchunks.obj slice-test.obj 
 	$(CC) $(CFLAGS) -Fe$@ memchunks.obj slice-test.obj \
 	..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib ..\gthread\gthread-2.0.lib $(LDFLAGS) user32.lib /subsystem:console



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]