SOURCES += $(shell find -name '*.pug') OBJECTS += $(patsubst %.pug, %.html, $(filter %.pug, $(SOURCES))) all: $(OBJECTS) %.html: %.pug pug -P $^