blob: 9dbbd881b2e37bb7c8dfeed62ce880415436ea94 (
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
# NMake Makefile to build Introspection Files for G-I
# Change or pass in as a variable/env var if needed
# The main DLLs that are used to build introspection files that are "installed"
CAIROGOBJECT_DLLNAME= cairo-gobject-vs$(VSVER)
# Please do not change anything after this line
!include gi-build-common-msvc.mak
# The .gir's that are in $(srcroot)/gir, applicable to Windows
# cairo-1.0.gir is not listed as it needs to be processed first
bundled_girs = \
win32-1.0.gir \
fontconfig-2.0.gir \
freetype2-2.0.gir \
GL-1.0.gir \
libxml2-2.0.gir
# The .typelib's that are build from the .gir's bundled with the
# G-I package, applicable to Windows
bundled_typelibs = \
cairo-1.0.typelib \
fontconfig-2.0.typelib \
freetype2-2.0.typelib \
GL-1.0.typelib \
libxml2-2.0.typelib \
win32-1.0.typelib
# The .gir's for GLib/G-I that are built and "installed"
built_install_girs = \
GLib-$(GLIB_APIVERSION).gir \
GModule-$(GLIB_APIVERSION).gir \
GObject-$(GLIB_APIVERSION).gir \
Gio-$(GLIB_APIVERSION).gir \
GIRepository-$(GLIB_APIVERSION).gir
# The .typelib's for GLib/G-I that are built and "installed"
built_install_typelibs = \
GLib-$(GLIB_APIVERSION).typelib \
GModule-$(GLIB_APIVERSION).typelib \
GObject-$(GLIB_APIVERSION).typelib \
Gio-$(GLIB_APIVERSION).typelib \
GIRepository-$(GLIB_APIVERSION).typelib
!if "$(BUILD_INTROSPECTION)" == "TRUE"
all: setgirbuildnev $(built_install_girs) $(built_install_typelibs) $(bundled_girs) $(bundled_typelibs)
!include gi-setenv-msvc.mak
glib_list:
@-echo Generating file list for GLib...
@-echo $(BASEDIR)\lib\glib-2.0\include\glibconfig.h> $@
@-for /f %%a in ('dir /b $(BASEDIR)\include\glib-2.0\glib\*.h') do @echo $(BASEDIR)\include\glib-2.0\glib\%%a>> $@
@-echo $(BASEDIR)\include\glib-2.0\gobject\glib-types.h>> $@
@-echo ..\gir\glib-2.0.c>> $@
gobject_list:
@-echo Generating file list for GObject...
@-type NUL > $@
@-for /f %%a in ('dir /b $(BASEDIR)\include\glib-2.0\gobject\*.h') do @if not %%a == glib-types.h @echo $(BASEDIR)\include\glib-2.0\gobject\%%a>> $@
@-echo ..\gir\gobject-2.0.c>> $@
gio_list:
@-echo Generating file list for GIO...
@-type NUL > $@
@-for /f %%a in ('dir /b $(BASEDIR)\include\gio-win32-2.0\gio\*.h') do @echo $(BASEDIR)\include\gio-win32-2.0\gio\%%a>> $@
@-for /f %%a in ('dir /b $(BASEDIR)\include\glib-2.0\gio\*.h') do @if not %%a == gsettingsbackend.h @echo $(BASEDIR)\include\glib-2.0\gio\%%a>> $@
@-echo ..\gir\gio-2.0.c>> $@
gi_list:
@-echo Generating file list for girepository...
@-echo ..\girepository\girepository.h > $@
@-echo ..\girepository\girepository.c >> $@
@-for /f %%a in ('dir /b ..\girepository\gi*info.c') do @echo ..\girepository\%%a >> $@
@-for /f %%a in ('dir /b ..\girepository\gi*info.h') do @echo ..\girepository\%%a >> $@
@-echo ..\girepository\gitypelib.h >> $@
@-echo ..\girepository\gitypes.h >> $@
# Generated .gir files for GLib/GModule/GObject/Gio/GIRepository
GLib-$(GLIB_APIVERSION).gir: glib_list
@-echo Generating $@...
$(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \
--add-include-path=..\gir --add-include-path=. --namespace=GLib --nsversion=$(GLIB_APIVERSION) \
--no-libtool --pkg=glib-$(GLIB_APIVERSION) --include=win32-$(GI_APIVERSION) --library=glib-2.0 --library=gobject-2.0 \
--external-library --reparse-validate --identifier-prefix=G --symbol-prefix=g \
--symbol-prefix=glib --c-include="glib.h" -I$(BASEDIR)\include\glib-$(GLIB_APIVERSION) \
-I$(BASEDIR)\lib\glib-2.0\include -I$(BASEDIR)\include -DGETTEXT_PACKAGE=Dummy \
-DGLIB_COMPILATION -D__G_I18N_LIB_H__ --filelist=glib_list -o $@
GModule-$(GLIB_APIVERSION).gir: GLib-$(GLIB_APIVERSION).gir
@-echo Generating $@...
$(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \
--add-include-path=..\gir --add-include-path=. --namespace=GModule --nsversion=2.0 \
--no-libtool --include=GLib-$(GLIB_APIVERSION) --pkg=gmodule-$(GLIB_APIVERSION) --library=gmodule-2.0 \
--external-library --reparse-validate --identifier-prefix=G --c-include="gmodule.h" \
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include -I$(BASEDIR)\include \
$(BASEDIR)\include\glib-2.0\gmodule.h ..\gir\gmodule-2.0.c -o $@
GObject-$(GLIB_APIVERSION).gir: gobject_list GModule-$(GLIB_APIVERSION).gir
@-echo Generating $@...
$(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \
--add-include-path=..\gir --add-include-path=. --namespace=GObject --nsversion=$(GLIB_APIVERSION) \
--no-libtool --include=GLib-$(GLIB_APIVERSION) --pkg=gobject-$(GLIB_APIVERSION) --library=gobject-2.0 \
--external-library --reparse-validate --identifier-prefix=G --c-include="glib-gobject.h" \
-I$(BASEDIR)/include/glib-2.0 -I$(BASEDIR)/lib/glib-2.0/include -I$(BASEDIR)/include \
-DGOBJECT_COMPILATION --filelist=gobject_list -o $@
Gio-$(GLIB_APIVERSION).gir: gio_list GObject-$(GLIB_APIVERSION).gir
@-echo Generating $@...
$(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose -I.. --add-include-path=.. \
--add-include-path=..\gir --add-include-path=. --namespace=Gio --nsversion=$(GLIB_APIVERSION) \
--no-libtool --pkg=gio-$(GLIB_APIVERSION) --pkg=gio-windows-$(GLIB_APIVERSION) --include=GObject-$(GLIB_APIVERSION) \
--library=gio-2.0 --external-library --reparse-validate --warn-all \
--identifier-prefix=G --include=GLib-$(GLIB_APIVERSION) --c-include="gio/gio.h" -DGIO_COMPILATION \
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include \
-I$(BASEDIR)\include --filelist=gio_list -o $@
GIRepository-$(GLIB_APIVERSION).gir: gi_list GObject-$(GLIB_APIVERSION).gir
@-echo Generating $@...
$(PYTHON2) $(G_IR_SCANNER_CURRENT) --verbose --warn-all \
--add-include-path=..\gir --add-include-path=. --namespace=GIRepository --nsversion=$(GLIB_APIVERSION) \
--identifier-prefix=GI --symbol-prefix=g --c-include="girepository.h" --add-include-path=. \
--no-libtool --pkg=gobject-$(GLIB_APIVERSION) --include=GObject-$(GLIB_APIVERSION) \
--library=girepository-1.0 -I..\girepository -I.. -I$(BASEDIR)\include \
-I$(BASEDIR)\include\glib-2.0 -I$(BASEDIR)\lib\glib-2.0\include --filelist=gi_list \
-DGI_COMPILATION -o $@
# Bundled cairo-1.0.gir.in processing
cairo-1.0.gir: ..\gir\cairo-1.0.gir.in
@-echo Generating and copying $@ from $*.gir.in...
@-if not exist ..\gir\$*.gir $(PYTHON2) gen-cairo-gir.py --dllname=$(CAIROGOBJECT_DLLNAME).dll
@-copy ..\gir\$*.gir $@
# Copy the .gir's bundled with G-I to this folder
$(bundled_girs): ..\gir\win32-1.0.gir ..\gir\fontconfig-2.0.gir ..\gir\freetype2-2.0.gir ..\gir\GL-1.0.gir ..\gir\libxml2-2.0.gir
@-echo Copying the bundled $*.gir that came with the GobjectIntrospection package...
@-copy ..\gir\$*.gir $@
# Generate .typelib's from generated .gir's
$(built_install_typelibs): $(bundled_girs) $(built_install_girs)
@-echo Compiling $*.typelib...
@-$(G_IR_COMPILER_CURRENT) --includedir=. --debug --verbose $*.gir -o $@
# Generate .typelib's from bundled .gir's
$(bundled_typelibs): cairo-1.0.gir $(bundled_girs)
@-echo Compiling the bundled $*.gir that came with the GobjectIntrospection package...
@-$(G_IR_COMPILER_CURRENT) --includedir=. --debug --verbose $*.gir -o $@
install-introspection: setgirbuildnev $(built_install_girs) $(built_install_typelibs) $(bundled_girs) cairo-1.0.gir $(bundled_typelibs)
@-mkdir $(G_IR_INCLUDEDIR)
@-mkdir $(G_IR_TYPELIBDIR)
@-copy cairo-1.0.gir $(G_IR_INCLUDEDIR)
@-for %a in ($(built_install_girs)) do @copy %a $(G_IR_INCLUDEDIR)
@-for %b in ($(built_install_typelibs)) do @copy %b $(G_IR_TYPELIBDIR)
@-for %c in ($(bundled_girs)) do @copy %c $(G_IR_INCLUDEDIR)
@-for %d in ($(bundled_typelibs)) do @copy %d $(G_IR_TYPELIBDIR)
!else
all: install-introspection
install-introspection:
@-echo $(ERROR_MSG)
!endif
clean:
@-del /f/q ..\gir\cairo-$(GI_APIVERSION).gir
@-del /f/q *.typelib
@-del /f/q *.gir
@-del /f/q gi_list
@-del /f/q gio_list
@-del /f/q gobject_list
@-del /f/q glib_list
@-del /f/q *.pyc
|