Commit b3a8c328 authored by Hans Breuer's avatar Hans Breuer Committed by Hans Breuer

better filtering of G_GNUC_* stuff when generating .def files. Now also

2006-09-17  Hans Breuer  <hans@breuer.org>

	* glib/makefile.msc.in gobject/makefile.msc.in : better filtering
	of G_GNUC_* stuff when generating .def files. Now also works with
	newer (less tolerant) linkers, e.g. from vc2500e
parent 5c164314
2006-09-17 Hans Breuer <hans@breuer.org>
* glib/makefile.msc.in gobject/makefile.msc.in : better filtering
of G_GNUC_* stuff when generating .def files. Now also works with
newer (less tolerant) linkers, e.g. from vc2500e
2006-09-10 Matthias Clasen <mclasen@redhat.com> 2006-09-10 Matthias Clasen <mclasen@redhat.com>
* glib/gbacktrace.c: Assume string.h is available. * glib/gbacktrace.c: Assume string.h is available.
......
## Makefile for building the GLib dlls with Microsoft C ## Makefile for building the gobject dll with Microsoft C
## Use: nmake -f makefile.msc ## Use: nmake -f makefile.msc install
TOP = ..\.. TOP = ..\..
...@@ -7,122 +7,85 @@ TOP = ..\.. ...@@ -7,122 +7,85 @@ TOP = ..\..
################################################################ ################################################################
INCLUDES = -FImsvc_recommended_pragmas.h -I . -I .. INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib
DEFINES = -DHAVE_CONFIG_H -DGLIB_COMPILATION -DG_LOG_DOMAIN=\"GLib\" -DG_ENABLE_DEBUG DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" \
DEPCFLAGS = -Zm400 $(INTL_CFLAGS) $(LIBICONV_CFLAGS) $(DIRENT_CFLAGS) -DG_ENABLE_DEBUG
# -DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS
# -DG_DISABLE_CAST_CHECKS
all : \ all : \
..\config.h \ glib-genmarshal.exe \
..\glibconfig.h \ gmarshal.h \
galias.h \ gmarshal.c \
galiasdef.c \ gobjectalias.h \
gnulib\gnulib.lib \ gobjectaliasdef.c \
libglib-2.0-0.dll \ gmarshal.strings \
glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \ gobject-query.exe \
gspawn-win32-helper.exe \ libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll \
gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \
testgobject.exe
gnulib\gnulib.lib :
cd gnulib gobject_OBJECTS = \
nmake -f makefile.msc gboxed.obj \
cd .. gclosure.obj \
genums.obj \
glib_OBJECTS = \ gobject.obj \
garray.obj \ gparam.obj \
gasyncqueue.obj \ gparamspecs.obj \
gatomic.obj \ gsignal.obj \
gbacktrace.obj \ gsourceclosure.obj \
gbase64.obj \ gtype.obj \
gbookmarkfile.obj \ gtypemodule.obj \
gcache.obj \ gtypeplugin.obj \
gcompletion.obj \ gvalue.obj \
gconvert.obj \ gvaluearray.obj \
gdataset.obj \ gvaluetypes.obj \
gdate.obj \ gvaluetransform.obj
gdir.obj \
gerror.obj \ gobjectalias.h: gobject.symbols
gfileutils.obj \ perl makegobjectalias.pl < gobject.symbols > gobjectalias.h
ghash.obj \
ghook.obj \ gobjectaliasdef.c: gobject.symbols
gkeyfile.obj \ perl makegobjectalias.pl -def < gobject.symbols > gobjectaliasdef.c
gmappedfile.obj \
giochannel.obj \ gobject.def: gobject.symbols
giowin32.obj \ echo EXPORTS > gobject.def
glist.obj \ cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES \
gmain.obj \ -DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
gmarkup.obj \ -DG_GNUC_PRINTF=;G_GNUC_PRINTF gobject.symbols >> gobject.def
gmem.obj \
gmessages.obj \ gobject.res : gobject.rc
gnode.obj \ rc -DBUILDNUMBER=0 -r -fo gobject.res gobject.rc
goption.obj \
gprimes.obj \ gmarshal.h : gmarshal.list glib-genmarshal.exe
gqsort.obj \ echo #ifndef __G_MARSHAL_H__ > xgen-gmh
gqueue.obj \ echo #define __G_MARSHAL_H__ >> xgen-gmh
gpattern.obj \ glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --header >> xgen-gmh
gprintf.obj \ echo #endif /* __G_MARSHAL_H__ */ >> xgen-gmh
grand.obj \ copy xgen-gmh gmarshal.h
grel.obj \
gscanner.obj \ gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe
gshell.obj \ glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body > gmarshal.c
gslice.obj \
gslist.obj \ libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(gobject_OBJECTS) gobject.def gobject.res
gspawn-win32.obj \ $(CC) $(CFLAGS) -Fm -LD -Fe$@ $(gobject_OBJECTS) gobject.res \
gstdio.obj \ ..\glib\glib-2.0.lib $(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def || del $@
gstrfuncs.obj \
gstring.obj \ gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(gobject_OBJECTS)
gthread.obj \ lib /out:$@ $(gobject_OBJECTS)
gthreadpool.obj \
gtimer.obj \ # link glib's static version to avoid installing
gtree.obj \ glib-genmarshal.exe : glib-genmarshal.c gmarshal.strings
gunibreak.obj \ $(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION glib-genmarshal.c \
gunicollate.obj \ ..\glib\glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib user32.lib advapi32.lib ole32.lib shell32.lib $(INTL_LIBS) $(LIBICONV_LIBS)
gunidecomp.obj \
guniprop.obj \ gobject-query.exe : gobject-query.c libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll
gutf8.obj \ $(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION gobject-query.c \
gutils.obj \ ..\glib\glib-2.0.lib gobject-2.0.lib user32.lib advapi32.lib $(INTL_LIBS) $(LIBICONV_LIBS)
gwin32.obj \
localcharset.obj gmarshal.strings : gmarshal.list
perl marshal-genstrings.pl > gmarshal.strings
..\glibconfig.h: ..\glibconfig.h.win32
copy ..\glibconfig.h.win32 ..\glibconfig.h .c.exe :
$(CC) $(CFLAGS) -c $<
..\config.h: ..\config.h.win32 $(CC) $(CFLAGS) -Fe$@ $< gobject-2.0.lib ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib $(LDFLAGS) user32.lib /subsystem:console
copy ..\config.h.win32 ..\config.h
galias.h: glib.symbols
perl makegalias.pl < glib.symbols > galias.h
galiasdef.c: glib.symbols
perl makegalias.pl -def < glib.symbols > galiasdef.c
localcharset.c : libcharset/localcharset.c
copy libcharset\localcharset.c localcharset.c
glib.def: glib.symbols
echo EXPORTS > glib.def
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DINCLUDE_INTERNAL_SYMBOLS -DALL_FILES glib.symbols >> glib.def
glib.res : glib.rc
rc -DBUILDNUMBER=0 -r -fo glib.res glib.rc
################ glib
# create a static libary
# static library can well have the real version number in the name
glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(glib_OBJECTS) gnulib\gnulib.lib
lib /out:glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib $(glib_OBJECTS) gnulib\gnulib.lib
libglib-2.0-0.dll : $(glib_OBJECTS) gnulib\gnulib.lib glib.def glib.res
$(CC) $(CFLAGS) -LD -Fe$@ $(glib_OBJECTS) glib.res $(LIBICONV_LIBS) $(INTL_LIBS) \
gnulib\gnulib.lib $(DIRENT_LIBS) user32.lib advapi32.lib shell32.lib wsock32.lib ole32.lib ws2_32.lib \
$(LDFLAGS) /implib:glib-2.0.lib /def:glib.def
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
################ other stuff
clean::
del ..\config.h
del ..\glibconfig.h
...@@ -50,7 +50,9 @@ gobjectaliasdef.c: gobject.symbols ...@@ -50,7 +50,9 @@ gobjectaliasdef.c: gobject.symbols
gobject.def: gobject.symbols gobject.def: gobject.symbols
echo EXPORTS > gobject.def echo EXPORTS > gobject.def
cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES gobject.symbols >> gobject.def cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES \
-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
-DG_GNUC_PRINTF=;G_GNUC_PRINTF gobject.symbols >> gobject.def
gobject.res : gobject.rc gobject.res : gobject.rc
rc -DBUILDNUMBER=0 -r -fo gobject.res gobject.rc rc -DBUILDNUMBER=0 -r -fo gobject.res gobject.rc
...@@ -67,7 +69,7 @@ gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe ...@@ -67,7 +69,7 @@ gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe
libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(gobject_OBJECTS) gobject.def gobject.res libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(gobject_OBJECTS) gobject.def gobject.res
$(CC) $(CFLAGS) -Fm -LD -Fe$@ $(gobject_OBJECTS) gobject.res \ $(CC) $(CFLAGS) -Fm -LD -Fe$@ $(gobject_OBJECTS) gobject.res \
..\glib\glib-2.0.lib $(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def ..\glib\glib-2.0.lib $(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def || del $@
gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(gobject_OBJECTS) gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(gobject_OBJECTS)
lib /out:$@ $(gobject_OBJECTS) lib /out:$@ $(gobject_OBJECTS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment