UI_SOURCES = $(shell ls *.ui)
UI_TARGETS = $(patsubst %.ui, Ui_%.py, $(UI_SOURCES))
PYUIC = pyuic6


all: $(UI_TARGETS)

%_rc.py: %.qrc
	rcc -g python -o $@ $<
	sed -i 's/Pyside2/PyQt6/' $@

Ui_%.py: %.ui
	$(PYUIC) $< > $@

clean:
	rm -f *~ *.pyc Ui_*.py *_rc.py
	rm -rf __pycache__

.PHONY: all clean
