PROJECT = readability VERSION = 2.0.0 FILES = $(PROJECT)/main.qml FILES += $(PROJECT)/metadata.desktop FILES += LICENSE FILES += $(PROJECT)/data/Call.js FILES += $(PROJECT)/data/Readability.js FILES += $(PROJECT)/data/Toolbar.js FILES += $(PROJECT)/data/style.css FILES += $(PROJECT)/data/icon-dark.png FILES += $(PROJECT)/data/icon-light.png IMAGES = $(PROJECT)/images/RM-close-hover.png IMAGES += $(PROJECT)/images/RM-close.png IMAGES += $(PROJECT)/images/RM-Delete-24x24.png IMAGES += $(PROJECT)/images/RM-Minus-24x24.png IMAGES += $(PROJECT)/images/RM-Plus-24x24.png IMAGES += $(PROJECT)/images/RM-Type-Controls-24x24.png IMAGES += $(PROJECT)/images/RM-Type-Controls-Arrow.svg package: build zip -X $(PROJECT)_v$(VERSION).zip $(FILES) copy_styles: @cp "$(PROJECT)/data/style.orig.css" "$(PROJECT)/data/style.css" build: copy_styles $(foreach IMG,$(IMAGES), \ $(shell sed -i "s|{$(shell basename "$(IMG)")}|data:$(shell mimetype -b "$(IMG)");base64,$(shell basenc --base64 --wrap=0 "$(IMG)")|g" "$(PROJECT)/data/style.css") \ ) clean: rm "$(PROJECT)/data/style.css" rm "./$(PROJECT)_v$(VERSION).zip"