1include $(MAIN_TOPDIR)/build/make_scripts/config.mk 2-include $(MAIN_TOPDIR)/$(MODULE_DIR)/srcs.mk 3include $(MAIN_TOPDIR)/$(MODULE_DIR)/module_config.mk 4 5OBJDIR = $(MAIN_TOPDIR)/$(OBJ_PATH)/$(MODULE_DIR) 6 7ID_CFG_FILE = $(MAIN_TOPDIR)/$(MODULE_DIR)/file_id.cfg 8 9LIB_NAME = lib$(LIB).a 10SRCS = $($(LIB)_srcs) 11LIBOUT = $(MAIN_TOPDIR)/$(LIB_PATH)/$(MODULE_DIR)/$(LIB_NAME) 12 13ifdef SRC_FILES 14OBJ_SRCS := $(filter %.c, $(SRC_FILES)) 15ASM_SRCS := $(filter %.S, $(SRC_FILES)) 16else 17OBJ_SRCS := $(foreach dir, $(SRCS), $(wildcard $(dir)/*.c)) 18ASM_SRCS := $(foreach dir, $(SRCS), $(wildcard $(dir)/*.S )) 19endif 20 21OBJ_SRCS := $(filter-out %/ethernetif.c, $(OBJ_SRCS)) 22OBJS = $(patsubst %.c, $(OBJDIR)/%.o, $(OBJ_SRCS)) 23ASM_OBJS = $(patsubst %.S, $(OBJDIR)/%.o, $(ASM_SRCS)) 24 25all: $(LIBOUT) 26include $(MAIN_TOPDIR)/build/make_scripts/lib.mk 27 28clean: 29 $(Q)$(foreach x, $(OBJS) $(ASM_OBJS) $(LIBOUT), \ 30 if [ -d $(dir $x) ]; \ 31 then $(RM) $(dir $x); \ 32 echo clean dir $(dir $x) success; \ 33 fi;) 34 35.PHONY: all clean 36 37