blob: b078162dd2c34aa8e2eec5336108e04585d122ad [file] [log] [blame]
liubin281ac462023-07-19 14:22:54 +08001ROOT = $(shell pwd)/../..
2include ../Make.defines
3
4LOCAL_PATH=$(BUILD_ROOT)/mbtk_lib
5
6INC_DIR += \
7 -I$(LOCAL_PATH)/inc
b.liu3403c932023-10-10 16:26:35 +08008
liubin281ac462023-07-19 14:22:54 +08009LIB_DIR +=
10
b.liu3403c932023-10-10 16:26:35 +080011LIBS += -llog -lubus -lubox -lprop2uci -luci -lrilutil \
12 -lcutils \
13 -laudio-apu
14
15ifeq ($(BUILD_PLATFORM), asr1803)
16LIBS += -lpolarssl \
liubin281ac462023-07-19 14:22:54 +080017 -lavcodec \
18 -lavdevice \
19 -lavfilter \
20 -lavformat \
21 -lavutil \
22 -lpostproc \
23 -lswresample \
b.liu3403c932023-10-10 16:26:35 +080024 -lswscale
25endif
b.liueb040652023-09-25 18:50:56 +080026
liubin281ac462023-07-19 14:22:54 +080027CFLAGS += -shared -Wl,-shared,-Bsymbolic
28
b.liueb040652023-09-25 18:50:56 +080029DEFINE += -DMBTK_NET_MONITOR_SUPPORT
liubin281ac462023-07-19 14:22:54 +080030
31MY_FILES_PATH:=$(LOCAL_PATH)/src
32#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
33#MY_FILES_PATH += $(LOCAL_PATH)/ql
34#endif
35
36#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
37#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
38#endif
39
40MY_FILES_SUFFIX:=%.c %.cpp
41My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f))
42MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files))
43MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%)
44LOCAL_SRC_FILES += $(MY_SRC_LIST)
45$(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES))
46
47dtarget := $(OUT_DIR)/lib/libmbtk_lib.so
48
49all: $(dtarget)
50
51$(dtarget):
52 $(CC) $(CFLAGS) $(LOCAL_SRC_FILES) -o $@ $(DEFINE) $(INC_DIR) $(LIB_DIR) $(LIBS)
53
54
55clean:
56
57