UIFILES = $(shell ls *.ui)
RCFILES = $(shell ls *.rc)
PyUIFILES = $(patsubst %.ui, ui_%.py, $(UIFILES))
PyRCFILES = $(patsubst %.rc, rc_%.py, $(RCFILES))

all: $(PyUIFILES) $(PyRCFILES)
	@echo $(PyUIFILES) $(PyRCFILES) are up to date.
	$(MAKE) -C plugins $@

ui_%.py : %.ui
	pyuic5 $< -o $@

rc_%.py : %.rc
	pyrcc5 $< -o $@

clean:
	rm -f *~
	rm -f $(PyUIFILES) $(PyRCFILES)
	$(MAKE) -C plugins $@

.PHONY: all clean
