Home | History | Annotate | Download | only in gobject
      1 ## Makefile for building the gobject dll with Microsoft C
      2 ## Use: nmake -f makefile.msc install
      3 
      4 TOP = ..\..
      5 
      6 !INCLUDE ..\build\win32\make.msc
      7 
      8 ################################################################
      9 
     10 INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib
     11 DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" \
     12 		-DG_ENABLE_DEBUG
     13 #		-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS
     14 #		-DG_DISABLE_CAST_CHECKS
     15 
     16 all :				\
     17 	glib-genmarshal.exe     \
     18 	gmarshal.h              \
     19 	gmarshal.c              \
     20 	gobjectalias.h	\
     21 	gobjectaliasdef.c \
     22 	gmarshal.strings \
     23 	gobject-query.exe \
     24 	libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll	\
     25 	gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION (at] s.lib \
     26 	testgobject.exe
     27 
     28 gobject_OBJECTS =		\
     29 	gboxed.obj		\
     30 	gclosure.obj		\
     31 	genums.obj		\
     32 	gobject.obj		\
     33 	gparam.obj		\
     34 	gparamspecs.obj		\
     35 	gsignal.obj		\
     36 	gsourceclosure.obj	\
     37 	gtype.obj		\
     38 	gtypemodule.obj		\
     39 	gtypeplugin.obj		\
     40 	gvalue.obj		\
     41 	gvaluearray.obj		\
     42 	gvaluetypes.obj	\
     43 	gvaluetransform.obj
     44 
     45 gobjectalias.h: gobject.symbols
     46 	perl makegobjectalias.pl < gobject.symbols > gobjectalias.h
     47 
     48 gobjectaliasdef.c: gobject.symbols
     49 	perl makegobjectalias.pl -def < gobject.symbols > gobjectaliasdef.c
     50 
     51 gobject.def: gobject.symbols
     52 	echo EXPORTS > gobject.def
     53 	cl /EP -DINCLUDE_VARIABLES -DG_OS_WIN32 -DALL_FILES \
     54 		-DG_GNUC_MALLOC= -DG_GNUC_CONST= -DG_GNUC_NULL_TERMINATED= -DG_GNUC_NORETURN= \
     55 		-DG_GNUC_PRINTF=;G_GNUC_PRINTF gobject.symbols >> gobject.def
     56 
     57 gobject.res : gobject.rc
     58 	rc -DBUILDNUMBER=0 -r -fo gobject.res gobject.rc
     59 
     60 gmarshal.h : gmarshal.list glib-genmarshal.exe
     61 	echo #ifndef __G_MARSHAL_H__ > xgen-gmh
     62 	echo #define __G_MARSHAL_H__ >> xgen-gmh
     63 	glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --header >> xgen-gmh
     64 	echo #endif /* __G_MARSHAL_H__ */ >> xgen-gmh
     65 	copy xgen-gmh gmarshal.h
     66 
     67 gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe
     68 	glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body > gmarshal.c
     69 
     70 libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(gobject_OBJECTS) gobject.def gobject.res
     71 	$(CC) $(CFLAGS) -Fm -LD -Fe$@ $(gobject_OBJECTS) gobject.res \
     72 	..\glib\glib-2.0.lib $(LDFLAGS) /implib:gobject-2.0.lib /def:gobject.def || del $@
     73 
     74 gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION (at] s.lib : $(gobject_OBJECTS) 
     75 	lib /out:$@ $(gobject_OBJECTS)
     76 
     77 # link glib's static version to avoid installing 
     78 glib-genmarshal.exe : glib-genmarshal.c gmarshal.strings
     79 	$(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION glib-genmarshal.c \
     80 	..\glib\glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION (at] s.lib user32.lib advapi32.lib ole32.lib shell32.lib $(INTL_LIBS) 
     81 
     82 gobject-query.exe : gobject-query.c libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll
     83 	$(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION gobject-query.c \
     84 	..\glib\glib-2.0.lib gobject-2.0.lib user32.lib advapi32.lib $(INTL_LIBS)
     85 
     86 gmarshal.strings : gmarshal.list
     87 	perl marshal-genstrings.pl > gmarshal.strings
     88 
     89 .c.exe :
     90 	$(CC) $(CFLAGS) -c $<
     91 	$(CC) $(CFLAGS) -Fe$@ $< gobject-2.0.lib ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib $(LDFLAGS) user32.lib /subsystem:console
     92