2020-07-16 09:11:19 +00:00
# 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.
! i n c l u d e c o n f i g - m s v c . m a k
! i n c l u d e c r e a t e - l i s t s - m s v c . m a k
# Copy the pre-defined gdkconfig.h.[win32|win32_broadway]
! i f "$(CFG)" = = "release" | | "$(CFG)" = = "Release"
GDK_OLD_CFG = debug
! e l s e
GDK_OLD_CFG = release
! e n d i f
! i f d e f B R O A D W A Y
GDK_CONFIG = broadway
GDK_DEL_CONFIG = win32
GDK_CONFIG_TEMPLATE = ..\g dk\g dkconfig.h.win32_broadway
! e l s e
GDK_CONFIG = win32
GDK_DEL_CONFIG = broadway
GDK_CONFIG_TEMPLATE = ..\g dk\g dkconfig.h.win32
! e n d i f
GDK_MARSHALERS_FLAGS = --prefix= _gdk_marshal --valist-marshallers
GDK_RESOURCES_ARGS = ..\g dk\g dk.gresource.xml --target= $@ --sourcedir= ..\g dk --c-name _gdk --manual-register
GTK_MARSHALERS_FLAGS = --prefix= _gtk_marshal --valist-marshallers
GTK_RESOURCES_ARGS = ..\g tk\g tk.gresource.xml --target= $@ --sourcedir= ..\g tk --c-name _gtk --manual-register
all : \
..\c onfig.h \
..\g dk\g dkconfig.h \
..\g dk\g dkversionmacros.h \
..\g dk\g dkmarshalers.h \
..\g dk\g dkmarshalers.c \
..\g dk\g dkresources.h \
..\g dk\g dkresources.c \
..\g tk\g tk-win32.rc \
..\g tk\l ibgtk3.manifest \
..\g tk\g tkdbusgenerated.h \
..\g tk\g tkdbusgenerated.c \
..\g tk\g tktypefuncs.inc \
..\g tk\g tk.gresource.xml \
..\g tk\g tkmarshalers.h \
..\g tk\g tkmarshalers.c \
..\g tk\g tkresources.h \
..\g tk\g tkresources.c \
..\d emos\g tk-demo\d emos.h \
..\d emos\g tk-demo\d emo_resources.c \
..\d emos\i con-browser\r esources.c
# Copy the pre-defined config.h.win32 and demos.h.win32
..\config.h : ..\config .h .win 32
..\demos\gtk-demo\demos.h : ..\demos \gtk -demo \demos .h .win 32
..\gtk\gtk-win32.rc : ..\gtk \gtk -win 32.rc .body
..\gdk-$(CFG)-$(GDK_CONFIG)-build : $( GDK_CONFIG_TEMPLATE )
@if exist ..\g dk-$( GDK_OLD_CFG) -$( GDK_DEL_CONFIG) -build del ..\g dk-$( GDK_OLD_CFG) -$( GDK_DEL_CONFIG) -build
@if exist ..\g dk-$( GDK_OLD_CFG) -$( GDK_CONFIG) -build del ..\g dk-$( GDK_OLD_CFG) -$( GDK_CONFIG) -build
@if exist ..\g dk-$( CFG) -$( GDK_DEL_CONFIG) -build del ..\g dk-$( CFG) -$( GDK_DEL_CONFIG) -build
@copy $* * $@
..\gdk\gdkconfig.h : ..\gdk -$( CFG ) -$( GDK_CONFIG ) -build
. . \ c o n f i g . h \
. . \ g d k \ g d k c o n f i g . h \
. . \ g t k \ g t k - w i n 3 2 . r c \
..\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 ^<?xml version = '1.0' encoding = 'UTF-8' ?^> >$@
@echo ^<gresources^> >> $@
@echo ^<gresource prefix = '/org/gtk/libgdk' ^> >> $@
@for %%f in ( ..\g dk\r esources\g lsl\* .glsl) do @echo ^<file alias = 'glsl/%%~nxf' ^>resources/glsl/%%~nxf^</file^> >> $@
@echo ^</gresource^> >> $@
@echo ^</gresources^> >> $@
..\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)
2020-07-25 03:57:04 +00:00
@start /min $( GLIB_COMPILE_RESOURCES) $( GDK_RESOURCES_ARGS) --generate-header
2020-07-16 09:11:19 +00:00
..\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)
2020-07-25 03:57:04 +00:00
@start /min $( GLIB_COMPILE_RESOURCES) $( GDK_RESOURCES_ARGS) --generate-source
2020-07-16 09:11:19 +00:00
..\gtk\libgtk3.manifest : ..\gtk \libgtk 3.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) \b in\g dbus-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 ^<?xml version = '1.0' encoding = 'UTF-8' ?^>> $@
@echo ^<gresources^>>> $@
@echo ^<gresource prefix = '/org/gtk/libgtk' ^>>> $@
@echo ^<file^>theme/Adwaita/gtk.css^</file^>>> $@
@echo ^<file^>theme/Adwaita/gtk-dark.css^</file^>>> $@
@echo ^<file^>theme/Adwaita/gtk-contained.css^</file^>>> $@
@echo ^<file^>theme/Adwaita/gtk-contained-dark.css^</file^>>> $@
@for %%f in ( ..\g tk\t heme\A dwaita\a ssets\* .png) do @echo ^<file preprocess = 'to-pixdata' ^>theme/Adwaita/assets/%%~nxf^</file^>>> $@
@for %%f in ( ..\g tk\t heme\A dwaita\a ssets\* .svg) do @echo ^<file^>theme/Adwaita/assets/%%~nxf^</file^>>> $@
@echo ^<file^>theme/HighContrast/gtk.css^</file^>>> $@
@echo ^<file alias = 'theme/HighContrastInverse/gtk.css' ^>theme/HighContrast/gtk-inverse.css^</file^>>> $@
@echo ^<file^>theme/HighContrast/gtk-contained.css^</file^>>> $@
@echo ^<file^>theme/HighContrast/gtk-contained-inverse.css^</file^>>> $@
@for %%f in ( ..\g tk\t heme\H ighContrast\a ssets\* .png) do @echo ^<file preprocess = 'to-pixdata' ^>theme/HighContrast/assets/%%~nxf^</file^>>> $@
@for %%f in ( ..\g tk\t heme\H ighContrast\a ssets\* .svg) do @echo ^<file^>theme/HighContrast/assets/%%~nxf^</file^>>> $@
@echo ^<file^>theme/win32/gtk-win32-base.css^</file^>>> $@
@echo ^<file^>theme/win32/gtk.css^</file^>>> $@
@for %%f in ( ..\g tk\c ursor\* .png) do @echo ^<file^>cursor/%%~nxf^</file^>>> $@
@for %%f in ( ..\g tk\g esture\* .symbolic.png) do @echo ^<file alias = 'icons/64x64/actions/%%~nxf' ^>gesture/%%~nxf^</file^>>> $@
@for %%f in ( ..\g tk\u i\* .ui) do @echo ^<file preprocess = 'xml-stripblanks' ^>ui/%%~nxf^</file^>>> $@
@for %%s in ( 16 22 24 32 48) do @( for %%c in ( actions status categories) do @( for %%f in ( ..\g tk\i cons\% %sx%%s\% %c\* .png) do @echo ^<file^>icons/%%sx%%s/%%c/%%~nxf^</file^>>> $@ ) )
@for %%s in ( scalable) do @( for %%c in ( status) do @( for %%f in ( ..\g tk\i cons\% %s\% %c\* .svg) do @echo ^<file^>icons/%%s/%%c/%%~nxf^</file^>>> $@ ) )
@for %%f in ( ..\g tk\i nspector\* .ui) do @echo ^<file compressed = 'true' preprocess = 'xml-stripblanks' ^>inspector/%%~nxf^</file^>>> $@
@echo ^<file^>inspector/logo.png^</file^>>> $@
@echo ^<file^>emoji/emoji.data^</file^>>> $@
@echo ^</gresource^>>> $@
@echo ^</gresources^>>> $@
..\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)
2020-07-25 03:57:04 +00:00
@start /min $( GLIB_COMPILE_RESOURCES) $( GTK_RESOURCES_ARGS) --generate-header
2020-07-16 09:11:19 +00:00
..\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)
2020-07-25 03:57:04 +00:00
@start /min $( GLIB_COMPILE_RESOURCES) $( GTK_RESOURCES_ARGS) --generate-source
2020-07-16 09:11:19 +00:00
..\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) \d emo.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) \i conbrowser.gresource.xml
# Remove the generated files
clean :
@-del /f /q ..\d emos\i con-browser\r esources.c
@-del /f /q ..\d emos\g tk-demo\d emo_resources.c
@-del /f /q ..\d emos\g tk-demo\d emos.h
@-del /f /q ..\g tk\g tkresources.c
@-del /f /q ..\g tk\g tkresources.h
@-del /f /q ..\g tk\g tkmarshalers.c
@-del /f /q ..\g tk\g tkmarshalers.h
@-del /f /q ..\g tk\g tk.gresource.xml
@-del /f /q ..\g tk\g tktypefuncs.inc
@-del /f /q ..\g tk\g tkdbusgenerated.c
@-del /f /q ..\g tk\g tkdbusgenerated.h
@-del /f /q ..\g tk\l ibgtk3.manifest
@-del /f /q ..\g tk\g tk-win32.rc
@-del /f /q ..\g dk\g dkresources.c
@-del /f /q ..\g dk\g dkresources.h
@-del /f /q ..\g dk\g dk.gresource.xml
@-del /f /q ..\g dk\g dkmarshalers.c
@-del /f /q ..\g dk\g dkmarshalers.h
@-del /f /q ..\g dk\g dkversionmacros.h
@-del /f /q ..\g dk\g dkconfig.h
@if exist ..\g dk-$( CFG) -$( GDK_CONFIG) -build del ..\g dk-$( CFG) -$( GDK_CONFIG) -build
@if exist ..\g dk-$( GDK_OLD_CFG) -$( GDK_DEL_CONFIG) -build del ..\g dk-$( GDK_OLD_CFG) -$( GDK_DEL_CONFIG) -build
@if exist ..\g dk-$( GDK_OLD_CFG) -$( GDK_CONFIG) -build del ..\g dk-$( GDK_OLD_CFG) -$( GDK_CONFIG) -build
@if exist ..\g dk-$( CFG) -$( GDK_DEL_CONFIG) -build del ..\g dk-$( CFG) -$( GDK_DEL_CONFIG) -build
@-del /f /q ..\c onfig.h