105 lines
2.1 KiB
Makefile
105 lines
2.1 KiB
Makefile
PREFIX?=/usr/local
|
|
DATAROOTDIR?=$(PREFIX)/share
|
|
ICONSDIR?=$(DATAROOTDIR)/icons
|
|
|
|
FFMPEG?=ffmpeg
|
|
PYTHON?=python3
|
|
XCURSORGEN?=xcursorgen
|
|
|
|
X_CURSORS=\
|
|
left_ptr\
|
|
question_arrow\
|
|
hand1\
|
|
watch\
|
|
plus\
|
|
crosshair\
|
|
xterm\
|
|
fleur\
|
|
top_side\
|
|
right_side\
|
|
bottom_side\
|
|
left_side\
|
|
top_right_corner\
|
|
top_left_corner\
|
|
bottom_right_corner\
|
|
bottom_left_corner\
|
|
double_arrow\
|
|
sizing
|
|
|
|
NEW_CURSORS=\
|
|
context-menu\
|
|
progress\
|
|
vertical-text\
|
|
alias\
|
|
copy\
|
|
not-allowed\
|
|
ew-resize\
|
|
nesw-resize\
|
|
col-resize\
|
|
row-resize\
|
|
zoom-in\
|
|
zoom-out
|
|
|
|
GENERATED_CURSORS=$(X_CURSORS) $(NEW_CURSORS)
|
|
|
|
ALIASES=\
|
|
default:left_ptr\
|
|
help:question_arrow\
|
|
pointer:hand1\
|
|
wait:watch\
|
|
cell:plus\
|
|
text:xterm\
|
|
move:fleur\
|
|
no-drop:not-allowed\
|
|
grab:fleur\
|
|
grabbing:fleur\
|
|
all-scroll:fleur\
|
|
n-resize:top_side\
|
|
e-resize:right_side\
|
|
s-resize:bottom_side\
|
|
w-resize:left_side\
|
|
ne-resize:top_right_corner\
|
|
nw-resize:top_left_corner\
|
|
se-resize:bottom_right_corner\
|
|
sw-resize:bottom_left_corner\
|
|
ns-resize:double_arrow\
|
|
nwse-resize:sizing
|
|
|
|
all: $(GENERATED_CURSORS:=.xcursor)
|
|
|
|
install: all
|
|
mkdir -p $(DESTDIR)$(ICONSDIR)/muinaisosoitin/cursors
|
|
for cursor in $(GENERATED_CURSORS); do\
|
|
cp $$cursor.xcursor $(DESTDIR)$(ICONSDIR)/muinaisosoitin/cursors/$$cursor;\
|
|
done
|
|
for mapping in $(ALIASES); do\
|
|
ln -sf $${mapping#*:} $(DESTDIR)$(ICONSDIR)/muinaisosoitin/cursors/$${mapping%:*};\
|
|
done
|
|
printf '[Icon Theme]\nName=muinaisosoitin\n' > $(DESTDIR)$(ICONSDIR)/muinaisosoitin/index.theme
|
|
|
|
.PHONY: all install
|
|
|
|
.SUFFIXES:
|
|
.SUFFIXES: .pam .png .xcursor
|
|
|
|
.pam.png:
|
|
$(FFMPEG) -loglevel error -y -i $< $@
|
|
|
|
.png.xcursor:
|
|
$(PYTHON) bdf_extract.py --cursor-config -i cursor.bdf -i newcursors.bdf $* $< | $(XCURSORGEN) - $@
|
|
|
|
$(X_CURSORS:=.xcursor): bdf_extract.py cursor.bdf
|
|
$(NEW_CURSORS:=.xcursor): bdf_extract.py newcursors.bdf
|
|
|
|
$(X_CURSORS:=.pam): bdf_extract.py cursor.bdf
|
|
$(PYTHON) bdf_extract.py --bitmap -i cursor.bdf $* $@
|
|
|
|
$(NEW_CURSORS:=.pam): bdf_extract.py newcursors.bdf
|
|
$(PYTHON) bdf_extract.py --bitmap -i newcursors.bdf $* $@
|
|
|
|
clean:
|
|
rm -f $(GENERATED_CURSORS:=.pam) $(GENERATED_CURSORS:=.png) $(GENERATED_CURSORS:=.xcursor)
|
|
|
|
distclean: clean
|
|
|
|
.PHONY: clean distclean
|