| BUILD_ROOT = $(shell pwd)/.. |
| include $(BUILD_ROOT)/Make.defines |
| |
| LOCAL_PATH=$(BUILD_ROOT)/liblynq_lib |
| |
| INC_DIR += \ |
| -I$(LOCAL_PATH) |
| |
| LIB_DIR += |
| |
| LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm -llog -ljson-c -lblobmsg_json |
| |
| CFLAGS += -shared -Wl,-shared,-Bsymbolic |
| |
| DEFINE += |
| |
| MY_FILES_PATH:=$(LOCAL_PATH) |
| #ifeq ($(CONFIG_MBTK_QL_SUPPORT),y) |
| #MY_FILES_PATH += $(LOCAL_PATH)/ql |
| #endif |
| |
| #ifeq ($(CONFIG_MBTK_PLATFORM),linux) |
| #MY_FILES_PATH += $(LOCAL_PATH)/platform/linux |
| #endif |
| |
| 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) |
| $(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES)) |
| OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) |
| $(info OBJS = $(OBJS)) |
| |
| dtarget := $(OUT_DIR)/lib/liblynq_lib.so |
| |
| all: $(dtarget) |
| |
| $(dtarget): $(OBJS) |
| $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@ |
| cp $@ $(BUILD_ROOT)/rootfs/lib |
| |
| %.o:%.c |
| $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| |
| %.o:%.cpp |
| $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| |
| clean: |
| rm -f $(OBJS) $(dtarget) |
| |