liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 1 | ROOT = $(shell pwd)/../.. |
| 2 | include ../Make.defines |
| 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 |
| 11 | LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm -llog |
b.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 12 | ifeq ($(BUILD_PLATFORM), asr1806) |
| 13 | LIBS += -lmbtk_audio_lib |
| 14 | endif |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 15 | |
| 16 | CFLAGS += -shared -Wl,-shared,-Bsymbolic |
| 17 | |
| 18 | DEFINE += |
| 19 | |
| 20 | MY_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.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 29 | #LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp) |
| 30 | LOCAL_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 \ |
wangyouqiang | 0536d92 | 2024-01-23 11:40:25 +0800 | [diff] [blame^] | 43 | src/lynq_thermal.c \ |
b.liu | 2fd2998 | 2024-01-03 16:52:49 +0800 | [diff] [blame] | 44 | src/lynq_time.c \ |
| 45 | src/lynq_voice_call.c |
| 46 | |
| 47 | ifeq ($(BUILD_PLATFORM), asr1806) |
| 48 | LOCAL_SRC_FILES += src/lynq_audio.c |
| 49 | endif |
| 50 | |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 51 | OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) |
| 52 | $(info OBJS = $(OBJS)) |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 53 | |
| 54 | dtarget := $(OUT_DIR)/lib/liblynq_lib.so |
| 55 | |
| 56 | all: $(dtarget) |
| 57 | |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 58 | $(dtarget): $(OBJS) |
| 59 | $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@ |
| 60 | |
| 61 | %.o:%.c |
| 62 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
b.liu | 5fa9e77 | 2023-11-23 18:00:55 +0800 | [diff] [blame] | 63 | |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 64 | %.o:%.cpp |
| 65 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 66 | |
| 67 | clean: |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 68 | rm -f $(OBJS) $(dtarget) |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 69 | |