Mercurial > hg > syntilista
comparison Makefile.gen @ 275:d1f34cbc306e
Improve logo/icons intermediate building process.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 04 Apr 2023 12:03:38 +0300 |
parents | 19f4b2c31f39 |
children | 770d1ea07a49 |
comparison
equal
deleted
inserted
replaced
274:19f4b2c31f39 | 275:d1f34cbc306e |
---|---|
62 resources.o \ | 62 resources.o \ |
63 moc_main.o \ | 63 moc_main.o \ |
64 runguard.o | 64 runguard.o |
65 | 65 |
66 LOGO_SVG ?= kampuscafe4.svg | 66 LOGO_SVG ?= kampuscafe4.svg |
67 LOGO_IMG ?= CafeKampus_logo_FINAL_RGB.png | 67 LOGO_SRC_PNG ?= CafeKampus_logo_FINAL_RGB.png |
68 | |
68 ICON_PNGS = icon-64.png icon-48.png icon-32.png icon-16.png | 69 ICON_PNGS = icon-64.png icon-48.png icon-32.png icon-16.png |
70 LOGO_PNG = logo.png | |
69 | 71 |
70 APP_RESOURCES += $(addprefix $(APP_IMG),logo.png $(ICON_PNGS)) COPYING.html | 72 APP_RESOURCES += $(addprefix $(APP_IMG),$(LOGO_PNG) $(ICON_PNGS)) \ |
73 COPYING.html | |
74 | |
75 DISTCLEAN_TARGETS += $(addprefix $(APP_IMG),$(LOGO_PNG) $(ICON_PNGS)) | |
76 | |
71 | 77 |
72 # And target lists | 78 # And target lists |
73 TARGETS = $(APP_BIN) | 79 TARGETS = $(APP_BIN) |
74 NOBUILD_TARGETS += | 80 NOBUILD_TARGETS += |
75 NOINST_TARGETS += | 81 NOINST_TARGETS += |
152 | 158 |
153 | 159 |
154 ### | 160 ### |
155 ### Application rules | 161 ### Application rules |
156 ### | 162 ### |
157 #$(APP_IMG)icon-%.png: $(APP_IMG)$(LOGO_SVG) | 163 ifneq ($(LOGO_SRC_SVG),) |
158 # inkscape --export-area-page -w $(patsubst $(APP_IMG)icon-%.png,%,$@) -h $(patsubst $(APP_IMG)icon-%.png,%,$@) -e "$@" "$<" | 164 $(APP_IMG)icon-%.png: $(APP_IMG)$(LOGO_SRC_SVG) |
165 inkscape --export-area-page --export-type=png -w $(patsubst $(APP_IMG)icon-%.png,%,$@) -h $(patsubst $(APP_IMG)icon-%.png,%,$@) --export-filename="$@" "$<" | |
159 | 166 |
160 #$(APP_IMG)logo.png: $(APP_IMG)$(LOGO_SVG) | 167 $(APP_IMG)$(LOGO_PNG): $(APP_IMG)$(LOGO_SRC_SVG) |
161 # inkscape --export-area-page -w 258 -h 220 -e "$@" "$<" | 168 inkscape --export-area-page --export-type=png -w 256 -h 256 --export-filename="$@" "$<" |
162 | 169 else |
163 $(APP_IMG)icon-%.png: $(APP_IMG)$(LOGO_IMG) | 170 $(APP_IMG)icon-%.png: $(APP_IMG)$(LOGO_SRC_PNG) |
164 convert "$<" -scale "$(patsubst $(APP_IMG)icon-%.png,%,$@)x$(patsubst $(APP_IMG)icon-%.png,%,$@)" "$@" | 171 convert "$<" -scale "$(patsubst $(APP_IMG)icon-%.png,%,$@)x$(patsubst $(APP_IMG)icon-%.png,%,$@)" "$@" |
165 | 172 |
166 $(APP_IMG)logo.png: $(APP_IMG)$(LOGO_IMG) | 173 $(APP_IMG)$(LOGO_PNG): $(APP_IMG)$(LOGO_SRC_PNG) |
167 convert "$<" -scale "258x220" "$@" | 174 convert "$<" -scale "256x256" "$@" |
175 endif | |
168 | 176 |
169 icon.ico: $(addprefix $(APP_IMG),$(ICON_PNGS)) | 177 icon.ico: $(addprefix $(APP_IMG),$(ICON_PNGS)) |
170 @$(call DO_CMD,CONVERT,$+ -> $@,convert $+ $@) | 178 @$(call DO_CMD,CONVERT,$+ -> $@,convert $+ $@) |
171 | 179 |
172 src/%.cpp: src/%.qrc $(APP_RESOURCES) | 180 src/%.cpp: src/%.qrc $(APP_RESOURCES) |