Skip to content

Commit

Permalink
Updated msvc build files
Browse files Browse the repository at this point in the history
  • Loading branch information
Hans Breuer committed May 30, 2009
1 parent 7801854 commit 75ef018
Show file tree
Hide file tree
Showing 7 changed files with 172 additions and 119 deletions.
13 changes: 9 additions & 4 deletions README.win32
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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:

Expand Down
3 changes: 3 additions & 0 deletions config.h.win32.in
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
82 changes: 39 additions & 43 deletions gio/makefile.msc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -38,6 +38,7 @@ gio_headers = \
gdatainputstream.h \
gdataoutputstream.h \
gdrive.h \
gemblem.h \
gemblemedicon.h \
gfile.h \
gfileattribute.h \
Expand Down Expand Up @@ -76,6 +77,7 @@ gio_headers = \
OBJECTS = \
gappinfo.obj \
gasynchelper.obj \
gasyncinitable.obj \
gasyncresult.obj \
gbufferedinputstream.obj \
gbufferedoutputstream.obj \
Expand All @@ -86,36 +88,59 @@ OBJECTS = \
# gdesktopappinfo.obj \
gdrive.obj \
gdummyfile.obj \
gemblem.obj \
gemblemedicon.obj \
gfile.obj \
gfileattribute.obj \
gfileenumerator.obj \
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 \
Expand All @@ -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 \
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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 :
Expand Down
35 changes: 35 additions & 0 deletions gio/win32/makefile.msc
Original file line number Diff line number Diff line change
@@ -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) $<
Loading

0 comments on commit 75ef018

Please sign in to comment.