THEME=Toon NAMES=$(wildcard names/*) CURSORS_DIR=$(THEME)/cursors CURSORS=$(NAMES:names/%=$(CURSORS_DIR)/%) INDEX=$(THEME)/index.theme DESTDIR?=~/.icons/ GENERATOR=./cursorMaker.sh all: structure $(INDEX) $(CURSORS) install: $(DESTDIR) all cp -R $(THEME) $(DESTDIR) structure: $(THEME)/ $(CURSORS_DIR)/ %/: mkdir -p $@ $(INDEX): src/index.theme sed 's|Name=|&$(THEME)|' $< > $@ $(CURSORS_DIR)/%: names/% $(GENERATOR) $(<:names/%=%) $(CURSORS_DIR) clean: rm -rf $(THEME)