Yue Lun | 03a82d9 | 2013-10-21 10:15:02 +0800 | [diff] [blame] | 1 | DST_DIR=$(BLD_DIR)/$(MODULE_TYPE) |
| 2 | |
| 3 | SUB_DIR=$(patsubst %/, %, $(dir $(wildcard ./*/Makefile))) |
| 4 | |
| 5 | ifeq (,$(findstring $(LIB), $(COMPONENTS))) |
| 6 | SRC_LIST= |
| 7 | endif |
| 8 | |
| 9 | SRC_FILE=$(addprefix $(PRJ_PATH)/$(LOC_DIR)/, $(SRC_LIST)) |
| 10 | |
| 11 | OBJ_LIST=$(SRC_LIST:.c=.o) |
| 12 | OBJ_FILE=$(addprefix $(DST_DIR)/, $(OBJ_LIST)) |
| 13 | |
| 14 | DEP_LIST=$(SRC_LIST:.c=.d) |
| 15 | DEP_FILE=$(addprefix $(DST_DIR)/, $(DEP_LIST)) |
| 16 | |
| 17 | vpath %.c $(PRJ_PATH)/$(LOC_DIR) |
| 18 | vpath %.c $(PRJ_PATH)/app/nathelper/linux |
| 19 | vpath %.c $(PRJ_PATH)/app/nathelper/linux/lib |
| 20 | vpath %.o $(DST_DIR) |
| 21 | vpath %.d $(DST_DIR) |
| 22 | |
| 23 | DEP_LOOP=$(foreach i, $(SUB_DIR), $(MAKE) -C $(i) dep || exit 1;) |
| 24 | OBJ_LOOP=$(foreach i, $(SUB_DIR), $(MAKE) -C $(i) obj || exit 1;) |
| 25 | CLEAN_LOOP=$(foreach i, $(SUB_DIR), $(MAKE) -C $(i) clean;) |
| 26 | CLEAN_OBJ_LOOP=$(foreach i, $(SUB_DIR), $(MAKE) -C $(i) clean_o;) |
| 27 | CLEAN_DEP_LOOP=$(foreach i, $(SUB_DIR), $(MAKE) -C $(i) clean_d;) |
| 28 | |