Artwork and logos for the Keyoxide project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 

91 lines
4.4 KiB

BUILD_DIR := ./build
FILES_IN := $(wildcard *.svg)
FILES_OUT_PNG_SQUARE_1X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.square.1x.png))
FILES_OUT_PNG_SQUARE_2X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.square.2x.png))
FILES_OUT_PNG_SQUARE_3X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.square.3x.png))
FILES_OUT_PNG_SQUARE := $(FILES_OUT_PNG_SQUARE_1X) $(FILES_OUT_PNG_SQUARE_2X) $(FILES_OUT_PNG_SQUARE_3X)
FILES_OUT_PNG_ROUNDED_1X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.rounded.1x.png))
FILES_OUT_PNG_ROUNDED_2X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.rounded.2x.png))
FILES_OUT_PNG_ROUNDED_3X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.rounded.3x.png))
FILES_OUT_PNG_ROUNDED := $(FILES_OUT_PNG_ROUNDED_1X) $(FILES_OUT_PNG_ROUNDED_2X) $(FILES_OUT_PNG_ROUNDED_3X)
FILES_OUT_PNG_CIRCLE_1X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.circle.1x.png))
FILES_OUT_PNG_CIRCLE_2X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.circle.2x.png))
FILES_OUT_PNG_CIRCLE_3X := $(addprefix $(BUILD_DIR)/, $(FILES_IN:.svg=.circle.3x.png))
FILES_OUT_PNG_CIRCLE := $(FILES_OUT_PNG_CIRCLE_1X) $(FILES_OUT_PNG_CIRCLE_2X) $(FILES_OUT_PNG_CIRCLE_3X)
FILES_OUT_PNG := $(FILES_OUT_PNG_SQUARE) $(FILES_OUT_PNG_ROUNDED) $(FILES_OUT_PNG_CIRCLE)
FILES_OUT := $(FILES_OUT_PNG)
.PHONY: all
all: $(FILES_OUT)
# PNG SQUARE 1X
$(BUILD_DIR)/%.square.1x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_square,logo_white; object-set-attribute:style, display:inline;" \
--export-width 64 --export-filename='$@' --export-type='png'
# PNG SQUARE 2X
$(BUILD_DIR)/%.square.2x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_square,logo_white; object-set-attribute:style, display:inline;" \
--export-width 512 --export-filename='$@' --export-type='png'
# PNG SQUARE 3X
$(BUILD_DIR)/%.square.3x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_square,logo_white; object-set-attribute:style, display:inline;" \
--export-width 2048 --export-filename='$@' --export-type='png'
# PNG ROUNDED 1X
$(BUILD_DIR)/%.rounded.1x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_rounded,logo_white; object-set-attribute:style, display:inline;" \
--export-width 64 --export-filename='$@' --export-type='png'
# PNG ROUNDED 2X
$(BUILD_DIR)/%.rounded.2x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_rounded,logo_white; object-set-attribute:style, display:inline;" \
--export-width 512 --export-filename='$@' --export-type='png'
# PNG ROUNDED 3X
$(BUILD_DIR)/%.rounded.3x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_rounded,logo_white; object-set-attribute:style, display:inline;" \
--export-width 2048 --export-filename='$@' --export-type='png'
# PNG CIRCLE 1X
$(BUILD_DIR)/%.circle.1x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_circle,logo_white; object-set-attribute:style, display:inline;" \
--export-width 64 --export-filename='$@' --export-type='png'
# PNG CIRCLE 2X
$(BUILD_DIR)/%.circle.2x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_circle,logo_white; object-set-attribute:style, display:inline;" \
--export-width 512 --export-filename='$@' --export-type='png'
# PNG CIRCLE 3X
$(BUILD_DIR)/%.circle.3x.png: %.svg | $(BUILD_DIR)
@echo "Generating $@"
@inkscape $< --actions "select-all:layers; object-set-attribute:style, display:none; select-clear; \
select-by-id:bg_color_circle,logo_white; object-set-attribute:style, display:inline;" \
--export-width 2048 --export-filename='$@' --export-type='png'
$(BUILD_DIR):
@mkdir -p $@