[cogl/cogl-latest-win: 20/21] build: Add a set of NMake Makefiles
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cogl/cogl-latest-win: 20/21] build: Add a set of NMake Makefiles
- Date: Tue, 19 Oct 2021 07:35:05 +0000 (UTC)
commit c2522e88f181dacc4c7e746214aa10b8fcb0da86
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Mon Oct 18 17:50:28 2021 +0800
build: Add a set of NMake Makefiles
This adds a set of NMake Makefiles that can be used to build Cogl on
Visual Studio 2008 or later, which will replace the former Visual Studio
2008/2010 project files. Improvements over the Visual Studio projects:
* Configurable by the flags that are passed into the NMake command
line, meaning that SDL/SDL2, Pango, Gst are enabled only if sepcified
on the NMake command line. Introspection is now also optionally
enabled for the libraries that are built. This will give us a more
flexible builds. Unit and conformance tests are also built
selectively as a result.
* Easier configuration for later Visual Studio versions.
* Will share the source listings that were split out from the autotools
build files, for easier maintenance--we will also be able to remove
the bits in the autotools build files that were used to generate the
Visual Studio project files. which will be in the next commit.
build/Makefile.am | 2 +-
build/nmake/Makefile.am | 10 +
build/nmake/Makefile.vc | 42 ++++
build/nmake/build-rules-msvc.mak | 411 +++++++++++++++++++++++++++++++++++
build/nmake/config-msvc.mak | 439 ++++++++++++++++++++++++++++++++++++++
build/nmake/create-lists-msvc.mak | 282 ++++++++++++++++++++++++
build/nmake/create-lists.bat | 42 ++++
build/nmake/detectenv-msvc.mak | 162 ++++++++++++++
build/nmake/generate-msvc.mak | 72 +++++++
build/nmake/info-msvc.mak | 92 ++++++++
build/nmake/install.mak | 41 ++++
configure.ac | 1 +
12 files changed, 1595 insertions(+), 1 deletion(-)
---
diff --git a/build/Makefile.am b/build/Makefile.am
index 0f81afe3..35909bb3 100644
--- a/build/Makefile.am
+++ b/build/Makefile.am
@@ -1 +1 @@
-SUBDIRS = win32
+SUBDIRS = win32 nmake
diff --git a/build/nmake/Makefile.am b/build/nmake/Makefile.am
new file mode 100644
index 00000000..628de83a
--- /dev/null
+++ b/build/nmake/Makefile.am
@@ -0,0 +1,10 @@
+EXTRA_DIST = \
+ build-rules-msvc.mak \
+ config-msvc.mak \
+ create-lists-msvc.mak \
+ create-lists.bat \
+ detectenv-msvc.mak \
+ generate-msvc.mak \
+ info-msvc.mak \
+ install.mak \
+ Makefile.vc
diff --git a/build/nmake/Makefile.vc b/build/nmake/Makefile.vc
new file mode 100644
index 00000000..ea42a017
--- /dev/null
+++ b/build/nmake/Makefile.vc
@@ -0,0 +1,42 @@
+# NMake Makefile for building libsigc++ on Windows using Visual Studio
+
+# 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 ..\..\cogl\cogl-srcs.mak
+!include ..\..\cogl-path\cogl-path-srcs.mak
+!include ..\..\cogl-pango\cogl-pango-srcs.mak
+!include ..\..\cogl-gst\cogl-gst-srcs.mak
+!include ..\..\tests\conform\conform-test-srcs.mak
+
+# Include the Makefile portion that enables features based on user input
+!include config-msvc.mak
+
+!if "$(VALID_CFGSET)" == "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: $(COGL_BUILT_LIBS) $(COGL_EXTRA_TARGETS) all-build-info
+
+# Include the build rules for sources, DLLs and executables
+!include generate-msvc.mak
+!include build-rules-msvc.mak
+
+!include install.mak
+
+!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
diff --git a/build/nmake/build-rules-msvc.mak b/build/nmake/build-rules-msvc.mak
new file mode 100644
index 00000000..2b09284c
--- /dev/null
+++ b/build/nmake/build-rules-msvc.mak
@@ -0,0 +1,411 @@
+# 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 @<<
+# $<
+# <<
+
+{..\..\cogl\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{..\..\cogl\driver\gl\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{..\..\cogl\driver\gl\gl\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{..\..\cogl\driver\gl\gles\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{..\..\cogl\driver\nop\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{..\..\cogl\deprecated\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{..\..\cogl\winsys\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(LIBCOGL_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /c @<<
+$<
+<<
+
+{..\..\test-fixtures\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_CFLAGS) $(COGL_TEST_CFLAGS) $(LIBCOGL_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\ /c @<<
+$<
+<<
+
+{..\..\tests\micro-perf\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\}.obj::
+ @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ mkdir vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests
+ $(CC) $(CFLAGS) $(COGL_TEST_MICROPERF_CFLAGS) $(COGL_PUB_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ /c @<<
+$<
+<<
+
+{..\..\tests\unit\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\}.obj::
+ @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ mkdir vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests
+ $(CC) $(CFLAGS) $(COGL_TEST_UNIT_CFLAGS) $(COGL_TEST_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ /c @<<
+$<
+<<
+
+{..\..\tests\conform\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\}.obj::
+ @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ mkdir vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests
+ $(CC) $(CFLAGS) $(COGL_TEST_CONFORM_CFLAGS) $(COGL_TEST_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ /c @<<
+$<
+<<
+
+{..\..\cogl-path\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_PATH_CFLAGS) $(LIBCOGL_PATH_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\ /c @<<
+$<
+<<
+
+{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_PATH_CFLAGS) $(LIBCOGL_PATH_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\ /c @<<
+$<
+<<
+
+{..\..\cogl-path\tesselator\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\}.obj::
+ $(CC) $(CFLAGS) $(LIBCOGL_PATH_CFLAGS) $(LIBCOGL_PATH_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\ /c @<<
+$<
+<<
+
+{..\..\cogl-pango\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\}.obj::
+ @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\ mkdir vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango
+ $(CC) $(CFLAGS) $(LIBCOGL_PANGO_CFLAGS) $(LIBCOGL_PANGO_INCLUDES)
/Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\ /Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\ /c @<<
+$<
+<<
+
+{..\..\cogl-gst\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\}.obj::
+ @if not exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\ mkdir vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst
+ $(CC) $(CFLAGS) $(LIBCOGL_GST_CFLAGS) $(LIBCOGL_GST_INCLUDES) /Fovs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\
/Fdvs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\ /c @<<
+$<
+<<
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\cogl-gst-plugin.obj: ..\..\cogl-gst\cogl-gst-plugin.c
+ @if not exist $(@D)\ mkdir $(@D)
+ $(CC) $(CFLAGS) $(COGL_GST_PLUGIN_CFLAGS) $(LIBCOGL_GST_INCLUDES) /Fo$(@D)\ /Fd$(@D)\ /c @<<
+$**
+<<
+
+{..\..\examples\}.c{vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-examples\}.obj:
+ @if not exist $(@D)\ md $(@D)
+ $(CC) $(CFLAGS) $(COGL_EXAMPLE_BASE_CFLAGS) $(COGL_PUB_INCLUDES) /Fo$(@D)\ /Fd$(@D)\ /c @<<
+$<
+<<
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl.res: ..\..\cogl\cogl.rc
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\cogl-pango.res: ..\..\cogl-pango\cogl-pango.rc
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl.res vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\cogl-pango.res:
+ @if not exist $(@D)\ mkdir $(@D)
+ rc /fo$@ $**
+
+# Rules for building .lib files
+$(COGL_LIB): $(COGL_DLL)
+$(COGL_PATH_LIB): $(COGL_PATH_DLL)
+$(COGL_PANGO_LIB): $(COGL_PANGO_DLL)
+$(COGL_GST_LIB): $(COGL_GST_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
+$(COGL_DLL): \
+$(LIBCOGL_ENUM_HDRS) \
+$(LIBCOGL_DLL_OBJS) \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl.def
+ link /DLL $(LDFLAGS) $(LIBCOGL_DEP_LIBS) /implib:$(COGL_LIB)
/def:vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl.def /out:$@ @<<
+$(LIBCOGL_DLL_OBJS)
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+$(COGL_PATH_DLL): $(COGL_LIB) $(LIBCOGL_PATH_ENUM_HDRS) $(libcogl_path_OBJS)
+ link /DLL $(LDFLAGS) $(COGL_LIB) $(LIBCOGL_DEP_LIBS) /implib:$(COGL_PATH_LIB) -out:$@ @<<
+$(libcogl_path_OBJS)
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+$(COGL_PANGO_DLL): $(COGL_LIB) $(libcogl_pango_OBJS)
+ link /DLL $(LDFLAGS) $(LIBCOGL_PANGO_DEP_LIBS) $(LIBCOGL_DEP_LIBS) /implib:$(COGL_PANGO_LIB) -out:$@
@<<
+$**
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+$(COGL_GST_DLL): $(COGL_LIB) $(libcogl_gst_OBJS)
+ link /DLL $(LDFLAGS) $(LIBCOGL_GST_DEP_LIBS) $(LIBCOGL_DEP_LIBS) /implib:$(COGL_GST_LIB) -out:$@ @<<
+$**
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+$(COGL_GST_PLUGIN): $(COGL_GST_LIB) $(COGL_LIB) $(cogl_gst_plugin_OBJS)
+ link /DLL $(LDFLAGS) $(LIBCOGL_GST_DEP_LIBS) $(LIBCOGL_DEP_LIBS) -out:$@ @<<
+$**
+<<
+ @-if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;2
+
+# 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
+
+!include cogl_example_objs.mak
+!if [del /f/q cogl_example_objs.mak]
+!endif
+ link $(LDFLAGS) $(COGL_EXAMPLE_DEP_LIBS) $** /out:$@
+ @if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\test-conformance.exe: $(COGL_PATH_LIB) $(COGL_LIB) $(cogl_conform_test_OBJS)
+vs$(PDBVER)\$(CFG)\$(PLAT)\test-journal.exe: $(COGL_LIB)
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\test-journal.obj
+vs$(PDBVER)\$(CFG)\$(PLAT)\test-unit.exe: $(COGL_LIB)
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\test-unit-main.obj
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\test-conformance.exe \
+vs$(PDBVER)\$(CFG)\$(PLAT)\test-journal.exe \
+vs$(PDBVER)\$(CFG)\$(PLAT)\test-unit.exe:
+ link $(LDFLAGS) $** $(COGL_EXAMPLE_DEP_LIBS) /out:$@
+ @if exist $@.manifest mt /manifest $@.manifest /outputresource:$@;1
+
+# Introspection rules
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-1.0.gir: $(COGL_LIB) vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_1_gir_filelist
+ @echo Generating $@...
+ $(PYTHON) $(G_IR_SCANNER) \
+ --verbose -no-libtool \
+ --namespace=Cogl \
+ --nsversion=1.0 \
+ --library=cogl \
+ --include=GL-1.0 --include=GObject-2.0 \
+ --pkg-export=cogl-1.0 \
+ -I.. \
+ -Ivs$(PDBVER)\$(CFG)\$(PLAT) \
+ --c-include=cogl/cogl.h \
+ --warn-all \
+ --cflags-begin \
+ $(COGL_BASE_CFLAGS:/=-) \
+ $(LIBCOGL_INCLUDES:/=-) \
+ -UCOGL_ENABLE_EXPERIMENTAL_API \
+ -UCOGL_ENABLE_EXPERIMENTAL_2_0_API \
+ -UCOGL_COMPILATION \
+ -D__COGL_H_INSIDE__ \
+ -D__COGL_XLIB_H_INSIDE__ \
+ -D__COGL_EGL_H_INSIDE__ \
+ -D__COGL_GLX_H_INSIDE__ \
+ -DCOGL_GIR_SCANNING \
+ --cflags-end \
+ --filelist=vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_1_gir_filelist \
+ -Lvs$(PDBVER)\$(CFG)\$(PLAT) \
+ -o $@
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.gir: $(COGL_LIB) vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_2_gir_filelist
+ @echo Generating $@...
+ $(PYTHON) $(G_IR_SCANNER) \
+ --verbose -no-libtool \
+ --namespace=Cogl \
+ --nsversion=2.0 \
+ --library=cogl \
+ --include=GL-1.0 --include=GObject-2.0 \
+ --pkg-export=cogl-2.0-experimental \
+ -I.. \
+ -Ivs$(PDBVER)\$(CFG)\$(PLAT) \
+ --c-include=cogl/cogl.h \
+ --warn-all \
+ --symbol-prefix=cogl --symbol-prefix=cogl2 \
+ --cflags-begin \
+ $(COGL_BASE_CFLAGS:/=-) \
+ $(LIBCOGL_INCLUDES:/=-) \
+ $(BASE_INCLUDES:/=-) \
+ -DCOGL_ENABLE_EXPERIMENTAL_API=1 \
+ -UCOGL_COMPILATION \
+ -D__COGL_H_INSIDE__ \
+ -D__COGL_XLIB_H_INSIDE__ \
+ -DCOGL_GIR_SCANNING \
+ --cflags-end \
+ --filelist=vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_2_gir_filelist \
+ -Lvs$(PDBVER)\$(CFG)\$(PLAT) \
+ -o $@
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-1.0.gir: \
+$(COGL_PANGO_LIB) \
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-1.0.gir \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\coglpango_gir_filelist
+ @echo Generating $@...
+ $(PYTHON) $(G_IR_SCANNER) \
+ --verbose -no-libtool \
+ --namespace=CoglPango \
+ --nsversion=1.0 \
+ --library=cogl \
+ --library=cogl-pango \
+ --extra-library=harfbuzz \
+ --include=Pango-1.0 --include=PangoCairo-1.0 \
+ --pkg-export=cogl-pango-1.0 \
+ -I.. \
+ -Ivs$(PDBVER)\$(CFG)\$(PLAT) \
+ --warn-all \
+ --identifier-prefix=CoglPango \
+ --symbol-prefix=cogl_pango \
+ --c-include='cogl-pango/cogl-pango.h' \
+ --include-uninstalled=vs$(PDBVER)/$(CFG)/$(PLAT)/Cogl-1.0.gir \
+ --cflags-begin \
+ $(COGL_BASE_CFLAGS:/=-) \
+ $(LIBCOGL_INCLUDES:/=-) \
+ $(PANGO_INCLUDES:/=-) \
+ --cflags-end \
+ --filelist=vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\coglpango_gir_filelist \
+ -Lvs$(PDBVER)\$(CFG)\$(PLAT) \
+ -o $@
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-2.0.gir: \
+$(COGL_PANGO_LIB) \
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.gir \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\coglpango_gir_filelist
+ @echo Generating $@...
+ $(PYTHON) $(G_IR_SCANNER) \
+ --verbose -no-libtool \
+ --namespace=CoglPango \
+ --nsversion=2.0 \
+ --library=cogl \
+ --library=cogl-pango \
+ --extra-library=harfbuzz \
+ --include=Pango-1.0 --include=PangoCairo-1.0 \
+ --pkg-export=cogl-pango-2.0-experimental \
+ -I.. \
+ -Ivs$(PDBVER)\$(CFG)\$(PLAT) \
+ --warn-all \
+ --identifier-prefix=CoglPango \
+ --symbol-prefix=cogl_pango \
+ --c-include='cogl-pango/cogl-pango.h' \
+ --include-uninstalled=vs$(PDBVER)/$(CFG)/$(PLAT)/Cogl-2.0.gir \
+ --cflags-begin \
+ $(COGL_BASE_CFLAGS:/=-) \
+ $(LIBCOGL_INCLUDES:/=-) \
+ $(PANGO_INCLUDES:/=-) \
+ --cflags-end \
+ --filelist=vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\coglpango_gir_filelist \
+ -Lvs$(PDBVER)\$(CFG)\$(PLAT) \
+ -o $@
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglGst-2.0.gir: \
+$(COGL_PANGO_LIB) \
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.gir \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\coglgst_gir_filelist
+ @echo Generating $@...
+ $(PYTHON) $(G_IR_SCANNER) \
+ --verbose -no-libtool \
+ --namespace=CoglGst \
+ --nsversion=2.0 \
+ --library=cogl \
+ --library=cogl-gst \
+ --include=GObject-2.0 --include=Gst-1.0 --include=GstBase-1.0 \
+ --pkg-export=cogl-gst-2.0-experimental \
+ -I.. \
+ -Ivs$(PDBVER)\$(CFG)\$(PLAT) \
+ --warn-all \
+ --identifier-prefix=CoglGst \
+ --symbol-prefix=cogl_gst \
+ --c-include='cogl-gst/cogl-gst.h' \
+ --c-include="gst/gst.h" \
+ --include-uninstalled=vs$(PDBVER)/$(CFG)/$(PLAT)/Cogl-2.0.gir \
+ --pkg gstreamer-1.0 \
+ --add-init-section="gst_init(NULL, NULL);" \
+ --cflags-begin \
+ $(LIBCOGL_INCLUDES:/=-) \
+ $(GST_INCLUDES:/=-) \
+ --cflags-end \
+ --filelist=vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\coglgst_gir_filelist \
+ -Lvs$(PDBVER)\$(CFG)\$(PLAT) \
+ -o $@
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-1.0.typelib: vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-1.0.gir
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.typelib: vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.gir
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-1.0.typelib: \
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-1.0.typelib \
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-1.0.gir
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-2.0.typelib: \
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.typelib \
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-2.0.gir
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglGst-2.0.typelib: \
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.typelib \
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglGst-2.0.gir
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-1.0.typelib \
+vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.typelib \
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-1.0.typelib \
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-2.0.typelib \
+vs$(PDBVER)\$(CFG)\$(PLAT)\CoglGst-2.0.typelib:
+ $(G_IR_COMPILER) \
+ --includedir=vs$(PDBVER)\$(CFG)\$(PLAT) --debug --verbose \
+ $(@R:\=/).gir -o $@
+
+clean:
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.typelib
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.gir
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.exe.manifest
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.exe
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.dll.manifest
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.dll
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.pdb
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.ilk
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.exp
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\*.lib
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-examples\vc$(PDBVER)0.pdb
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-examples\*.obj
+ @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-examples
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst-plugin\vc$(PDBVER)0.pdb
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst-plugin\*.obj
+ @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst-plugin
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\vc$(PDBVER)0.pdb
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\coglgst_gir_filelist
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\*.obj
+ @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\vc$(PDBVER)0.pdb
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\coglpango_gir_filelist
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\*.res
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\*.obj
+ @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\vc$(PDBVER)0.pdb
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\*.obj
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\cogl-path-enum-types.c
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\cogl-path-enum-types.h
+ @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path
+ @if exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ del /f /q
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\vc$(PDBVER)0.pdb
+ @if exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\ del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\*.obj
+ @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\vc$(PDBVER)0.pdb
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_2_gir_filelist
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_1_gir_filelist
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\*.res
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\*.def
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\*.obj
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-enum-types.c
+ @-del /f /q vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-enum-types.h
+ @-del /f /q $(LIBCOGL_CONFIG_HDRS)
+ @-rd vs$(PDBVER)\$(CFG)\$(PLAT)\cogl
diff --git a/build/nmake/config-msvc.mak b/build/nmake/config-msvc.mak
new file mode 100644
index 00000000..cc27f766
--- /dev/null
+++ b/build/nmake/config-msvc.mak
@@ -0,0 +1,439 @@
+# NMake Makefile portion for enabling features for Windows builds
+
+!ifndef GLIB_MKENUMS
+GLIB_MKENUMS = $(PREFIX)\bin\glib-mkenums
+!endif
+
+!ifndef G_IR_SCANNER
+G_IR_SCANNER = $(PREFIX)\bin\g-ir-scanner
+!endif
+
+!ifndef G_IR_COMPILER
+G_IR_COMPILER = $(PREFIX)\bin\g-ir-compiler.exe
+!endif
+
+# We need to first check whether glib-mkenums is a Python script or a PERL
+# script. Note that Windows cmd.exe by itself does not support shebang
+# lines, so test run the script with Python and see whether that shows the
+# version info correctly.
+!if ![$(PYTHON) $(GLIB_MKENUMS) -v >NUL 2> mkenums.test.x]
+!endif
+
+!if ![for %f in (mkenums.test.x) do @if %~zf equ 0 echo GLIB_MKENUMS_TYPE = PYTHON > glibmkenums.type.x]
+!endif
+
+!if ![for %f in (mkenums.test.x) do @if %~zf gtr 0 echo GLIB_MKENUMS_TYPE = PERL > glibmkenums.type.x]
+!endif
+
+!include glibmkenums.type.x
+
+!if ![del glibmkenums.type.x mkenums.test.x]
+!endif
+
+!if "$(GLIB_MKENUMS_TYPE)" == "PYTHON"
+GLIB_MKENUMS_INTERP = $(PYTHON)
+!elseif "$(GLIB_MKENUMS_TYPE)" == "PERL"
+GLIB_MKENUMS_INTERP = $(PERL)
+!endif
+
+LIBCOGL_ENABLED_FEATURES = OpenGL/WGL
+COGL_ADDITIONAL_BUILD_OPTIONS = cogl-path
+
+LIBCOGL_INSTALLED_HDRS = \
+ $(COGL_1_PUB_HDRS) \
+ $(COGL_EXPERIMENTAL_HDRS) \
+ $(COGL_GL_PROTOTYPE_HDRS) \
+ $(COGL_OTHER_HDRS) \
+ $(COGL_WGL_HDRS)
+
+LIBCOGL_DLL_OBJS = $(libcogl_OBJS)
+
+LIBCOGL_DEP_LIBS = opengl32.lib user32.lib gdi32.lib intl.lib
+LIBCOGL_PANGO_DEP_LIBS = pangocairo-1.0.lib pango-1.0.lib cairo.lib
+LIBCOGL_GST_DEP_LIBS = gstvideo-1.0.lib gstbase-1.0.lib gstreamer-1.0.lib
+
+COGL_EXAMPLE_PROGS = \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-hello.exe \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-info.exe \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-point-sprites.exe \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-stereo.exe
+
+!if ($(VSVER) > 11) || "$(PLAT)" != "x64"
+COGL_EXAMPLE_PROGS = \
+ $(COGL_EXAMPLE_PROGS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-msaa.exe
+!endif
+
+COGL_INTROSPECTION_TYPELIBS =
+
+# We build cogl-vs$(PDBVER).dll and cogl-path-vs$(PDBVER).dll at least
+COGL_DLL = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-vs$(PDBVER).dll
+COGL_LIB = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl.lib
+COGL_PATH_DLL = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path-vs$(PDBVER).dll
+COGL_PATH_LIB = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path.lib
+COGL_PANGO_DLL = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango-vs$(PDBVER).dll
+COGL_PANGO_LIB = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango.lib
+COGL_GST_DLL = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst-vs$(PDBVER).dll
+COGL_GST_LIB = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst.lib
+COGL_GST_PLUGIN = vs$(PDBVER)\$(CFG)\$(PLAT)\gstcogl.dll
+
+COGL_BUILT_LIBS = $(COGL_LIB) $(COGL_PATH_LIB)
+COGL_EXTRA_TARGETS =
+
+COGL_EXAMPLE_DEP_LIBS = $(LIBCOGL_DEP_LIBS)
+
+LIBCOGL_TESTS_EXTRA_OBJS = \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\test-utils.obj
+
+COGL_TEST_PROGS = \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\test-conformance.exe \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\test-journal.exe \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\test-unit.exe
+
+# Please do not change anything beneath this line unless maintaining the NMake Makefiles
+
+COGL_BASE_CFLAGS = /FImsvc_recommended_pragmas.h /DHAVE_CONFIG_H
+COGL_LIB_COMMON_CFLAGS = /DCOGL_COMPILATION
+
+# Work around Khronos glext.h mishap...
+!ifndef USE_EGL
+COGL_LIB_COMMON_CFLAGS = $(COGL_LIB_COMMON_CFLAGS) /DGL_EXT_EGL_image_storage=0
+!endif
+
+COGL_PUB_INCLUDES = \
+ /I..\.. \
+ /Ivs$(PDBVER)\$(CFG)\$(PLAT) \
+ $(BASE_INCLUDES)
+
+COGL_PATH_LIB_INCLUDES = /Ivs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path
+
+COGL_BASE_INCLUDES = \
+ /Ivs$(PDBVER)\$(CFG)\$(PLAT)\cogl \
+ /I..\..\cogl \
+ /I..\..\cogl\winsys \
+ $(COGL_PUB_INCLUDES)
+
+LIBCOGL_INCLUDES = \
+ $(COGL_BASE_INCLUDES) \
+ /I..\..\cogl\deprecated \
+ /I..\..\cogl\driver\gl \
+ /I..\..\cogl\driver\gl/gl
+
+LIBCOGL_CFLAGS = \
+ /DG_LOG_DOMAIN=\"Cogl\" \
+ $(COGL_LIB_COMMON_CFLAGS) \
+ /DCOGL_GL_LIBNAME=\"\" \
+ $(COGL_BASE_CFLAGS)
+
+LIBCOGL_PATH_CFLAGS = \
+ $(COGL_LIB_COMMON_CFLAGS) \
+ /DG_LOG_DOMAIN=\"CoglPath\" \
+ $(COGL_BASE_CFLAGS)
+
+LIBCOGL_PATH_INCLUDES = \
+ $(COGL_PATH_LIB_INCLUDES) \
+ /I..\..\cogl-path\tesselator \
+ $(COGL_BASE_INCLUDES)
+
+LIBCOGL_PANGO_CFLAGS = \
+ $(COGL_LIB_COMMON_CFLAGS) \
+ /DG_LOG_DOMAIN=\"CoglPango\" \
+ $(COGL_BASE_CFLAGS)
+
+LIBCOGL_PANGO_INCLUDES = \
+ $(COGL_BASE_INCLUDES) \
+ $(PANGO_INCLUDES)
+
+LIBCOGL_GST_CFLAGS = \
+ $(COGL_LIB_COMMON_CFLAGS) \
+ /DG_LOG_DOMAIN=\"CoglGst\" \
+ /DCOGL_GST_API=__declspec(dllexport) \
+ /DWIN32 \
+ $(COGL_BASE_CFLAGS)
+
+COGL_GST_PLUGIN_CFLAGS = \
+ $(COGL_LIB_COMMON_CFLAGS) \
+ /DWIN32 \
+ $(COGL_BASE_CFLAGS)
+
+LIBCOGL_GST_INCLUDES = \
+ $(COGL_BASE_INCLUDES) \
+ $(GST_INCLUDES)
+
+COGL_PROGS_BASE_CFLAGS = \
+ /DCOGL_ENABLE_EXPERIMENTAL_2_0_API \
+ /DCOGL_ENABLE_EXPERIMENTAL_API \
+ /DWIN32 \
+ $(COGL_BASE_CFLAGS)
+
+COGL_EXAMPLE_BASE_CFLAGS = \
+ /DCOGL_EXAMPLES_DATA=\"$(cogl_topsrcdir)/examples\" \
+ $(COGL_PROGS_BASE_CFLAGS)
+
+!ifdef GDK_PIXBUF
+!ifdef NO_GLIB
+!error GDK_PIXBUF requires GLib support to be enabled
+!endif
+
+LIBCOGL_CFLAGS = $(LIBCOGL_CFLAGS) /DUSE_GDKPIXBUF
+
+LIBCOGL_DEP_LIBS = \
+ $(LIBCOGL_DEP_LIBS) \
+ gdk_pixbuf-2.0.lib
+
+LIBCOGL_ENABLED_FEATURES = \
+ $(LIBCOGL_ENABLED_FEATURES) \
+ GDK-Pixbuf
+!else
+
+LIBCOGL_ENABLED_FEATURES = \
+ $(LIBCOGL_ENABLED_FEATURES) \
+ builtin-image-loader
+!endif
+
+!ifdef INTROSPECTION
+COGL_INTROSPECTION_TYPELIBS = \
+ $(COGL_INTROSPECTION_TYPELIBS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-1.0.typelib \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\Cogl-2.0.typelib
+
+COGL_ADDITIONAL_BUILD_OPTIONS = \
+ $(COGL_ADDITIONAL_BUILD_OPTIONS) \
+ introspection
+!endif
+
+!ifdef PANGO
+!ifdef NO_GLIB
+!error PANGO requires GLib support to be enabled
+!endif
+!ifndef CAIRO
+CAIRO=1
+!endif
+
+COGL_BUILT_LIBS = \
+ $(COGL_BUILT_LIBS) \
+ $(COGL_PANGO_LIB)
+
+!if $(VSVER) != 9 || "$(PLAT)" != "x64"
+COGL_EXAMPLE_PROGS = \
+ $(COGL_EXAMPLE_PROGS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-crate.exe
+
+COGL_EXAMPLE_DEP_LIBS = \
+ $(COGL_EXAMPLE_DEP_LIBS) \
+ $(LIBCOGL_PANGO_DEP_LIBS)
+!endif
+
+!ifdef INTROSPECTION
+COGL_INTROSPECTION_TYPELIBS = \
+ $(COGL_INTROSPECTION_TYPELIBS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-1.0.typelib \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\CoglPango-2.0.typelib
+!endif
+
+COGL_ADDITIONAL_BUILD_OPTIONS = \
+ $(COGL_ADDITIONAL_BUILD_OPTIONS) \
+ cogl-pango
+!endif
+
+!ifdef CAIRO
+
+LIBCOGL_CFLAGS = $(LIBCOGL_CFLAGS) /DHAVE_CAIRO
+
+LIBCOGL_DEP_LIBS = \
+ $(LIBCOGL_DEP_LIBS) \
+ cairo.lib
+
+LIBCOGL_ENABLED_FEATURES = \
+ $(LIBCOGL_ENABLED_FEATURES) \
+ Cairo
+!endif
+
+!ifdef GST
+!ifdef NO_GLIB
+!error GST requires GLib support to be enabled
+!endif
+
+COGL_BUILT_LIBS = \
+ $(COGL_BUILT_LIBS) \
+ $(COGL_GST_LIB)
+
+COGL_EXTRA_TARGETS = \
+ $(COGL_GST_PLUGIN)
+
+COGL_EXAMPLE_PROGS = \
+ $(COGL_EXAMPLE_PROGS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-basic-video-player.exe
+
+COGL_EXAMPLE_DEP_LIBS = \
+ $(COGL_EXAMPLE_DEP_LIBS) \
+ $(LIBCOGL_GST_DEP_LIBS)
+
+!ifdef INTROSPECTION
+COGL_INTROSPECTION_TYPELIBS = \
+ $(COGL_INTROSPECTION_TYPELIBS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\CoglGst-2.0.typelib
+!endif
+
+COGL_ADDITIONAL_BUILD_OPTIONS = \
+ $(COGL_ADDITIONAL_BUILD_OPTIONS) \
+ cogl-gst
+!endif
+
+!ifndef NO_GLIB
+LIBCOGL_DLL_OBJS = \
+ $(LIBCOGL_DLL_OBJS) \
+ $(libcogl_glib_OBJS)
+
+LIBCOGL_INSTALLED_HDRS = \
+ $(LIBCOGL_INSTALLED_HDRS) \
+ $(COGL_GLIB_HDRS)
+
+LIBCOGL_DEP_LIBS = \
+ gobject-2.0.lib \
+ gmodule-2.0.lib \
+ glib-2.0.lib \
+ $(LIBCOGL_DEP_LIBS)
+
+LIBCOGL_ENABLED_FEATURES = \
+ $(LIBCOGL_ENABLED_FEATURES) \
+ GLib
+!endif
+
+!if defined (SDL) && defined (SDL2)
+!error Only one of SDL or SDL2 can be enabled
+!endif
+
+!ifdef SDL
+LIBCOGL_DLL_OBJS = \
+ $(LIBCOGL_DLL_OBJS) \
+ $(libcogl_sdl_OBJS)
+
+LIBCOGL_INSTALLED_HDRS = \
+ $(LIBCOGL_INSTALLED_HDRS) \
+ $(COGL_SDL_HDRS)
+
+LIBCOGL_DEP_LIBS = \
+ $(LIBCOGL_DEP_LIBS) \
+ SDL.lib
+
+COGL_EXAMPLE_PROGS = \
+ $(COGL_EXAMPLE_PROGS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-sdl-hello.exe
+
+COGL_EXAMPLE_DEP_LIBS = \
+ $(COGL_EXAMPLE_DEP_LIBS) \
+ SDLmain.lib shell32.lib /subsystem:console
+
+LIBCOGL_ENABLED_FEATURES = \
+ $(LIBCOGL_ENABLED_FEATURES) \
+ SDL
+!endif
+
+!ifdef SDL2
+LIBCOGL_DLL_OBJS = \
+ $(LIBCOGL_DLL_OBJS) \
+ $(libcogl_sdl2_OBJS)
+
+LIBCOGL_INSTALLED_HDRS = \
+ $(LIBCOGL_INSTALLED_HDRS) \
+ $(COGL_SDL_HDRS)
+
+LIBCOGL_DEP_LIBS = \
+ $(LIBCOGL_DEP_LIBS) \
+ SDL2.lib
+
+COGL_EXAMPLE_PROGS = \
+ $(COGL_EXAMPLE_PROGS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-sdl2-hello.exe
+
+COGL_EXAMPLE_DEP_LIBS = \
+ $(COGL_EXAMPLE_DEP_LIBS) \
+ SDL2main.lib shell32.lib /subsystem:console
+
+LIBCOGL_ENABLED_FEATURES = \
+ $(LIBCOGL_ENABLED_FEATURES) \
+ SDL2
+!endif
+
+# Supported needed!
+!ifdef USE_EGL
+LIBCOGL_CFLAGS = \
+ $(LIBCOGL_CFLAGS) \
+ /DCOGL_GLES1_LIBNAME=\"\" \
+ /DCOGL_GLES2_LIBNAME=\"\" \
+
+LIBCOGL_INCLUDES = \
+ $(LIBCOGL_INCLUDES) \
+ /I..\..\cogl\driver\gl/gles
+
+LIBCOGL_DLL_OBJS = \
+ $(LIBCOGL_DLL_OBJS) \
+ $(COGL_EGL_SRCS)
+
+LIBCOGL_INSTALLED_HDRS = \
+ $(LIBCOGL_INSTALLED_HDRS) \
+ $(COGL_EGL_HDRS) \
+ $(COGL_EGL_GEN_HDRS)
+
+COGL_EXAMPLE_PROGS = \
+ $(COGL_EXAMPLE_PROGS) \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gles2-context.exe \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gles2-gears.exe
+
+LIBCOGL_ENABLED_FEATURES = \
+ $(LIBCOGL_ENABLED_FEATURES) \
+ EGL
+!endif
+
+COGL_EXTRA_TARGETS = $(COGL_EXTRA_TARGETS) $(COGL_INTROSPECTION_TYPELIBS) $(COGL_EXAMPLE_PROGS)
+
+!ifdef BUILD_TESTS
+LIBCOGL_CFLAGS = \
+ $(LIBCOGL_CFLAGS) \
+ /DENABLE_UNIT_TESTS
+
+COGL_TEST_CFLAGS = \
+ /DCOGL_DISABLE_DEPRECATED \
+ /DTESTS_DATADIR=\"$(cogl_topsrcdir)/tests/data\"
+
+COGL_TEST_MICROPERF_CFLAGS = \
+ /DCOGL_ENABLE_EXPERIMENTAL_API \
+ $(COGL_TEST_CFLAGS)
+
+COGL_TEST_CONFORM_CFLAGS = \
+ /DCOGL_DISABLE_DEPRECATION_WARNINGS \
+ $(COGL_TEST_MICROPERF_CFLAGS)
+
+COGL_TEST_UNIT_CFLAGS = \
+ $(COGL_TEST_CFLAGS) \
+ /DENABLE_UNIT_TESTS \
+ /DCOGL_COMPILATION
+
+COGL_TEST_INCLUDES = \
+ $(COGL_PUB_INCLUDES) \
+ /I..\..\test-fixtures \
+ /Ivs$(PDBVER)\$(CFG)\$(PLAT)\cogl
+
+COGL_EXTRA_TARGETS = $(COGL_EXTRA_TARGETS) $(COGL_TEST_PROGS)
+
+COGL_ADDITIONAL_BUILD_OPTIONS = \
+ $(COGL_ADDITIONAL_BUILD_OPTIONS) \
+ tests
+!endif
+
+# These are the base minimum libraries required for building cogl.
+BASE_INCLUDES = \
+ /I$(PREFIX)\include\gdk-pixbuf \
+ /I$(PREFIX)\include\glib-2.0 \
+ /I$(PREFIX)\lib\glib-2.0\include \
+ /I$(PREFIX)\include
+
+PANGO_INCLUDES = /I$(PREFIX)\include\pango-1.0 /I$(PREFIX)\include\harfbuzz
+
+GST_INCLUDES = /I$(PREFIX)\include\gstreamer-1.0
+
+LIBCOGL_ENUM_SRCS = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-enum-types.c
+LIBCOGL_ENUM_HDRS = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-enum-types.h
+LIBCOGL_PATH_ENUM_HDRS = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\cogl-path-enum-types.h
+LIBCOGL_PATH_ENUM_SRCS = vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\cogl-path-enum-types.c
diff --git a/build/nmake/create-lists-msvc.mak b/build/nmake/create-lists-msvc.mak
new file mode 100644
index 00000000..9e3f0472
--- /dev/null
+++ b/build/nmake/create-lists-msvc.mak
@@ -0,0 +1,282 @@
+# 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)]
+#!endif
+
+# 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 a.cc, %~xc means .cc
+# %~nc gives the file name of a given file without extension, %c in this case, so if %c is a.cc, %~nc means a
+
+NULL=
+
+# For cogl
+!if [echo cogl_topsrcdir=%CD:\=/%/../.. > cogl.mak ]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl1_HDRS]
+!endif
+
+!if [for %c in ($(cogl_1_public_h:/=\)) do @if "%~xc" == ".h" @call create-lists.bat file cogl.mak
..\..\cogl\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_public_HDRS]
+!endif
+
+!if [for %c in ($(cogl_extra_public_headers)) do @if "%~xc" == ".h" @call create-lists.bat file cogl.mak
..\..\cogl\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_gl_prototype_HDRS]
+!endif
+
+!if [for %c in ($(cogl_gl_prototypes_h:/=\)) do @if "%~xc" == ".h" @call create-lists.bat file cogl.mak
..\..\cogl\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl2_HDRS]
+!endif
+
+!if [for %c in ($(cogl_experimental_h:/=\)) do @if "%~xc" == ".h" @call create-lists.bat file cogl.mak
..\..\cogl\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl2_extra_HDRS]
+!endif
+
+!if [for %c in ($(cogl_additional_experimental_h:/=\)) do @if "%~xc" == ".h" @call create-lists.bat file
cogl.mak ..\..\cogl\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak libcogl_OBJS]
+!endif
+
+!if [for %c in ($(cogl_base_sources_c:/=\)) do @if "%~xc" == ".c" @echo
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj \>>cogl.mak]
+!endif
+
+!if [for %c in ($(cogl_deprecated_sources:/=\)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [for %c in ($(cogl_driver_sources:/=\)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [for %c in ($(cogl_gl_driver_sources:/=\)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [for %c in ($(cogl_gl_gl_driver_sources:/=\)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [for %c in ($(cogl_winsys_common_sources:/=\)) do @if "%~xc" == ".c" @call create-lists.bat file
cogl.mak vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [for %c in ($(cogl_wgl_sources_c:/=\) $(cogl_winsys_wgl_sources:/=\)) do @if "%~xc" == ".c" @call
create-lists.bat file cogl.mak vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!ifdef BUILD_TESTS
+!if [for %c in (test-utils.c) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+!endif
+
+!if [for %c in (cogl-enum-types.obj cogl.res) do @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak libcogl_glib_OBJS]
+!endif
+
+!if [for %c in ($(cogl_glib_sources:/=\)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak libcogl_sdl_OBJS]
+!endif
+
+!if [for %c in ($(cogl_sdl_sources_c:/=\) $(cogl_winsys_sdl_sources:/=\)) do @if "%~xc" == ".c" @call
create-lists.bat file cogl.mak vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak libcogl_sdl2_OBJS]
+!endif
+
+!if [for %c in ($(cogl_sdl_sources_c:/=\) $(cogl_winsys_sdl2_sources:/=\)) do @if "%~xc" == ".c" @call
create-lists.bat file cogl.mak vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_path1_HDRS]
+!endif
+
+!if [for %c in ($(source_1_x_h)) do @if "%~xc" == ".h" @call create-lists.bat file cogl.mak
..\..\cogl-path\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_path_actual_hdrs]
+!endif
+
+!if [for %c in ($(source_path_h)) do @if "%~xc" == ".h" @call create-lists.bat file cogl.mak
..\..\cogl-path\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak libcogl_path_OBJS]
+!endif
+
+!if [for %c in ($(source_path_c:/=\) cogl-path-enum-types.c) do @if "%~xc" == ".c" @call create-lists.bat
file cogl.mak vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak libcogl_pango_OBJS]
+!endif
+
+!if [for %c in ($(source_pango_c:/=\)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\%~nc.obj]
+!endif
+
+!if [for %c in (cogl-pango.res) do @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_pango_real_srcs]
+!endif
+
+!if [for %c in ($(source_pango_c:/=\)) do @call create-lists.bat file cogl.mak ..\..\cogl-pango\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_pango_real_hdrs]
+!endif
+
+!if [for %c in ($(source_pango_h:/=\)) do @call create-lists.bat file cogl.mak ..\..\cogl-pango\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak libcogl_gst_OBJS]
+!endif
+
+!if [for %c in ($(source_gst_c)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_gst_real_srcs]
+!endif
+
+!if [for %c in ($(source_gst_c)) do @call create-lists.bat file cogl.mak ..\..\cogl-gst\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_gst_real_hdrs]
+!endif
+
+!if [for %c in ($(source_gst_h)) do @call create-lists.bat file cogl.mak ..\..\cogl-gst\%c]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_gst_plugin_OBJS]
+!endif
+
+!if [for %c in ($(plugin_source_gst_c)) do @if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [for %c in (..\..\examples\*.c) do @echo vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-examples\%~nc.obj:
%c>>cogl_example_objs.mak & @echo vs$(PDBVER)\$(CFG)\$(PLAT)\%~nc.exe:
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-examples\%~nc.obj ^$(COGL_BUILT_LIBS)>>cogl_example_objs.mak]
+!endif
+
+!if [echo.>>cogl_example_objs.mak]
+!endif
+
+!if [for %c in (..\..\examples\*.c) do @echo vs$(PDBVER)\$(CFG)\$(PLAT)\%~nc.exe \>>cogl_example_objs.mak]
+!endif
+
+!if [echo :>>cogl_example_objs.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_unit_test_OBJS]
+!endif
+
+!if [for %c in (..\..\tests\unit\*.c) do @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_micro_perf_test_OBJS]
+!endif
+
+!if [for %c in (..\..\tests\micro-perf\*.c) do @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!if [call create-lists.bat header cogl.mak cogl_conform_test_OBJS]
+!endif
+
+!if [for %c in ($(common_test_sources) $(test_sources) $(non_emscripten_test_sources)
$(cogl_path_test_sources)) do @@if "%~xc" == ".c" @call create-lists.bat file cogl.mak
vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests\%~nc.obj]
+!endif
+
+!if [call create-lists.bat footer cogl.mak]
+!endif
+
+!include cogl.mak
+
+!if [del /f /q cogl.mak]
+!endif
diff --git a/build/nmake/create-lists.bat b/build/nmake/create-lists.bat
new file mode 100644
index 00000000..ef60d5ce
--- /dev/null
+++ b/build/nmake/create-lists.bat
@@ -0,0 +1,42 @@
+@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
+
+:header
+if "%3" == "" goto error_var
+echo %3 = \>>%2
+goto done
+
+:addfile
+if "%3" == "" goto error_file
+echo. %3 \>>%2
+goto done
+
+:footer
+echo. $(NULL)>>%2
+echo.>>%2
+goto done
+
+:error_cmd
+echo Specified command '%1' was invalid. Valid commands are: header file footer.
+goto done
+
+:error_no_destfile
+echo Destination NMake snippet file must be specified
+goto done
+
+:error_var
+echo A name must be specified for using '%1'.
+goto done
+
+:error_file
+echo A file must be specified for using '%1'.
+goto done
+
+:done
\ No newline at end of file
diff --git a/build/nmake/detectenv-msvc.mak b/build/nmake/detectenv-msvc.mak
new file mode 100644
index 00000000..d76726ca
--- /dev/null
+++ b/build/nmake/detectenv-msvc.mak
@@ -0,0 +1,162 @@
+# 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)
+!endif
+
+# 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
+!endif
+
+# 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
+!endif
+
+# 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
+!endif
+
+# 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)
+!endif
+
+ERRNUL = 2>NUL
+_HASH=^#
+
+!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)elif defined(_M_ARM64) >> vercl.x] \
+ && ![echo PLAT=arm64 >> vercl.x] \
+ && ![echo $(_HASH)endif >> vercl.x] \
+ && ![cl -nologo -TC -P vercl.x $(ERRNUL)]
+!include vercl.i
+!if ![echo VCVER= ^\> vercl.vc] \
+ && ![set /a $(VCVERSION) / 100 - 6 >> vercl.vc]
+!include vercl.vc
+!endif
+!endif
+!if ![del $(ERRNUL) /q/f vercl.x vercl.i vercl.vc]
+!endif
+
+!if $(VCVERSION) > 1499 && $(VCVERSION) < 1600
+VSVER = 9
+!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) < 1910
+VSVER = 14
+!elseif $(VCVERSION) > 1909 && $(VCVERSION) < 1920
+VSVER = 15
+!elseif $(VCVERSION) > 1919 && $(VCVERSION) < 1930
+VSVER = 16
+!elseif $(VCVERSION) > 1929 && $(VCVERSION) < 2000
+VSVER = 17
+!else
+VSVER = 0
+!endif
+
+!if "$(VSVER)" == "0"
+MSG = ^
+This NMake Makefile set supports Visual Studio^
+9 (2008) through 17 (2022). Your Visual Studio^
+version is not supported.
+!error $(MSG)
+!else
+!if $(VSVER) < 15
+PDBVER = $(VSVER)
+!else
+PDBVER = 14
+!endif
+!endif
+
+VALID_CFGSET = FALSE
+!if "$(CFG)" == "release" || "$(CFG)" == "Release" || "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+VALID_CFGSET = TRUE
+!endif
+
+# One may change these items, but be sure to test
+# the resulting binaries
+!if "$(CFG)" == "release" || "$(CFG)" == "Release"
+CFLAGS_ADD_NO_GL = /MD /O2 /MP
+CFLAGS_ADD = $(CFLAGS_ADD_NO_GL) /GL
+!if "$(VSVER)" != "9"
+CFLAGS_ADD = $(CFLAGS_ADD) /d2Zi+
+CFLAGS_ADD_NO_GL = $(CFLAGS_ADD_NO_GL) /d2Zi+
+!endif
+!else
+CFLAGS_ADD = /MDd /Od
+CFLAGS_ADD_NO_GL = $(CFLAGS_ADD)
+!endif
+
+!if "$(PLAT)" == "x64"
+LDFLAGS_ARCH = /machine:x64
+!elseif "$(PLAT)" == "arm64"
+LDFLAGS_ARCH = /machine:arm64
+!else
+LDFLAGS_ARCH = /machine:x86
+!endif
+
+!if "$(VALID_CFGSET)" == "TRUE"
+CFLAGS_NOGL = $(CFLAGS_ADD_NO_GL) /W3 /Zi
+CFLAGS = $(CFLAGS_ADD) /W3 /Zi
+
+LDFLAGS_BASE = $(LDFLAGS_ARCH) /libpath:$(PREFIX)\lib /DEBUG
+
+!if "$(CFG)" == "debug" || "$(CFG)" == "Debug"
+ARFLAGS_NOLTCG = $(LDFLAGS_ARCH)
+ARFLAGS = $(LDFLAGS_ARCH)
+LDFLAGS_NOLTCG = $(LDFLAGS_BASE)
+LDFLAGS = $(LDFLAGS_BASE)
+!else
+ARFLAGS_NOLTCG = $(LDFLAGS_ARCH) /LTCG
+ARFLAGS = $(ARFLAGS_NOLTCG) /LTCG
+LDFLAGS_NOLTCG = $(LDFLAGS_BASE) /opt:ref
+LDFLAGS = $(LDFLAGS_NOLTCG) /LTCG
+!endif
+!endif
diff --git a/build/nmake/generate-msvc.mak b/build/nmake/generate-msvc.mak
new file mode 100644
index 00000000..981d003e
--- /dev/null
+++ b/build/nmake/generate-msvc.mak
@@ -0,0 +1,72 @@
+# 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.
+
+# Create the build directories
+
+LIBCOGL_CONFIG_HDRS = \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\config.h \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-defines.h \
+ vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-gl-header.h
+
+!if defined (SDL) || defined (SDL2)
+COGL_DEFINES_H_DEP = ..\..\cogl\cogl-defines.h.win32_SDL
+!else
+COGL_DEFINES_H_DEP = ..\..\cogl\cogl-defines.h.win32
+!endif
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\config.h: ..\..\config.h.win32
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-defines.h: $(COGL_DEFINES_H_DEP)
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-gl-header.h: ..\..\cogl\cogl-gl-header.h.win32
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\config.h \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-defines.h \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl-gl-header.h:
+ @echo Copying $** to $@...
+ @if not exist $(@D)\ mkdir $(@D)
+ @copy $** $@
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-tests \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-examples \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst-plugin \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango:
+ @if not exist $(@D)\ mkdir $@
+
+$(LIBCOGL_ENUM_SRCS): ..\..\cogl\cogl-enum-types.c.in $(cogl1_HDRS) $(LIBCOGL_CONFIG_HDRS)
+$(LIBCOGL_ENUM_HDRS): ..\..\cogl\cogl-enum-types.h.in $(cogl1_HDRS) $(LIBCOGL_ENUM_SRCS)
+
+$(LIBCOGL_PATH_ENUM_SRCS): ..\..\cogl-path\cogl-path-enum-types.c.in $(cogl_path1_HDRS)
+$(LIBCOGL_PATH_ENUM_HDRS): ..\..\cogl-path\cogl-path-enum-types.h.in $(cogl_path1_HDRS)
$(LIBCOGL_PATH_ENUM_SRCS)
+
+$(LIBCOGL_ENUM_SRCS) $(LIBCOGL_ENUM_HDRS):
+ @echo Generating $@...
+ @$(GLIB_MKENUMS_INTERP) $(GLIB_MKENUMS) --template ..\..\cogl\$(@F).in $(cogl1_HDRS) > $@
+
+$(LIBCOGL_PATH_ENUM_SRCS) $(LIBCOGL_PATH_ENUM_HDRS):
+ @echo Generating $@...
+ @if not exist $(@D)\ mkdir $(@D)
+ @$(GLIB_MKENUMS_INTERP) $(GLIB_MKENUMS) --template ..\..\cogl-path\$(@F).in $(cogl_path1_HDRS) > $@
+
+# Generate .def files
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl.def: ..\..\cogl\cogl.symbols
+ @echo Generating $@...
+ @if not exist $(@D)\ mkdir $(@D)
+ echo EXPORTS > $@
+ $(CPP) /EP $** >> $@
+
+# Generate filelists for introspection
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_1_gir_filelist: $(cogl1_HDRS) $(LIBCOGL_ENUM_HDRS)
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_2_gir_filelist: $(cogl2_HDRS) $(cogl2_extra_HDRS) $(LIBCOGL_ENUM_HDRS)
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\coglpango_gir_filelist: $(cogl_pango_real_hdrs) $(cogl_pango_real_srcs)
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\coglgst_gir_filelist: $(cogl_gst_real_hdrs) $(cogl_gst_real_srcs)
+
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_1_gir_filelist \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\cogl_2_gir_filelist \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-pango\coglpango_gir_filelist \
+vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-gst\coglgst_gir_filelist:
+ @for %%f in ($**) do @echo %%f >> $@
diff --git a/build/nmake/info-msvc.mak b/build/nmake/info-msvc.mak
new file mode 100644
index 00000000..c0c0839e
--- /dev/null
+++ b/build/nmake/info-msvc.mak
@@ -0,0 +1,92 @@
+# NMake Makefile portion for displaying config info
+
+all-build-info:
+ @echo.
+ @echo ----------
+ @echo Build info
+ @echo ---------
+ @echo Build Type: $(CFG)
+ @echo Enabled features: $(LIBCOGL_ENABLED_FEATURES)
+ @echo Other build options: $(COGL_ADDITIONAL_BUILD_OPTIONS)
+
+help:
+ @echo.
+ @echo ============================
+ @echo Building Cogl Using NMake
+ @echo ============================
+ @echo nmake /f Makefile.vc CFG=[release^|debug] ^<PREFIX=PATH^>
+ @echo.
+ @echo Where:
+ @echo ------
+ @echo CFG: Required, use CFG=release for an optimized build and CFG=debug
+ @echo for a debug build. PDB files are generated for all builds. By default
+ @echo the main Cogl DLL and the CoglPath DLL will be built, along with example
+ @echo programs that only make use of them.
+ @echo.
+ @echo PYTHON: Required if your Python interpreter is not in your PATH and if
+ @echo using GLib-2.53.1 (or later) or building the introspection files are
+ @echo desired. This is the full path to the Python interpreter that is present
+ @echo on your system. For building the introspection files, this interpreter
+ @echo must match the release series and platform configuration (Win32 or x64)
+ @echo of your installation of gobject-introspection (please see the part about
+ @echo INTROSPECTION)
+ @echo.
+ @echo PERL: Required if your PERL interpreter is not in your PATH and if
+ @echo using GLib-2.52.x (or earlier). This is the full path to the PERL
+ @echo interpreter that is present on your system.
+ @echo.
+ @echo PREFIX: Optional, the path where dependent libraries and tools may be
+ @echo found, default is ^$(srcrootdir)\..\vs^$(short_vs_ver)\^$(platform),
+ @echo where ^$(short_vs_ver) is 15 for VS 2017 and so on; and
+ @echo ^$(platform) is Win32 for 32-bit builds and x64 for x64 builds.
+ @echo.
+ @echo SDL *or* SDL2: Optional, use if SDL-1.2.x or SDL-2.x support is desired.
+ @echo The SDL-1.2.x or 2.x headers and libraries need to be found in %INCLUDE%
+ @echo and %LIB% respectively, or must be in $(PREFIX)\include\SDL and
+ @echo $(PREFIX)\lib respectively. SDL and SDL2 cannot be both enabled.
+ @echo.
+ @echo GDK_PIXBUF: Optional, but recommended, for loading images that GDK-Pixbuf
+ @echo supports. The GDK-Pixbuf-2.x headers and libraries need to be found
+ @echo in %INCLUDE% and %LIB% respectively, or must be in
+ @echo $(PREFIX)\include\gdk-pixbuf-2.0 and $(PREFIX)\lib respectively. This cannot
+ @echo be used with NO_GLIB.
+ @echo.
+ @echo CAIRO: Optional, used for better debugging support as well as Pango support.
+ @echo The Cairo headers and libraries need to be found in %INCLUDE% and %LIB%
+ @echo respectively, or must be in $(PREFIX)\include and $(PREFIX)\lib respectively.
+ @echo.
+ @echo PANGO: Optional, for building the CoglPango DLL and the sample programs
+ @echo that makes use of it. The Pango-1.x headers and libraries need to be found
+ @echo in %INCLUDE% and %LIB% respectively, or must be in
+ @echo $(PREFIX)\include\pango-1.0 and $(PREFIX)\lib respectively. This implies
+ @echo specifiying CAIRO as well, since PangoCairo is used. This cannot
+ @echo be used with NO_GLIB.
+ @echo.
+ @echo GST: Optional, for building the CoglGst DLL and the sample programs
+ @echo that makes use of it. The GStreamer-1.x headers and libraries need to be found
+ @echo in %INCLUDE% and %LIB% respectively, or must be in
+ @echo $(PREFIX)\include\gstreamer-1.0 and $(PREFIX)\lib respectively. This cannot
+ @echo be used with NO_GLIB.
+ @echo.
+ @echo BUILD_TESTS: Enable to build the test programs and the test support into
+ @echo the final Cogl DLL.
+ @echo.
+ @echo INTROSPECTION: Optional, for building the introspection files for all libraries
+ @echo built, except for CoglPath. The gobject-introspection scanner and compiler must
+ @echo be found in $(PREFIX)\bin, and the python interpreter you are using (please see
+ @echo PYTHON) must match the release series and platform configuration (Win32, x64)
+ @echo of the one that was used to build gobject-introspection.
+ @echo ======
+ @echo If any of the following options are changed: BUILD_TESTS, CAIRO, SDL, SDL2
+ @echo USE_EGL, NO_GLIB or GDK_PIXBUF, it is highly recommended that you do a
+ @echo 'clean' before re-attempting the build. USE_EGL is currently not supported
+ @echo for Windows/Visual Studio builds.
+ @echo ======
+ @echo A 'clean' target is supported to remove all generated files, intermediate
+ @echo object files and binaries for the specified configuration.
+ @echo.
+ @echo An 'install' target is supported to copy the build (DLLs, example programs,
+ @echo LIBs, along with the introspection files if applicable) to appropriate
+ @echo locations under ^$(PREFIX).
+ @echo ======
+ @echo.
diff --git a/build/nmake/install.mak b/build/nmake/install.mak
new file mode 100644
index 00000000..017fad44
--- /dev/null
+++ b/build/nmake/install.mak
@@ -0,0 +1,41 @@
+# NMake Makefile snippet for copying the built libraries, utilities and headers to
+# a path under $(PREFIX).
+
+install: all
+ @if not exist $(PREFIX)\bin mkdir $(PREFIX)\bin
+ @if not exist $(PREFIX)\lib mkdir $(PREFIX)\lib
+ @if not "$(COGL_INTROSPECTION_TYPELIBS)" == "" if not exist $(PREFIX)\lib\girepository-1.0 mkdir
$(PREFIX)\lib\girepository-1.0
+ @if not "$(GST)" == "" if not exist $(PREFIX)\lib\gstreamer-1.0 mkdir $(PREFIX)\lib\gstreamer-1.0
+ @if not "$(COGL_INTROSPECTION_TYPELIBS)" == "" if not exist $(PREFIX)\share\gir-1.0 mkdir
$(PREFIX)\share\gir-1.0
+ @if not exist $(PREFIX)\include\cogl\cogl mkdir $(PREFIX)\include\cogl\cogl
+ @if not exist $(PREFIX)\include\cogl\cogl\deprecated mkdir $(PREFIX)\include\cogl\cogl\deprecated
+ @if not exist $(PREFIX)\include\cogl\cogl\gl-prototypes mkdir
$(PREFIX)\include\cogl\cogl\gl-prototypes
+ @if not exist $(PREFIX)\include\cogl\cogl-path mkdir $(PREFIX)\include\cogl\cogl-path
+ @if exist $(COGL_PANGO_DLL) if not exist $(PREFIX)\include\cogl\cogl-pango mkdir
$(PREFIX)\include\cogl\cogl-pango
+ @if exist $(COGL_GST_DLL) if not exist $(PREFIX)\include\cogl\cogl-gst mkdir
$(PREFIX)\include\cogl\cogl-gst
+ @copy /b /y $(COGL_DLL) $(PREFIX)\bin
+ @copy /b /y $(COGL_DLL:.dll=.pdb) $(PREFIX)\bin
+ @copy /b /y $(COGL_LIB) $(PREFIX)\lib
+ @copy /b /y $(COGL_PATH_DLL) $(PREFIX)\bin
+ @copy /b /y $(COGL_PATH_DLL:.dll=.pdb) $(PREFIX)\bin
+ @copy /b /y $(COGL_PATH_LIB) $(PREFIX)\lib
+ @if exist $(COGL_PANGO_DLL) copy /b /y $(COGL_PANGO_DLL) $(PREFIX)\bin
+ @if exist $(COGL_PANGO_DLL) copy /b /y $(COGL_PANGO_DLL:.dll=.pdb) $(PREFIX)\bin
+ @if exist $(COGL_PANGO_LIB) copy /b /y $(COGL_PANGO_LIB) $(PREFIX)\lib
+ @if exist $(COGL_GST_DLL) copy /b /y $(COGL_GST_DLL) $(PREFIX)\bin
+ @if exist $(COGL_GST_DLL) copy /b /y $(COGL_GST_DLL:.dll=.pdb) $(PREFIX)\bin
+ @if exist $(COGL_GST_LIB) copy /b /y $(COGL_GST_LIB) $(PREFIX)\lib
+ @if not "$(COGL_INTROSPECTION_TYPELIBS)" == "" for %%f in
($(COGL_INTROSPECTION_TYPELIBS:.typelib=.gir)) do @copy /y %%f $(PREFIX)\share\gir-1.0
+ @if not "$(COGL_INTROSPECTION_TYPELIBS)" == "" for %%f in ($(COGL_INTROSPECTION_TYPELIBS)) do @copy
/b /y %%f $(PREFIX)\lib\girepository-1.0
+ @for %%f in ($(COGL_EXAMPLE_PROGS)) do @copy /b /y %%f $(PREFIX)\bin
+ @for %%f in ($(COGL_EXAMPLE_PROGS:.exe=.pdb)) do @copy /b /y %%f $(PREFIX)\bin
+ @-if exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-crate.exe mkdir $(PREFIX)\share\cogl\examples-data
+ @if exist vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-crate.exe copy /b ..\..\examples\crate.jpg
$(PREFIX)\share\cogl\examples-data
+ @if exist $(COGL_GST_PLUGIN) for %%f in ($(COGL_GST_PLUGIN)) do @copy /b /y %%f
$(PREFIX)\lib\gstreamer-1.0
+ @if exist $(COGL_GST_PLUGIN) for %%f in ($(COGL_GST_PLUGIN:.dll=.pdb)) do @copy /b /y %%f
$(PREFIX)\lib\gstreamer-1.0
+ @for %%f in ($(cogl1_HDRS:..\..\=) $(cogl_public_HDRS:..\..\=) $(cogl2_HDRS:..\..\=)
$(cogl_gl_prototype_HDRS:..\..\=)) do @copy /y ..\..\%%f $(PREFIX)\include\cogl\%%f
+ @for %%f in (cogl-defines.h cogl-enum-types.h) do @copy /y vs$(PDBVER)\$(CFG)\$(PLAT)\cogl\%%f
$(PREFIX)\include\cogl\cogl
+ @for %%f in ($(cogl_path_actual_hdrs:..\..\=)) do @copy /y ..\..\%%f $(PREFIX)\include\cogl\%%f
+ @for %%f in (vs$(PDBVER)\$(CFG)\$(PLAT)\cogl-path\cogl-path-enum-types.h) do @copy /y %%f
$(PREFIX)\include\cogl\cogl-path
+ @if exist $(COGL_PANGO_DLL) for %%f in ($(cogl_pango_real_hdrs:..\..\=)) do @copy /b /y ..\..\%%f
$(PREFIX)\include\cogl\%%f
+ @if exist $(COGL_GST_DLL) for %%f in ($(cogl_gst_real_hdrs:..\..\=)) do @copy /b /y ..\..\%%f
$(PREFIX)\include\cogl\%%f
diff --git a/configure.ac b/configure.ac
index 12798e9f..ac7f8854 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1490,6 +1490,7 @@ Makefile
README
config.h.win32
build/Makefile
+build/nmake/Makefile
build/win32/Makefile
build/win32/vs9/Makefile
build/win32/vs10/Makefile
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]