Commit 23b72e98 authored by Chun-wei Fan's avatar Chun-wei Fan

Build: Add NMake Makefiles

This adds NMake Makefiles that are consumed by Visual Studio 2013 or later
so that we can build gjs using Visual Studio with NMake.  Note that since
NMake can be clunky at some points, so we use some tricks to convert the
source listings into .obj listings that it expects, as well as to create a
file list for files that it needs to feed to the introspection scanner, as
well as batch rules (similar to the pattern rules) to compile the sources
that are spread out in different directories, and to reduce repetition as
much as possible.

Note that this is modularized, so there are items that are shared with
other projects like HarfBuzz, including:
parent a94c06c7
......@@ -150,15 +150,27 @@ install-exec-hook:
doc/ \
doc/ \
doc/ \
doc/ \
doc/ \
win32/config.h.win32 \
doc/ \
doc/ \
doc/ \
doc/ \
doc/ \
win32/build-rules-msvc.mak \
win32/config-msvc.mak \
win32/config.h.win32 \
win32/create-lists-msvc.mak \
win32/create-lists.bat \
win32/detectenv-msvc.mak \
win32/generate-msvc.mak \
win32/gjs-introspection-msvc.mak \
win32/info-msvc.mak \
win32/install.mak \
win32/introspection-msvc.mak \
win32/ \
win32/README.txt \
# Colin's handy Makefile bits for:
# NMake Makefile for building GJS on Windows
# The items below this line should not be changed, unless one is maintaining
# the NMake Makefiles. Customizations can be done in the following NMake Makefile
# portions (please see comments in the these files to see what can be customized):
# detectenv-msvc.mak
# config-msvc.mak
!include detectenv-msvc.mak
# Include the Makefile portions with the source listings
!include ..\
!include ..\
# Include the Makefile portion that enables features based on user input
!include config-msvc.mak
!if "$(VALID_CFGSET)" == "TRUE"
# We need Visual Studio 2013 or later
!if $(VSVER) < 12
!if "$(VALID_MSC)" == "TRUE"
# Include the Makefile portion to convert the source and header lists
# into the lists we need for compilation and introspection
!include create-lists-msvc.mak
all: $(GJS_LIBS) $(EXTRA_TARGETS) $(GJS_UTILS) all-build-info
tests: all
# Include the build rules for sources, DLLs and executables
!include build-rules-msvc.mak
# Include the rules for build directory creation and code generation
!include generate-msvc.mak
# Generate the introspection files
!if "$(INTROSPECTION)" == "1"
# Include the rules for building the introspection files
!include introspection-msvc.mak
!include gjs-introspection-msvc.mak
!include install.mak
!else # "$(VALID_MSC)" == "TRUE"
@echo You need Visual Studio 2013 or later.
!endif # "$(VALID_MSC)" == "TRUE"
!else # "$(VALID_CFGSET)" == "TRUE"
all: help
@echo You need to specify a valid configuration, via
@echo CFG=release or CFG=debug
!endif # "$(VALID_CFGSET)" == "TRUE"
!include info-msvc.mak
Instructions for building GJS on Visual Studio
Building the GJS on Windows is now supported using Visual Studio
versions 2013 or later in both 32-bit and 64-bit (x64) flavors,
via NMake Makefiles. Due to C++-11 usage, Visual Studio 2012 or
earlier is not supported.
You will need the following items to build GJS using Visual Studio:
-SpiderMonkey 31 (mozjs-31)
-GObject-Introspection (G-I) 1.41.4 or later
-GLib 2.50.x or later, (which includes GIO, GObject, and the associated tools)
-Cairo including Cairo-GObject support, unless NO_CAIRO=1 is specified.
-GTK+-3.20.x or later, unless NO_GTK=1 is specified.
-and anything that the above items depends on.
Note that SpiderMonkey must be built with Visual Studio, and the rest
should preferably be built with Visual Studio as well. The Visual Studio
version used should preferably be the one that is used here to build GJS.
The following are instructions for performing such a build, as there is a
number of build configurations supported for the build. Note that the default
build (where no options (see below) are specified, the GJS library is built with
Cairo and GTK+ support. A 'clean' target is provided-it is recommended that
one cleans the build and redo the build if any configuration option changed. An
'install' target is also provided to copy the built items in their appropriate
locations under $(PREFIX), which is described below.
Invoke the build by issuing the command:
nmake /f CFG=[release|debug] [PREFIX=...] <option1=1 option2=1 ...>
CFG: Required. Choose from a release or debug build. Note that
all builds generate a .pdb file for each .dll and .exe built--this refers
to the C/C++ runtime that the build uses.
PREFIX: Optional. Base directory of where the third-party headers, libraries
and needed tools can be found, i.e. headers in $(PREFIX)\include,
libraries in $(PREFIX)\lib and tools in $(PREFIX)\bin. If not
specified, $(PREFIX) is set as $(srcroot)\..\vs$(X)\$(platform), where
$(platform) is win32 for 32-bit builds or x64 for 64-bit builds, and
$(X) is the short version of the Visual Studio used, as follows:
2013: 12
2015: 14
Explanation of options, set by <option>=1:
NO_CAIRO: Disables Cairo support in the GJS DLL.
NO_GTK: Disables GTK+ support in the GJS DLL
INTROSPECTION: Enable build of introspection files, for making
bindings for other programming languages available, such as
Python. This requires the GObject-Introspection
libraries and tools, along with the Python interpreter that was
used during the build of GObject-Introspection. This will
require the introspection files for GTK+, unless NO_GTK=1 is
specified, where the introspection files for GIO will be
PYTHON: Full path to the Python interpreter to be used, if it is not in %PATH%.
LIBTOOL_DLL_NAME: Enable libtool-style DLL names. Note this does not make this
GJS build usable by other compilers, due to C++ usage.
# NMake Makefile portion for compilation rules
# Items in here should not need to be edited unless
# one is maintaining the NMake build files. The format
# of NMake Makefiles here are different from the GNU
# Makefiles. Please see the comments about these formats.
# Inference rules for compiling the .obj files.
# Used for libs and programs with more than a single source file.
# Format is as follows
# (all dirs must have a trailing '\'):
# {$(srcdir)}.$(srcext){$(destdir)}.obj::
# $(CC)|$(CXX) $(cflags) /Fo$(destdir) /c @<<
# $<
# <<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\module-console\ /c @<<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\module-system\ /c @<<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\module-cairo\ /c @<<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\libgjs\ /c @<<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\libgjs\ /c @<<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\libgjs\ /c @<<
$(CC) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\libgjs\ /c @<<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\libgjs\ /c @<<
$(CXX) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\libgjs\ /c @<<
$(CC) $(CFLAGS) $(LIBGJS_CFLAGS) /Fo$(CFG)\$(PLAT)\libgjs\ /c @<<
$(CXX) $(CFLAGS) $(GJS_CFLAGS) /Fo$(CFG)\$(PLAT)\gjs-console\ /c @<<
# Rules for building .lib files
$(CFG)\$(PLAT)\gjs.lib: $(LIBGJS_DLL_FILENAME).dll
# Rules for linking DLLs
# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
# link /DLL [$(linker_flags)] [$(dependent_libs)] [/def:$(def_file_if_used)] [/implib:$(lib_name_if_needed)] -out:$@ @<<
# $(dependent_objects)
# <<
# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
$(CFG)\$(PLAT)\module-resources \
$(CFG)\$(PLAT)\libgjs \
$(module_resources_generated_srcs) \
$(LIBGJS_DEP_LIBS) /implib:$(CFG)\$(PLAT)\gjs.lib \
-out:$@ @<<
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
$(CFG)\$(PLAT)\module-console.lib: ..\config.h $(CFG)\$(PLAT)\module-console $(module_console_OBJS)
lib $(ARFLAGS) -out:$@ @<<
$(CFG)\$(PLAT)\module-system.lib: ..\config.h $(CFG)\$(PLAT)\module-system $(module_system_OBJS)
lib $(ARFLAGS) -out:$@ @<<
$(CFG)\$(PLAT)\module-cairo.lib: ..\config.h $(CFG)\$(PLAT)\module-cairo $(module_cairo_OBJS)
lib $(ARFLAGS) -out:$@ @<<
# Rules for linking Executables
# Format is as follows (the mt command is needed for MSVC 2005/2008 builds):
# $(dll_name_with_path): $(dependent_libs_files_objects_and_items)
# link [$(linker_flags)] [$(dependent_libs)] -out:$@ @<<
# $(dependent_objects)
# <<
# @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
$(CFG)\$(PLAT)\gjs-console.exe: $(CFG)\$(PLAT)\gjs.lib $(CFG)\$(PLAT)\gjs-console $(gjs_OBJS)
link $(LDFLAGS) $(CFG)\$(PLAT)\gjs.lib $(GJS_BASE_LIBS) -out:$@ $(gjs_OBJS)
@-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
@-if exist $(CFG)\$(PLAT)\GjsPrivate-1.0.typelib del /f /q $(CFG)\$(PLAT)\GjsPrivate-1.0.typelib
@-if exist $(CFG)\$(PLAT)\GjsPrivate-1.0.gir del /f /q $(CFG)\$(PLAT)\GjsPrivate-1.0.gir
@-if exist $(CFG)\$(PLAT)\gjs_private_list del /f /q $(CFG)\$(PLAT)\gjs_private_list
@-del /f /q $(CFG)\$(PLAT)\*.pdb
@-if exist $(CFG)\$(PLAT)\gjs-console.exe.manifest del /f /q $(CFG)\$(PLAT)\gjs-console.exe.manifest
@-if exist $(CFG)\$(PLAT)\gjs-console.exe del /f /q $(CFG)\$(PLAT)\gjs-console.exe
@-del /f /q $(CFG)\$(PLAT)\*.dll.manifest
@-del /f /q $(CFG)\$(PLAT)\*.dll
@-del /f /q $(CFG)\$(PLAT)\*.ilk
@-del /f /q $(CFG)\$(PLAT)\*.exp
@-del /f /q $(CFG)\$(PLAT)\*.lib
@-if exist $(CFG)\$(PLAT)\module-cairo.lib del /f /q $(CFG)\$(PLAT)\module-cairo\*.obj
@-del /f /q $(CFG)\$(PLAT)\module-system\*.obj
@-del /f /q $(CFG)\$(PLAT)\module-console\*.obj
@-del /f /q $(CFG)\$(PLAT)\libgjs\*.obj
@-del /f /q $(CFG)\$(PLAT)\gjs-console\*.obj
@-del /f /q $(module_resources_generated_srcs)
@-del vc$(VSVER)0.pdb
@-del ..\config.h
# NMake Makefile portion for enabling features for Windows builds
# Spidermonkey release series (17, 24, 31, 38, 45 etc.)
# Please see,
# comments 26, 27 and 28
!if "$(MOZJS_VERSION)" == "31"
# These are the base minimum libraries required for building gjs.
/I$(PREFIX)\include\gobject-introspection-1.0\girepository \
/I$(PREFIX)\include\glib-2.0 \
/I$(PREFIX)\lib\glib-2.0\include \
/I$(PREFIX)\include\mozjs-$(MOZJS_VERSION) \
GJS_BASE_LIBS = gio-2.0.lib gobject-2.0.lib glib-2.0.lib
girepository-1.0.lib \
libffi.lib \
intl.lib \
# For Cairo support
CAIRO_LIBS = cairo-gobject.lib cairo.lib
# For GTK+ support
/I$(PREFIX)\include\gtk-3.0 \
/I$(PREFIX)\include\gdk-pixbuf-2.0 \
/I$(PREFIX)\include\pango-1.0 \
GTK_LIBS = gtk-3.0.lib gdk-3.0.lib
# Please do not change anything beneath this line unless maintaining the NMake Makefiles
# Bare minimum features and sources built into GJS on Windows
# We build the resource module sources directly into the gjs DLL, not as a separate .lib,
# so that we don't have to worry about the Visual Studio linker dropping items during
# optimization
$(CFG)\$(PLAT)\module-console.lib \
/I.. \
/FImsvc_recommended_pragmas.h \
/FIjs\RequiredDefines.h \
/Dssize_t=gssize \
/DG_LOG_DOMAIN=\"Gjs\" \
/wd4530 \
/wd4099 \
/wd4251 \
LIBGJS_PRIVATE_SOURCES = $(gjs_private_srcs)
LIBGJS_HEADERS = $(gjs_public_headers:/=\)
# We build libgjs and gjs-console at least
GJS_LIBS = $(CFG)\$(PLAT)\gjs.lib
GJS_UTILS = $(CFG)\$(PLAT)\gjs-console.exe
# Enable Cairo
!if "$(NO_CAIRO)" != "1"
INTROSPECTION_INCLUDE_PACKAGES = --include=Gio-2.0 --include=GObject-2.0
# Enable GTK+
!if "$(NO_GTK)" != "1"
# Use libtool-style DLL names, if desired
!if "$(LIBTOOL_DLL_NAME)" == "1"
# Enable Introspection
!if "$(INTROSPECTION)" == "1"
EXTRA_TARGETS = $(CFG)\$(PLAT)\GjsPrivate-1.0.gir $(CFG)\$(PLAT)\GjsPrivate-1.0.typelib
# Put together the CFLAGS
/DWIN32 \
# Convert the source listing to object (.obj) listing in
# another NMake Makefile module, include it, and clean it up.
# This is a "fact-of-life" regarding NMake Makefiles...
# This file does not need to be changed unless one is maintaining the NMake Makefiles
# For those wanting to add things here:
# To add a list, do the following:
# # $(description_of_list)
# if [call create-lists.bat header $(makefile_snippet_file) $(variable_name)]
# endif
# if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]
# endif
# if [call create-lists.bat footer $(makefile_snippet_file)]
# endif
# ... (repeat the if [call ...] lines in the above order if needed)
# !include $(makefile_snippet_file)
# (add the following after checking the entries in $(makefile_snippet_file) is correct)
# (the batch script appends to $(makefile_snippet_file), you will need to clear the file unless the following line is added)
#!if [del /f /q $(makefile_snippet_file)]
# In order to obtain the .obj filename that is needed for NMake Makefiles to build DLLs/static LIBs or EXEs, do the following
# instead when doing 'if [call create-lists.bat file $(makefile_snippet_file) $(file_name)]'
# (repeat if there are multiple $(srcext)'s in $(source_list), ignore any headers):
# !if [for %c in ($(source_list)) do @if "%~xc" == ".$(srcext)" @call create-lists.bat file $(makefile_snippet_file) $(intdir)\%~nc.obj]
# $(intdir)\%~nc.obj needs to correspond to the rules added in build-rules-msvc.mak
# %~xc gives the file extension of a given file, %c in this case, so if %c is, %~xc means .cc
# %~nc gives the file name of a given file without extension, %c in this case, so if %c is, %~nc means a
# For libgjs
!if [call create-lists.bat header gjs_objs.mak libgjs_dll_OBJS]
!if [for %c in ($(LIBGJS_SOURCES)) do @if "%~xc" == ".cpp" @call create-lists.bat file gjs_objs.mak ^$(CFG)\^$(PLAT)\libgjs\%~nc.obj]
!if [for %c in ($(LIBGJS_SOURCES)) do @if "%~xc" == ".c" @call create-lists.bat file gjs_objs.mak ^$(CFG)\^$(PLAT)\libgjs\%~nc.obj]
!if [for %c in ($(module_resource_srcs)) do @if "%~xc" == ".c" @call create-lists.bat file gjs_objs.mak ^$(CFG)\^$(PLAT)\libgjs\%~nc.obj]
!if [call create-lists.bat footer gjs_objs.mak]
!if [call create-lists.bat header gjs_objs.mak gjs_OBJS]
!if [for %c in ($(gjs_console_srcs)) do @if "%~xc" == ".cpp" @call create-lists.bat file gjs_objs.mak ^$(CFG)\^$(PLAT)\gjs-console\%~nc.obj]
!if [call create-lists.bat footer gjs_objs.mak]
!include gjs_objs.mak
!if [del /f /q gjs_objs.mak]
# For module-resources
!if [call create-lists.bat header gjs_modules_objs.mak module_resources_generated_srcs]
!if [for %c in ($(module_resource_srcs)) do @call create-lists.bat file gjs_modules_objs.mak ^$(CFG)\^$(PLAT)\module-resources\%c]
!if [call create-lists.bat footer gjs_modules_objs.mak]
!if [call create-lists.bat header gjs_modules_objs.mak module_system_OBJS]
!if [for %c in ($(module_system_srcs)) do @if "%~xc" == ".cpp" @call create-lists.bat file gjs_modules_objs.mak ^$(CFG)\^$(PLAT)\module-system\%~nc.obj]
!if [call create-lists.bat footer gjs_modules_objs.mak]
!if [call create-lists.bat header gjs_modules_objs.mak module_console_OBJS]
!if [for %c in ($(module_console_srcs)) do @if "%~xc" == ".cpp" @call create-lists.bat file gjs_modules_objs.mak ^$(CFG)\^$(PLAT)\module-console\%~nc.obj]
!if [call create-lists.bat footer gjs_modules_objs.mak]
!if [call create-lists.bat header gjs_modules_objs.mak module_cairo_OBJS]
!if [for %c in ($(module_cairo_srcs)) do @if "%~xc" == ".cpp" @call create-lists.bat file gjs_modules_objs.mak ^$(CFG)\^$(PLAT)\module-cairo\%~nc.obj]
!if [call create-lists.bat footer gjs_modules_objs.mak]
!include gjs_modules_objs.mak
!if [del /f /q gjs_modules_objs.mak]
@echo off
rem Simple .bat script for creating the NMake Makefile snippets.
if not "%1" == "header" if not "%1" == "file" if not "%1" == "footer" goto :error_cmd
if "%2" == "" goto error_no_destfile
if "%1" == "header" goto :header
if "%1" == "file" goto :addfile
if "%1" == "footer" goto :footer
if "%3" == "" goto error_var
echo %3 = \>>%2
goto done
if "%3" == "" goto error_file
echo. %3 \>>%2
goto done
echo. $(NULL)>>%2
goto done
echo Specified command '%1' was invalid. Valid commands are: header file footer.
goto done
echo Destination NMake snippet file must be specified
goto done
echo A name must be specified for using '%1'.
goto done
echo A file must be specified for using '%1'.
goto done
\ No newline at end of file
# Change this (or specify PREFIX= when invoking this NMake Makefile) if
# necessary, so that the libs and headers of the dependent third-party
# libraries can be located. For instance, if building from GLib's
# included Visual Studio projects, this should be able to locate the GLib
# build out-of-the-box if they were not moved. GLib's headers will be
# found in $(GLIB_PREFIX)\include\glib-2.0 and
# $(GLIB_PREFIX)\lib\glib-2.0\include and its import library will be found
# in $(GLIB_PREFIX)\lib.
!if "$(PREFIX)" == ""
PREFIX = ..\..\vs$(VSVER)\$(PLAT)
# Location of the PERL interpreter, for running glib-mkenums. glib-mkenums
# needs to be found in $(PREFIX)\bin. Using either a 32-bit or x64 PERL
# interpreter are supported for either a 32-bit or x64 build.
!if "$(PERL)" == ""
PERL = perl
# Location of the Python interpreter, for building introspection. The complete set
# of Python Modules for introspection (the giscanner Python scripts and the _giscanner.pyd
# compiled module) needs to be found in $(PREFIX)\lib\gobject-introspection\giscanner, and
# the g-ir-scanner Python script and g-ir-compiler utility program needs to be found
# in $(PREFIX)\bin, together with any DLLs they will depend on, if those DLLs are not already
# in your PATH.
# Note that the Python interpreter and the introspection modules and utility progam must
# correspond to the build type (i.e. 32-bit Release for 32-bit Release builds, and so on).
# For introspection, currently only Python 2.7.x is supported. This may change when Python 3.x
# support is added upstream in gobject-introspection--when this happens, the _giscanner.pyd must
# be the one that is built against the release series of Python that is used here.
!if "$(PYTHON)" == ""
PYTHON = python
# Location of the pkg-config utility program, for building introspection. It needs to be able
# to find the pkg-config (.pc) files so that the correct libraries and headers for the needed libraries
# can be located, using PKG_CONFIG_PATH. Using either a 32-bit or x64 pkg-config are supported for
# either a 32-bit or x64 build.
!if "$(PKG_CONFIG)" == ""
PKG_CONFIG = pkg-config
# The items below this line should not be changed, unless one is maintaining
# the NMake Makefiles. The exception is for the CFLAGS_ADD line(s) where one
# could use his/her desired compiler optimization flags, if he/she knows what is
# being done.
# Check to see we are configured to build with MSVC (MSDEVDIR, MSVCDIR or
# VCINSTALLDIR) or with the MS Platform SDK (MSSDK or WindowsSDKDir)
!if !defined(VCINSTALLDIR) && !defined(WINDOWSSDKDIR)
MSG = ^
This Makefile is only for Visual Studio 2008 and later.^
You need to ensure that the Visual Studio Environment is properly set up^
before running this Makefile.
!error $(MSG)
!if ![echo VCVERSION=_MSC_VER > vercl.x] \
&& ![echo $(_HASH)if defined(_M_IX86) >> vercl.x] \
&& ![echo PLAT=Win32 >> vercl.x] \
&& ![echo $(_HASH)elif defined(_M_AMD64) >> vercl.x] \
&& ![echo PLAT=x64 >> vercl.x] \
&& ![echo $(_HASH)endif >> vercl.x] \
&& ![cl -nologo -TC -P vercl.x $(ERRNUL)]
!include vercl.i
!if ![echo VCVER= ^\>] \
&& ![set /a $(VCVERSION) / 100 - 6 >>]
!if ![del $(ERRNUL) /q/f vercl.x vercl.i]
!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
!elseif $(VCVERSION) > 1599 && $(VCVERSION) < 1700
VSVER = 10
!elseif $(VCVERSION) > 1699 && $(VCVERSION) < 1800
VSVER = 11
!elseif $(VCVERSION) > 1799 && $(VCVERSION) < 1900
VSVER = 12
!elseif $(VCVERSION) > 1899 && $(VCVERSION) < 2000
VSVER = 14
!if "$(VSVER)" == "0"
MSG = ^
This NMake Makefile set supports Visual Studio^
9 (2008) through 14 (2015). Your Visual Studio^
version is not supported.
!error $(MSG)
!if "$(CFG)" == "release" || "$(CFG)" == "Release" || "$(CFG)" == "debug" || "$(CFG)" == "Debug"
# One may change these items, but be sure to test
# the resulting binaries
!if "$(CFG)" == "release" || "$(CFG)" == "Release"
!if "$(VSVER)" != "9"
!if "$(PLAT)" == "x64"
LDFLAGS_ARCH = /machine:x64
LDFLAGS_ARCH = /machine:x86
!if "$(VALID_CFGSET)" == "TRUE"
!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
# NMake Makefile portion for code generation and
# intermediate build directory creation
# Items in here should not need to be edited unless
# one is maintaining the NMake build files.
# Copy the pre-defined config.h.win32
..\config.h: config.h.win32
@-copy $(@B).h.win32 $@
# Create the build directories
$(CFG)\$(PLAT)\module-console \
$(CFG)\$(PLAT)\module-system \
$(CFG)\$(PLAT)\module-resources \
$(CFG)\$(PLAT)\module-cairo \
$(CFG)\$(PLAT)\libgjs \
@-mkdir $@
# Generate the GResource sources
$(CFG)\$(PLAT)\module-resources\modules-resources.h \
$(CFG)\$(PLAT)\module-resources\modules-resources.c: ..\modules\modules.gresource.xml
$(PREFIX)\bin\glib-compile-resources.exe --target=$@ \
--sourcedir=.. --generate --c-name modules_resources \
# Create the file list for introspection (to avoid the dreaded command-line-too-long problem on Windows)
@for %f in ($(LIBGJS_PRIVATE_SOURCES)) do @echo ../%f >> $@
$(CFG)\$(PLAT)\GjsPrivate-1.0.gir: $(CFG)\$(PLAT)\gjs.lib $(CFG)\$(PLAT)\gjs_private_list
@set LIB=.\$(CFG)\$(PLAT);$(PREFIX)\lib;$(LIB)
@set PATH=.\$(CFG)\$(PLAT);$(PREFIX)\bin;$(PATH)
@-echo Generating $@...
--verbose -no-libtool \
--identifier-prefix=Gjs \
--symbol-prefix=gjs_ \
--warn-all \
--namespace=GjsPrivate \
--nsversion=1.0 \
--library=gjs \
--library-path=$(CFG)\$(PLAT) \
--add-include-path=$(G_IR_INCLUDEDIR) \