b.liu | 3743bce | 2024-03-22 19:27:58 +0800 | [diff] [blame] | 1 | BUILD_ROOT = $(shell pwd)/.. |
| 2 | include $(BUILD_ROOT)/Make.defines |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 3 | |
| 4 | LOCAL_PATH=$(BUILD_ROOT)/lynq_lib |
| 5 | |
| 6 | INC_DIR += |
b.liu | 5fa9e77 | 2023-11-23 18:00:55 +0800 | [diff] [blame] | 7 | |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 8 | LIB_DIR += |
| 9 | |
luojin | 071b385 | 2024-01-15 15:58:34 +0800 | [diff] [blame] | 10 | #LIBS += -llog -lmbtk_lib |
xf.li | 44e0869 | 2024-01-30 01:54:44 -0800 | [diff] [blame] | 11 | LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm -llog -ljson-c -lblobmsg_json |
b.liu | c181beb | 2024-03-07 18:34:21 +0800 | [diff] [blame] | 12 | LIBS += -lmbtk_audio -lmbtk_ril -lmbtk_fota -lmbtk_factory -lmbtk_net -lmbtk_gnss |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 13 | |
| 14 | CFLAGS += -shared -Wl,-shared,-Bsymbolic |
| 15 | |
| 16 | DEFINE += |
| 17 | |
| 18 | MY_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.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 27 | #LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp) |
| 28 | LOCAL_SRC_FILES = src/lynq_adc.c \ |
| 29 | src/lynq_alarm.c \ |
| 30 | src/lynq_data_call.c \ |
| 31 | src/lynq_fota.c \ |
b.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 32 | 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 \ |
wangyouqiang | 0536d92 | 2024-01-23 11:40:25 +0800 | [diff] [blame] | 40 | src/lynq_thermal.c \ |
b.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 41 | src/lynq_time.c \ |
j.luo | fe26c74 | 2024-02-28 17:32:44 +0800 | [diff] [blame] | 42 | src/lynq_voice_call.c \ |
liuyang | a812f1b | 2024-07-25 17:49:14 +0800 | [diff] [blame^] | 43 | src/lynq_chip_id.c \ |
| 44 | src/lynq_gnss.c |
b.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 45 | |
b.liu | b3b923a | 2024-06-06 15:15:49 +0800 | [diff] [blame] | 46 | ifeq ($(BUILD_PLATFORM), v2102) |
b.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 47 | LOCAL_SRC_FILES += src/lynq_audio.c |
| 48 | endif |
| 49 | |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 50 | OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) |
| 51 | $(info OBJS = $(OBJS)) |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 52 | |
| 53 | dtarget := $(OUT_DIR)/lib/liblynq_lib.so |
| 54 | |
| 55 | all: $(dtarget) |
| 56 | |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 57 | $(dtarget): $(OBJS) |
| 58 | $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@ |
| 59 | |
| 60 | %.o:%.c |
| 61 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
b.liu | 5fa9e77 | 2023-11-23 18:00:55 +0800 | [diff] [blame] | 62 | |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 63 | %.o:%.cpp |
| 64 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 65 | |
| 66 | clean: |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 67 | rm -f $(OBJS) $(dtarget) |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 68 | |