解析一下这个makefile

include $(MTK_PATH_BUILD)/common.mk
$(call all-modules-src-or-makefile,$(obj),CUSTOM_KERNEL_)

obj-n := dummy.o


其中:

define all-modules-src-or-makefile
$(eval _ := $(call modules,$(1),$(2))) \
$(eval _ += $(filter-out $(_),$(patsubst $(obj)/%,%,\
$(call wildcard2,$(addprefix $(obj)/,$(addsuffix src,$(call subdirs-have-module,$(1),$(2)))))))) \
$(eval dir := $(subst $(obj)/,,$(subst Makefile,,$(call wildcard2,\
              $(addsuffix /Makefile,$(addprefix $(obj)/,$(_))))))) \
$(eval file := $(subst $(obj)/,,$(call wildcard2,$(addsuffix /*.c,\
              $(addprefix $(obj)/,$(filter-out \
              $(patsubst %/,%,$(dir)),$(_))))))) \
$(eval obj-y := $(dir) $(patsubst %.c,%.o,$(file)))
endef

你可能感兴趣的:(解析一下这个makefile)