+APP_ICONS = \
+src/ui/gui/icons/16x16/apps/org.gnu.pspp.png \
+src/ui/gui/icons/32x32/apps/org.gnu.pspp.png \
+src/ui/gui/icons/48x48/apps/org.gnu.pspp.png \
+src/ui/gui/icons/256x256/apps/org.gnu.pspp.png \
+src/ui/gui/icons/scalable/apps/org.gnu.pspp.svg
+
+CATEGORY_ICONS = \
+src/ui/gui/icons/48x48/categories/align-left.png \
+src/ui/gui/icons/48x48/categories/align-center.png \
+src/ui/gui/icons/48x48/categories/align-right.png \
+src/ui/gui/icons/48x48/categories/measure-scale.png \
+src/ui/gui/icons/48x48/categories/measure-ordinal.png \
+src/ui/gui/icons/48x48/categories/measure-nominal.png \
+src/ui/gui/icons/48x48/categories/measure-date-scale.png \
+src/ui/gui/icons/48x48/categories/measure-date-nominal.png \
+src/ui/gui/icons/48x48/categories/measure-date-ordinal.png \
+src/ui/gui/icons/48x48/categories/measure-time-scale.png \
+src/ui/gui/icons/48x48/categories/measure-time-nominal.png \
+src/ui/gui/icons/48x48/categories/measure-time-ordinal.png \
+src/ui/gui/icons/48x48/categories/measure-string-nominal.png \
+src/ui/gui/icons/48x48/categories/measure-string-ordinal.png \
+src/ui/gui/icons/48x48/categories/measure-currency-scale.png \
+src/ui/gui/icons/48x48/categories/measure-currency-nominal.png \
+src/ui/gui/icons/48x48/categories/measure-currency-ordinal.png \
+src/ui/gui/icons/48x48/categories/role-input.png \
+src/ui/gui/icons/48x48/categories/role-target.png \
+src/ui/gui/icons/48x48/categories/role-both.png \
+src/ui/gui/icons/48x48/categories/role-none.png \
+src/ui/gui/icons/48x48/categories/role-partition.png \
+src/ui/gui/icons/48x48/categories/role-split.png \
+src/ui/gui/icons/scalable/categories/align-left.svg \
+src/ui/gui/icons/scalable/categories/align-center.svg \
+src/ui/gui/icons/scalable/categories/align-right.svg \
+src/ui/gui/icons/scalable/categories/measure-scale.svg \
+src/ui/gui/icons/scalable/categories/measure-ordinal.svg \
+src/ui/gui/icons/scalable/categories/measure-nominal.svg \
+src/ui/gui/icons/scalable/categories/measure-date-scale.svg \
+src/ui/gui/icons/scalable/categories/measure-date-nominal.svg \
+src/ui/gui/icons/scalable/categories/measure-date-ordinal.svg \
+src/ui/gui/icons/scalable/categories/measure-time-scale.svg \
+src/ui/gui/icons/scalable/categories/measure-time-nominal.svg \
+src/ui/gui/icons/scalable/categories/measure-time-ordinal.svg \
+src/ui/gui/icons/scalable/categories/measure-string-nominal.svg \
+src/ui/gui/icons/scalable/categories/measure-string-ordinal.svg \
+src/ui/gui/icons/scalable/categories/measure-currency-scale.svg \
+src/ui/gui/icons/scalable/categories/measure-currency-nominal.svg \
+src/ui/gui/icons/scalable/categories/measure-currency-ordinal.svg \
+src/ui/gui/icons/scalable/categories/role-input.svg \
+src/ui/gui/icons/scalable/categories/role-target.svg \
+src/ui/gui/icons/scalable/categories/role-both.svg \
+src/ui/gui/icons/scalable/categories/role-none.svg \
+src/ui/gui/icons/scalable/categories/role-partition.svg \
+src/ui/gui/icons/scalable/categories/role-split.svg
+
+# Mimetype icons have size dependent layouts
+MIMETYPE_ICONS = \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/16x16/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/22x22/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/24x24/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/32x32/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/48x48/mimetypes/application-x-spss-zsav.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-por.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-sav.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-sps.png \
+src/ui/gui/icons/256x256/mimetypes/application-x-spss-zsav.png
+
+src/ui/gui/artwork/splash-t.svg: src/ui/gui/artwork/splash.svg
+ cp $< $@
+
+src/ui/gui/artwork/splash-r.svg: src/ui/gui/artwork/splash.svg
+ sed -e '/inkscape:label="Overlay"/s/inline/none/' $< > $@
+
+MISC_ICONS = src/ui/gui/icons/splash-t.png \
+ src/ui/gui/icons/splash-r.png
+
+ACTION_ICONS = \
+src/ui/gui/icons/24x24/actions/pspp-file-open-data.png \
+src/ui/gui/icons/24x24/actions/pspp-file-save-data.png \
+src/ui/gui/icons/24x24/actions/pspp-edit-go-to-variable.png \
+src/ui/gui/icons/24x24/actions/pspp-edit-go-to-case.png \
+src/ui/gui/icons/24x24/actions/pspp-edit-find.png \
+src/ui/gui/icons/24x24/actions/pspp-edit-insert-case.png \
+src/ui/gui/icons/24x24/actions/pspp-edit-insert-variable.png \
+src/ui/gui/icons/24x24/actions/pspp-data-split-file.png \
+src/ui/gui/icons/24x24/actions/pspp-data-weight-cases.png \
+src/ui/gui/icons/24x24/actions/pspp-view-value-labels.png \
+src/ui/gui/icons/48x48/actions/pspp-file-open-data.png \
+src/ui/gui/icons/48x48/actions/pspp-file-save-data.png \
+src/ui/gui/icons/48x48/actions/pspp-edit-go-to-variable.png \
+src/ui/gui/icons/48x48/actions/pspp-edit-go-to-case.png \
+src/ui/gui/icons/48x48/actions/pspp-edit-find.png \
+src/ui/gui/icons/48x48/actions/pspp-edit-insert-case.png \
+src/ui/gui/icons/48x48/actions/pspp-edit-insert-variable.png \
+src/ui/gui/icons/48x48/actions/pspp-data-split-file.png \
+src/ui/gui/icons/48x48/actions/pspp-data-weight-cases.png \
+src/ui/gui/icons/48x48/actions/pspp-view-value-labels.png \
+src/ui/gui/icons/96x96/actions/pspp-file-open-data.png \
+src/ui/gui/icons/96x96/actions/pspp-file-save-data.png \
+src/ui/gui/icons/96x96/actions/pspp-edit-go-to-variable.png \
+src/ui/gui/icons/96x96/actions/pspp-edit-go-to-case.png \
+src/ui/gui/icons/96x96/actions/pspp-edit-find.png \
+src/ui/gui/icons/96x96/actions/pspp-edit-insert-case.png \
+src/ui/gui/icons/96x96/actions/pspp-edit-insert-variable.png \
+src/ui/gui/icons/96x96/actions/pspp-data-split-file.png \
+src/ui/gui/icons/96x96/actions/pspp-data-weight-cases.png \
+src/ui/gui/icons/96x96/actions/pspp-view-value-labels.png \
+src/ui/gui/icons/scalable/actions/pspp-file-open-data.svg \
+src/ui/gui/icons/scalable/actions/pspp-file-save-data.svg \
+src/ui/gui/icons/scalable/actions/pspp-edit-go-to-variable.svg \
+src/ui/gui/icons/scalable/actions/pspp-edit-go-to-case.svg \
+src/ui/gui/icons/scalable/actions/pspp-edit-find.svg \
+src/ui/gui/icons/scalable/actions/pspp-edit-insert-case.svg \
+src/ui/gui/icons/scalable/actions/pspp-edit-insert-variable.svg \
+src/ui/gui/icons/scalable/actions/pspp-data-split-file.svg \
+src/ui/gui/icons/scalable/actions/pspp-data-weight-cases.svg \
+src/ui/gui/icons/scalable/actions/pspp-view-value-labels.svg
+
+ICONS=$(CATEGORY_ICONS) $(ACTION_ICONS) $(MIMETYPE_ICONS) $(APP_ICONS) $(MISC_ICONS)
+
+ICON_SOURCES = $(wildcard src/ui/gui/artwork/*/*/*.svg)
+ICON_SOURCES += $(wildcard src/ui/gui/artwork/splash*.svg)
+
+everything: prep_ph icons