blob: 2cbc49f80b6da1c3966678498f51aba1cbdcbb37 [file] [log] [blame]
b.liu3743bce2024-03-22 19:27:58 +08001BUILD_ROOT = $(shell pwd)/..
2include $(BUILD_ROOT)/Make.defines
liubin281ac462023-07-19 14:22:54 +08003
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
xf.li44e08692024-01-30 01:54:44 -080011LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm -llog -ljson-c -lblobmsg_json
b.liuc181beb2024-03-07 18:34:21 +080012LIBS += -lmbtk_audio -lmbtk_ril -lmbtk_fota -lmbtk_factory -lmbtk_net -lmbtk_gnss
liubin281ac462023-07-19 14:22:54 +080013
14CFLAGS += -shared -Wl,-shared,-Bsymbolic
15
16DEFINE +=
17
18MY_FILES_PATH:=$(LOCAL_PATH)/src
19#ifeq ($(CONFIG_MBTK_QL_SUPPORT),y)
20#MY_FILES_PATH += $(LOCAL_PATH)/ql
21#endif
22
23#ifeq ($(CONFIG_MBTK_PLATFORM),linux)
24#MY_FILES_PATH += $(LOCAL_PATH)/platform/linux
25#endif
26
b.liu2fd29982024-01-03 16:52:49 +080027#LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
28LOCAL_SRC_FILES = src/lynq_adc.c \
29 src/lynq_alarm.c \
30 src/lynq_data_call.c \
31 src/lynq_fota.c \
b.liu2fd29982024-01-03 16:52:49 +080032 src/lynq_gpio.c \
33 src/lynq_irq.c \
34 src/lynq_log.c \
35 src/lynq_net_light.c \
36 src/lynq_network.c \
37 src/lynq_sim.c \
38 src/lynq_sleep.c \
39 src/lynq_sms.c \
wangyouqiang0536d922024-01-23 11:40:25 +080040 src/lynq_thermal.c \
b.liu2fd29982024-01-03 16:52:49 +080041 src/lynq_time.c \
j.luofe26c742024-02-28 17:32:44 +080042 src/lynq_voice_call.c \
liuyanga812f1b2024-07-25 17:49:14 +080043 src/lynq_chip_id.c \
44 src/lynq_gnss.c
b.liu2fd29982024-01-03 16:52:49 +080045
b.liub3b923a2024-06-06 15:15:49 +080046ifeq ($(BUILD_PLATFORM), v2102)
b.liu2fd29982024-01-03 16:52:49 +080047LOCAL_SRC_FILES += src/lynq_audio.c
48endif
49
b.liu1acd3382023-10-11 16:29:12 +080050OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
51$(info OBJS = $(OBJS))
liubin281ac462023-07-19 14:22:54 +080052
53dtarget := $(OUT_DIR)/lib/liblynq_lib.so
54
55all: $(dtarget)
56
b.liu1acd3382023-10-11 16:29:12 +080057$(dtarget): $(OBJS)
58 $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
59
60%.o:%.c
61 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
b.liu5fa9e772023-11-23 18:00:55 +080062
b.liu1acd3382023-10-11 16:29:12 +080063%.o:%.cpp
64 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
liubin281ac462023-07-19 14:22:54 +080065
66clean:
b.liu1acd3382023-10-11 16:29:12 +080067 rm -f $(OBJS) $(dtarget)
liubin281ac462023-07-19 14:22:54 +080068