gtk2/win32/gtk-introspection-msvc.mak
Chun-wei Fan c3b9f56121 win32/gtk-introspection-msvc.mak: Prepare for ARM64 builds
Currently, introspection is not well-supported for ARM64 Windows builds as:

* There is no official Python release for ARM64 Windows, but it is currently
  possible to build it with sufficient support for G-I, however...

* The tooling in Python still needs to be updated to enable ARM64 Windows
  builds for use with g-ir-scanner and friends, and...

* Introspection builds must be done on an ARM64 system, since we are running a
  dumper binary to generate the .gir files

This will attempt to prepare things for building GTK's introspection files on
Windows ARM64, but will require a custom installation of Python as noted above,
for the time being
2021-02-23 17:48:53 +08:00

53 lines
1.3 KiB
Makefile

# NMake Makefile to build Introspection Files for GTK+
!include detectenv-msvc.mak
APIVERSION = 3.0
CHECK_PACKAGE = gdk-pixbuf-2.0 atk pangocairo gio-2.0
built_install_girs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).gir \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).gir
built_install_typelibs = \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gdk-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\GdkWin32-$(APIVERSION).typelib \
vs$(VSVER)\$(CFG)\$(PLAT)\bin\Gtk-$(APIVERSION).typelib
!include introspection-msvc.mak
!if "$(BUILD_INTROSPECTION)" == "TRUE"
!if "$(PLAT)" == "x64"
AT_PLAT=x86_64
!elseif "$(PLAT)" == "arm64"
AT_PLAT=aarch64
!else
AT_PLAT=i686
!endif
all: setgirbuildenv $(built_install_girs) $(built_install_typelibs)
setgirbuildenv:
@set PYTHONPATH=$(PREFIX)\lib\gobject-introspection
@set PATH=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(PREFIX)\bin;$(PATH)
@set PKG_CONFIG_PATH=$(PKG_CONFIG_PATH)
@set LIB=vs$(VSVER)\$(CFG)\$(PLAT)\bin;$(LIB)
!include introspection.body.mak
install-introspection: all
@-copy vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir "$(G_IR_INCLUDEDIR)"
@-copy /b vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib "$(G_IR_TYPELIBDIR)"
!else
all:
@-echo $(ERROR_MSG)
!endif
clean:
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.typelib
@-del /f/q vs$(VSVER)\$(CFG)\$(PLAT)\bin\*.gir