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