blob: 22a5e03b4e848e72236d69686d1c234564ce81a1 [file] [log] [blame]
liubin281ac462023-07-19 14:22:54 +08001ROOT = $(shell pwd)/../..
2include ../Make.defines
3
4LOCAL_PATH=$(BUILD_ROOT)/lynq_lib
5
6INC_DIR +=
7
8LIB_DIR +=
9
10LIBS += -llog -lmbtk_lib
11
12CFLAGS += -shared -Wl,-shared,-Bsymbolic
13
14DEFINE +=
15
16MY_FILES_PATH:=$(LOCAL_PATH)/src
17#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
18#MY_FILES_PATH += $(LOCAL_PATH)/ql
19#endif
20
21#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
22#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
23#endif
24
b.liu1acd3382023-10-11 16:29:12 +080025LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
26OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
27$(info OBJS = $(OBJS))
liubin281ac462023-07-19 14:22:54 +080028
29dtarget := $(OUT_DIR)/lib/liblynq_lib.so
30
31all: $(dtarget)
32
b.liu1acd3382023-10-11 16:29:12 +080033$(dtarget): $(OBJS)
34 $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
35
36%.o:%.c
37 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
38
39%.o:%.cpp
40 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
liubin281ac462023-07-19 14:22:54 +080041
42clean:
b.liu1acd3382023-10-11 16:29:12 +080043 rm -f $(OBJS) $(dtarget)
liubin281ac462023-07-19 14:22:54 +080044