SUBDIRS := ./libmodbus ./lib60870 ./libmongoose
define make_subdir
	for d in $(SUBDIRS); do [ -f "$$d/makefile" ] && (cd "$$d" && make -f makefile $1) || true; done
endef
.PHONY: all clean rebuild
all:; @$(call make_subdir,all)
clean:; @$(call make_subdir,clean)
rebuild: clean all
