SUBDIRS := ./liblist ./libfunc ./liblog ./libmd5 ./libcJSON ./libmy_xxhash ./libtask ./libxml ./libcmd ./libdatacenter ./libcomm define make_subdir for d in $(SUBDIRS); do [ -f "$$d/makefile" ] && (cd "$$d" && make -f makefile $1) || true; done endef ROOT_DIR := $(realpath $(CURDIR)/../../..) .PHONY: all clean rebuild headers headers:; @cd $(ROOT_DIR) && ./release/copy_headers.sh all: headers; @$(call make_subdir,all) clean:; @$(call make_subdir,clean) rebuild: clean all