blob: 5a0ed6566e85491a726bd700de0662a94f90401b [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
luojin071b3852024-01-15 15:58:34 +080010#LIBS += -llog -lmbtk_lib
11LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm -llog
b.liu2fd29982024-01-03 16:52:49 +080012ifeq ($(BUILD_PLATFORM), asr1806)
13LIBS += -lmbtk_audio_lib
14endif
liubin281ac462023-07-19 14:22:54 +080015
16CFLAGS += -shared -Wl,-shared,-Bsymbolic
17
18DEFINE +=
19
20MY_FILES_PATH:=$(LOCAL_PATH)/src
21#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
22#MY_FILES_PATH += $(LOCAL_PATH)/ql
23#endif
24
25#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
26#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
27#endif
28
b.liu2fd29982024-01-03 16:52:49 +080029#LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
30LOCAL_SRC_FILES = src/lynq_adc.c \
31 src/lynq_alarm.c \
32 src/lynq_data_call.c \
33 src/lynq_fota.c \
34 src/lynq_gnss.c \
35 src/lynq_gpio.c \
36 src/lynq_irq.c \
37 src/lynq_log.c \
38 src/lynq_net_light.c \
39 src/lynq_network.c \
40 src/lynq_sim.c \
41 src/lynq_sleep.c \
42 src/lynq_sms.c \
wangyouqiang0536d922024-01-23 11:40:25 +080043 src/lynq_thermal.c \
b.liu2fd29982024-01-03 16:52:49 +080044 src/lynq_time.c \
45 src/lynq_voice_call.c
46
47ifeq ($(BUILD_PLATFORM), asr1806)
48LOCAL_SRC_FILES += src/lynq_audio.c
49endif
50
b.liu1acd3382023-10-11 16:29:12 +080051OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
52$(info OBJS = $(OBJS))
liubin281ac462023-07-19 14:22:54 +080053
54dtarget := $(OUT_DIR)/lib/liblynq_lib.so
55
56all: $(dtarget)
57
b.liu1acd3382023-10-11 16:29:12 +080058$(dtarget): $(OBJS)
59 $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
60
61%.o:%.c
62 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
b.liu5fa9e772023-11-23 18:00:55 +080063
b.liu1acd3382023-10-11 16:29:12 +080064%.o:%.cpp
65 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
liubin281ac462023-07-19 14:22:54 +080066
67clean:
b.liu1acd3382023-10-11 16:29:12 +080068 rm -f $(OBJS) $(dtarget)
liubin281ac462023-07-19 14:22:54 +080069