# 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. !include config-msvc.mak !include create-lists-msvc.mak # Copy the pre-defined gdkconfig.h.[win32|win32_broadway] !if "$(CFG)" == "release" || "$(CFG)" == "Release" GDK_OLD_CFG = debug !else GDK_OLD_CFG = release !endif !ifdef BROADWAY GDK_CONFIG = broadway GDK_DEL_CONFIG = win32 GDK_CONFIG_TEMPLATE = ..\..\gdk\gdkconfig.h.win32_broadway !else GDK_CONFIG = win32 GDK_DEL_CONFIG = broadway GDK_CONFIG_TEMPLATE = ..\..\gdk\gdkconfig.h.win32 !endif GDK_MARSHALERS_FLAGS = --prefix=_gdk_marshal --valist-marshallers GDK_RESOURCES_ARGS = ..\..\gdk\gdk.gresource.xml --target=$@ --sourcedir=..\..\gdk --c-name _gdk --manual-register GTK_MARSHALERS_FLAGS = --prefix=_gtk_marshal --valist-marshallers GTK_RESOURCES_ARGS = ..\..\gtk\gtk.gresource.xml --target=$@ --sourcedir=..\..\gtk --c-name _gtk --manual-register all: \ ..\..\config.h \ ..\..\gdk\gdkconfig.h \ ..\..\gdk\gdkversionmacros.h \ ..\..\gdk\gdkmarshalers.h \ ..\..\gdk\gdkmarshalers.c \ ..\..\gdk\gdkresources.h \ ..\..\gdk\gdkresources.c \ ..\..\gtk\gtk-win32.rc \ ..\..\gtk\libgtk3.manifest \ ..\..\gtk\gtkdbusgenerated.h \ ..\..\gtk\gtkdbusgenerated.c \ ..\..\gtk\gtktypefuncs.inc \ ..\..\gtk\gtk.gresource.xml \ ..\..\gtk\gtkmarshalers.h \ ..\..\gtk\gtkmarshalers.c \ ..\..\gtk\gtkresources.h \ ..\..\gtk\gtkresources.c \ ..\..\demos\gtk-demo\demos.h \ ..\..\demos\gtk-demo\demo_resources.c \ ..\..\demos\icon-browser\resources.c # Copy the pre-defined config.h.win32 and demos.h.win32 ..\..\config.h: ..\..\config.h.win32 ..\..\demos\gtk-demo\demos.h: ..\..\demos\gtk-demo\demos.h.win32 ..\..\gtk\gtk-win32.rc: ..\..\gtk\gtk-win32.rc.body ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build: $(GDK_CONFIG_TEMPLATE) @if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build @if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build @if exist ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build @copy $** $@ ..\..\gdk\gdkconfig.h: ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build ..\..\config.h \ ..\..\gdk\gdkconfig.h \ ..\..\gtk\gtk-win32.rc \ ..\..\demos\gtk-demo\demos.h: @echo Copying $@... @copy $** $@ ..\..\gdk\gdkversionmacros.h: ..\..\gdk\gdkversionmacros.h.in @echo Generating $@... @$(PYTHON) gen-gdkversionmacros-h.py --version=$(GTK_VERSION) ..\..\gdk\gdkmarshalers.h: ..\..\gdk\gdkmarshalers.list @echo Generating $@... @$(PYTHON) $(GLIB_GENMARSHAL) $(GDK_MARSHALERS_FLAGS) --header $** > $@.tmp @move $@.tmp $@ ..\..\gdk\gdkmarshalers.c: ..\..\gdk\gdkmarshalers.list @echo Generating $@... @$(PYTHON) $(GLIB_GENMARSHAL) $(GDK_MARSHALERS_FLAGS) --body $** > $@.tmp @move $@.tmp $@ ..\..\gdk\gdk.gresource.xml: $(GDK_RESOURCES) @echo Generating $@... @echo ^ >$@ @echo ^ >> $@ @echo ^ >> $@ @for %%f in (..\..\gdk\resources\glsl\*.glsl) do @echo ^resources/glsl/%%~nxf^ >> $@ @echo ^ >> $@ @echo ^ >> $@ ..\..\gdk\gdkresources.h: ..\..\gdk\gdk.gresource.xml @echo Generating $@... @if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT) @if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT) @if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA) @$(GLIB_COMPILE_RESOURCES) $(GDK_RESOURCES_ARGS) --generate-header ..\..\gdk\gdkresources.c: ..\..\gdk\gdk.gresource.xml $(GDK_RESOURCES) @echo Generating $@... @if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT) @if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT) @if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA) @$(GLIB_COMPILE_RESOURCES) $(GDK_RESOURCES_ARGS) --generate-source ..\..\gtk\libgtk3.manifest: ..\..\gtk\libgtk3.manifest.in @echo Generating $@... @$(PYTHON) replace.py \ --action=replace-var \ --input=$** --output=$@ \ --var=EXE_MANIFEST_ARCHITECTURE \ --outstring=* ..\..\gtk\gtkdbusgenerated.h ..\..\gtk\gtkdbusgenerated.c: ..\..\gtk\gtkdbusinterfaces.xml @echo Generating GTK DBus sources... @$(PYTHON) $(PREFIX)\bin\gdbus-codegen \ --interface-prefix org.Gtk. --c-namespace _Gtk \ --generate-c-code gtkdbusgenerated $** \ --output-directory $(@D) ..\..\gtk\gtktypefuncs.inc: ..\..\gtk\gentypefuncs.py @echo Generating $@... @echo #undef GTK_COMPILATION > $(@R).preproc.c @echo #include "gtkx.h" >> $(@R).preproc.c @cl /EP $(GTK_PREPROCESSOR_FLAGS) $(@R).preproc.c > $(@R).combined.c @$(PYTHON) $** $@ $(@R).combined.c @del $(@R).preproc.c $(@R).combined.c ..\..\gtk\gtk.gresource.xml: $(GTK_RESOURCES) @echo Generating $@... @echo ^> $@ @echo ^>> $@ @echo ^>> $@ @echo ^theme/Adwaita/gtk.css^>> $@ @echo ^theme/Adwaita/gtk-dark.css^>> $@ @echo ^theme/Adwaita/gtk-contained.css^>> $@ @echo ^theme/Adwaita/gtk-contained-dark.css^>> $@ @for %%f in (..\..\gtk\theme\Adwaita\assets\*.png) do @echo ^theme/Adwaita/assets/%%~nxf^>> $@ @for %%f in (..\..\gtk\theme\Adwaita\assets\*.svg) do @echo ^theme/Adwaita/assets/%%~nxf^>> $@ @echo ^theme/HighContrast/gtk.css^>> $@ @echo ^theme/HighContrast/gtk-inverse.css^>> $@ @echo ^theme/HighContrast/gtk-contained.css^>> $@ @echo ^theme/HighContrast/gtk-contained-inverse.css^>> $@ @for %%f in (..\..\gtk\theme\HighContrast\assets\*.png) do @echo ^theme/HighContrast/assets/%%~nxf^>> $@ @for %%f in (..\..\gtk\theme\HighContrast\assets\*.svg) do @echo ^theme/HighContrast/assets/%%~nxf^>> $@ @echo ^theme/win32/gtk-win32-base.css^>> $@ @echo ^theme/win32/gtk.css^>> $@ @for %%f in (..\..\gtk\cursor\*.png) do @echo ^cursor/%%~nxf^>> $@ @for %%f in (..\..\gtk\gesture\*.symbolic.png) do @echo ^gesture/%%~nxf^>> $@ @for %%f in (..\..\gtk\ui\*.ui) do @echo ^ui/%%~nxf^>> $@ @for %%s in (16 22 24 32 48) do @(for %%c in (actions status categories) do @(for %%f in (..\..\gtk\icons\%%sx%%s\%%c\*.png) do @echo ^icons/%%sx%%s/%%c/%%~nxf^>> $@)) @for %%s in (scalable) do @(for %%c in (status) do @(for %%f in (..\..\gtk\icons\%%s\%%c\*.svg) do @echo ^icons/%%s/%%c/%%~nxf^>> $@)) @for %%f in (..\..\gtk\inspector\*.ui) do @echo ^inspector/%%~nxf^>> $@ @echo ^inspector/logo.png^>> $@ @echo ^emoji/emoji.data^>> $@ @echo ^>> $@ @echo ^>> $@ ..\..\gtk\gtkresources.h: ..\..\gtk\gtk.gresource.xml @echo Generating $@... @if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT) @if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT) @if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA) @$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-header ..\..\gtk\gtkresources.c: ..\..\gtk\gtk.gresource.xml $(GTK_RESOURCES) @echo Generating $@... @if not "$(XMLLINT)" == "" set XMLLINT=$(XMLLINT) @if not "$(JSON_GLIB_FORMAT)" == "" set JSON_GLIB_FORMAT=$(JSON_GLIB_FORMAT) @if not "$(GDK_PIXBUF_PIXDATA)" == "" set GDK_PIXBUF_PIXDATA=$(GDK_PIXBUF_PIXDATA) @$(GLIB_COMPILE_RESOURCES) $(GTK_RESOURCES_ARGS) --generate-source ..\..\gtk\gtkmarshalers.h: ..\..\gtk\gtkmarshalers.list @echo Generating $@... @$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --header $** > $@.tmp @move $@.tmp $@ ..\..\gtk\gtkmarshalers.c: ..\..\gtk\gtkmarshalers.list @echo Generating $@... @echo #undef G_ENABLE_DEBUG> $@.tmp @$(PYTHON) $(GLIB_GENMARSHAL) $(GTK_MARSHALERS_FLAGS) --body $** >> $@.tmp @move $@.tmp $@ ..\..\demos\gtk-demo\demo_resources.c: ..\..\demos\gtk-demo\demo.gresource.xml $(GTK_DEMO_RESOURCES) @echo Generating $@... @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\demo.gresource.xml ..\..\demos\icon-browser\resources.c: ..\..\demos\icon-browser\iconbrowser.gresource.xml $(ICON_BROWSER_RESOURCES) @echo Generating $@... @$(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(@D) --generate-source $(@D)\iconbrowser.gresource.xml # Remove the generated files clean: @-del /f /q ..\..\demos\icon-browser\resources.c @-del /f /q ..\..\demos\gtk-demo\demo_resources.c @-del /f /q ..\..\demos\gtk-demo\demos.h @-del /f /q ..\..\gtk\gtkresources.c @-del /f /q ..\..\gtk\gtkresources.h @-del /f /q ..\..\gtk\gtkmarshalers.c @-del /f /q ..\..\gtk\gtkmarshalers.h @-del /f /q ..\..\gtk\gtk.gresource.xml @-del /f /q ..\..\gtk\gtktypefuncs.inc @-del /f /q ..\..\gtk\gtkdbusgenerated.c @-del /f /q ..\..\gtk\gtkdbusgenerated.h @-del /f /q ..\..\gtk\libgtk3.manifest @-del /f /q ..\..\gtk\gtk-win32.rc @-del /f /q ..\..\gdk\gdkresources.c @-del /f /q ..\..\gdk\gdkresources.h @-del /f /q ..\..\gdk\gdk.gresource.xml @-del /f /q ..\..\gdk\gdkmarshalers.c @-del /f /q ..\..\gdk\gdkmarshalers.h @-del /f /q ..\..\gdk\gdkversionmacros.h @-del /f /q ..\..\gdk\gdkconfig.h @if exist ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_CONFIG)-build @if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_DEL_CONFIG)-build @if exist ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build del ..\..\gdk-$(GDK_OLD_CFG)-$(GDK_CONFIG)-build @if exist ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build del ..\..\gdk-$(CFG)-$(GDK_DEL_CONFIG)-build @-del /f /q ..\..\config.h