blob: fc5e2dd51b60842fc18068764f3d71b3cab6a9b9 [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 +=
b.liu5fa9e772023-11-23 18:00:55 +08007
liubin281ac462023-07-19 14:22:54 +08008LIB_DIR +=
9
b.liu2fd29982024-01-03 16:52:49 +080010LIBS += -llog -lmbtk_lib
11ifeq ($(BUILD_PLATFORM), asr1806)
12LIBS += -lmbtk_audio_lib
13endif
liubin281ac462023-07-19 14:22:54 +080014
15CFLAGS += -shared -Wl,-shared,-Bsymbolic
16
17DEFINE +=
18
19MY_FILES_PATH:=$(LOCAL_PATH)/src
20#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
21#MY_FILES_PATH += $(LOCAL_PATH)/ql
22#endif
23
24#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
25#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
26#endif
27
b.liu2fd29982024-01-03 16:52:49 +080028#LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
29LOCAL_SRC_FILES = src/lynq_adc.c \
30 src/lynq_alarm.c \
31 src/lynq_data_call.c \
32 src/lynq_fota.c \
33 src/lynq_gnss.c \
34 src/lynq_gpio.c \
35 src/lynq_irq.c \
36 src/lynq_log.c \
37 src/lynq_net_light.c \
38 src/lynq_network.c \
39 src/lynq_sim.c \
40 src/lynq_sleep.c \
41 src/lynq_sms.c \
42 src/lynq_time.c \
43 src/lynq_voice_call.c
44
45ifeq ($(BUILD_PLATFORM), asr1806)
46LOCAL_SRC_FILES += src/lynq_audio.c
47endif
48
b.liu1acd3382023-10-11 16:29:12 +080049OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
50$(info OBJS = $(OBJS))
liubin281ac462023-07-19 14:22:54 +080051
52dtarget := $(OUT_DIR)/lib/liblynq_lib.so
53
54all: $(dtarget)
55
b.liu1acd3382023-10-11 16:29:12 +080056$(dtarget): $(OBJS)
57 $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
58
59%.o:%.c
60 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
b.liu5fa9e772023-11-23 18:00:55 +080061
b.liu1acd3382023-10-11 16:29:12 +080062%.o:%.cpp
63 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
liubin281ac462023-07-19 14:22:54 +080064
65clean:
b.liu1acd3382023-10-11 16:29:12 +080066 rm -f $(OBJS) $(dtarget)
liubin281ac462023-07-19 14:22:54 +080067