summaryrefslogtreecommitdiff
path: root/gobject/makefile.msc.in
blob: 3f5af9bff2e43db7091b19612d802abd742f20da (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
## Makefile for building the gobject dll with Microsoft C
## Use: nmake -f makefile.msc install

TOP = ..\..

!INCLUDE ..\build\win32\make.msc

################################################################

INCLUDES = -FImsvc_recommended_pragmas.h -I .. -I . -I ..\glib
DEFINES = -DHAVE_CONFIG_H -DGOBJECT_COMPILATION -DG_LOG_DOMAIN=\"GLib-GObject\" \
		-DG_ENABLE_DEBUG
#		-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS
#		-DG_DISABLE_CAST_CHECKS

all :				\
	glib-genmarshal.exe     \
	gmarshal.h              \
	gmarshal.c              \
	gmarshal.strings \
	gobject-query.exe \
	libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll	\
	gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib \
	testgobject.exe

gobject_OBJECTS =		\
	gboxed.obj		\
	gclosure.obj		\
	genums.obj		\
	gobject.obj		\
	gparam.obj		\
	gparamspecs.obj		\
	gsignal.obj		\
	gsourceclosure.obj	\
	gtype.obj		\
	gtypemodule.obj		\
	gtypeplugin.obj		\
	gvalue.obj		\
	gvaluearray.obj		\
	gvaluetypes.obj	\
	gvaluetransform.obj

gobject.def: gobject.symbols
	echo EXPORTS > 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
	rc -DBUILDNUMBER=0 -r -fo gobject.res gobject.rc

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

libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll : $(gobject_OBJECTS) gobject.def 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 || del $@

gobject-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib : $(gobject_OBJECTS) 
	lib /out:$@ $(gobject_OBJECTS)

# link glib's static version to avoid installing 
glib-genmarshal.exe : glib-genmarshal.c gmarshal.strings
	$(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION glib-genmarshal.c \
	..\glib\glib-@GLIB_MAJOR_VERSION@.@GLIB_MINOR_VERSION@s.lib user32.lib advapi32.lib ole32.lib shell32.lib $(INTL_LIBS) 

gobject-query.exe : gobject-query.c libgobject-2.0-@LT_CURRENT_MINUS_AGE@.dll
	$(CC) -Fe$@ $(CFLAGS) -UGOBJECT_COMPILATION gobject-query.c \
	..\glib\glib-2.0.lib gobject-2.0.lib user32.lib advapi32.lib $(INTL_LIBS)

gmarshal.strings : gmarshal.list
	perl marshal-genstrings.pl > gmarshal.strings

.c.exe :
	$(CC) $(CFLAGS) -c $<
	$(CC) $(CFLAGS) -Fe$@ $< gobject-2.0.lib ..\glib\glib-2.0.lib ..\gmodule\gmodule-2.0.lib $(LDFLAGS) user32.lib /subsystem:console