| ROOT = $(shell pwd)/../.. |
| include ../Make.defines |
| |
| LOCAL_PATH=$(BUILD_ROOT)/mbtk_lib |
| |
| INC_DIR += \ |
| -I$(LOCAL_PATH)/inc |
| |
| LIB_DIR += |
| |
| LIBS += -llog -lubus -lubox -luci -lprop2uci -lrilutil -lblobmsg_json |
| |
| ifeq ($(BUILD_PLATFORM), asr1803) |
| LIBS += -lcutils -laudio-apu |
| endif |
| |
| ifeq ($(BUILD_PLATFORM), asr1803) |
| LIBS += -lpolarssl \ |
| -lavcodec \ |
| -lavdevice \ |
| -lavfilter \ |
| -lavformat \ |
| -lavutil \ |
| -lpostproc \ |
| -lswresample \ |
| -lswscale |
| else |
| LIBS += -lssl -lcrypto |
| endif |
| |
| CFLAGS += -shared -Wl,-shared,-Bsymbolic |
| |
| DEFINE += -DMBTK_NET_MONITOR_SUPPORT |
| |
| MY_FILES_PATH:=$(LOCAL_PATH)/src |
| #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) |
| |
| LOCAL_SRC_FILES = src/ds_ASBuffer.cpp \ |
| src/ds_ASString.cpp \ |
| src/g711_pcm_convert.c \ |
| src/mbtk_adc.c \ |
| src/mbtk_at.c \ |
| src/mbtk_basic_at_wrapper.c \ |
| src/mbtk_bs_position.c \ |
| src/mbtk_coap_api.cpp \ |
| src/mbtk_coap.c \ |
| src/mbtk_coap_pdu.cpp \ |
| src/mbtk_dhcp.c \ |
| src/mbtk_file.c \ |
| src/mbtk_ftp_at.c \ |
| src/mbtk_ftp.c \ |
| src/mbtk_gpio.c \ |
| src/mbtk_http_base.c \ |
| src/mbtk_http.c \ |
| src/mbtk_http_chunks.c \ |
| src/mbtk_ifc.c \ |
| src/mbtk_info_api.c \ |
| src/mbtk_info.c \ |
| src/mbtk_list.c \ |
| src/mbtk_log.c \ |
| src/mbtk_map.c \ |
| src/mbtk_net_control.c \ |
| src/mbtk_ntp.c \ |
| src/mbtk_pdu_sms.c \ |
| src/mbtk_queue.c \ |
| src/mbtk_sock2.c \ |
| src/mbtk_sock.c \ |
| src/mbtk_str.c \ |
| src/mbtk_task.c \ |
| src/mbtk_tcpip_at.c \ |
| src/mbtk_utf.c \ |
| src/mbtk_utils.c \ |
| src/mbtk_fota.c \ |
| src/ringbuffer.c |
| |
| ifeq ($(BUILD_PLATFORM), asr1803) |
| LOCAL_SRC_FILES += \ |
| src/mbtk_audio_alsa.c \ |
| src/mbtk_audio.c |
| |
| ifeq ($(BUILD_BRANCH), rls3671) |
| LOCAL_SRC_FILES += src/mbtk_mp3_to_wav.c |
| endif |
| endif |
| |
| ifeq ($(MBTK_GNSS_MODE), gnss_6228) |
| LOCAL_SRC_FILES += src/mbtk_gnss_6228.c \ |
| src/mbtk_gnss_update.c |
| endif |
| |
| ifeq ($(MBTK_GNSS_MODE), gnss_5311) |
| LOCAL_SRC_FILES += src/mbtk_gnss_5311.c |
| endif |
| |
| OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) |
| $(info OBJS = $(OBJS)) |
| |
| dtarget := $(OUT_DIR)/lib/libmbtk_lib.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) |
| |