makefile.msc.in 3.08 KB
Newer Older
1 2 3 4 5
## Makefile for building the gobject dll with Microsoft C
## Use: nmake -f makefile.msc install

TOP = ..\..

Tor Lillqvist's avatar
Update.  
Tor Lillqvist committed
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\" \
Hans Breuer's avatar
Hans Breuer committed
12 13 14
		-DG_ENABLE_DEBUG
#		-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS
#		-DG_DISABLE_CAST_CHECKS
15

Tor Lillqvist's avatar
Tor Lillqvist committed
16
all :				\
17 18 19
	glib-genmarshal.exe     \
	gmarshal.h              \
	gmarshal.c              \
Hans Breuer's avatar
updated  
Hans Breuer committed
20
	gobjectalias.h	\
21
	gobjectaliasdef.c \
22 23
	gmarshal.strings \
	gobject-query.exe \
24
	libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll	\
25
	gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \
26
	testgobject.exe
27

28 29 30 31 32 33 34 35
gobject_OBJECTS =		\
	gboxed.obj		\
	gclosure.obj		\
	genums.obj		\
	gobject.obj		\
	gparam.obj		\
	gparamspecs.obj		\
	gsignal.obj		\
36
	gsourceclosure.obj	\
37
	gtype.obj		\
38
	gtypemodule.obj		\
Tor Lillqvist's avatar
Tor Lillqvist committed
39
	gtypeplugin.obj		\
40
	gvalue.obj		\
41 42 43
	gvaluearray.obj		\
	gvaluetypes.obj	\
	gvaluetransform.obj
44

45 46 47
gobjectalias.h: gobject.symbols
	perl makegobjectalias.pl < gobject.symbols > gobjectalias.h

48 49 50
gobjectaliasdef.c: gobject.symbols
	perl makegobjectalias.pl -def < gobject.symbols > gobjectaliasdef.c

51 52
gobject.def: gobject.symbols
	echo EXPORTS > gobject.def
53 54 55
	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
56 57 58 59

gobject.res : gobject.rc
	rc -DBUILDNUMBER=0 -r -fo gobject.res gobject.rc

Hans Breuer's avatar
Hans Breuer committed
60 61 62 63 64 65 66 67 68 69
gmarshal.h : gmarshal.list glib-genmarshal.exe
	echo #ifndef __G_MARSHAL_H__ > xgen-gmh
	echo #define __G_MARSHAL_H__ >> xgen-gmh
	glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --header >> xgen-gmh
	echo #endif /* __G_MARSHAL_H__ */ >> xgen-gmh
	copy xgen-gmh gmarshal.h

gmarshal.c: gmarshal.list gmarshal.h glib-genmarshal.exe
	glib-genmarshal --nostdinc --prefix=g_cclosure_marshal gmarshal.list --body > gmarshal.c

70 71
libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(gobject_OBJECTS) gobject.def gobject.res
	$(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 75
gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(gobject_OBJECTS) 
	lib /out:$@ $(gobject_OBJECTS)
Tor Lillqvist's avatar
Tor Lillqvist committed
76

77
# link glib's static version to avoid installing 
78
glib-genmarshal.exe : glib-genmarshal.c gmarshal.strings
Hans Breuer's avatar
Hans Breuer committed
79
	$(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION glib-genmarshal.c \
80
	..\glib\glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib user32.lib advapi32.lib ole32.lib shell32.lib $(INTL_LIBS) $(LIBICONV_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) $(LIBICONV_LIBS)
85 86 87

gmarshal.strings : gmarshal.list
	perl marshal-genstrings.pl > gmarshal.strings
88 89 90

.c.exe :
	$(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