blob: 5307d5cbaf2032bfebaf2fe82bddeeb5dbced877 [file] [log] [blame]
BUILD_ROOT = $(shell pwd)/..
include $(BUILD_ROOT)/Make.defines
LOCAL_PATH=$(BUILD_ROOT)/libmbtk_http
INC_DIR +=
LIB_DIR +=
LIBS += -llog -lmbtk_lib -lmbtk_net
CFLAGS += -shared -Wl,-shared,-Bsymbolic
MY_FILES_PATH:=$(LOCAL_PATH)
MY_FILES_SUFFIX:=%.c %.cpp
My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
LOCAL_SRC_FILES += $(MY_SRC_LIST)
OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
$(info OBJS = $(OBJS))
dtarget := $(OUT_DIR)/lib/libmbtk_http.so
all: $(dtarget)
$(dtarget):$(OBJS)
$(CC) $(CFLAGS) $(DEFINE) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
%.o:%.c
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
%.o:%.cpp
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
clean:
rm -f $(OBJS) $(dtarget)