b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame] | 1 | BUILD_ROOT = $(shell pwd)/.. |
| 2 | include $(BUILD_ROOT)/Make.defines |
| 3 | |
| 4 | LOCAL_PATH=$(BUILD_ROOT)/libql_lib_v2_rilv2 |
| 5 | |
| 6 | INC_DIR += \ |
| 7 | -I$(LOCAL_PATH) |
| 8 | |
| 9 | LIB_DIR += |
| 10 | |
| 11 | LIBS += -lmbtk_lib -llog -lubus -lubox -lblobmsg_json -lrilutil -lm |
| 12 | |
| 13 | CFLAGS += -shared -Wl,-shared,-Bsymbolic |
| 14 | |
| 15 | DEFINE += |
| 16 | |
| 17 | #MY_FILES_PATH:=$(LOCAL_PATH) |
| 18 | #ifeq ($(CONFIG_MBTK_QL_SUPPORT),y) |
| 19 | #MY_FILES_PATH += $(LOCAL_PATH)/ql |
| 20 | #endif |
| 21 | |
| 22 | #ifeq ($(CONFIG_MBTK_PLATFORM),linux) |
| 23 | #MY_FILES_PATH += $(LOCAL_PATH)/platform/linux |
| 24 | #endif |
| 25 | |
| 26 | #MY_FILES_SUFFIX:=%.c %.cpp |
| 27 | #My_All_Files := $(foreach src_path,$(MY_FILES_PATH), $(shell find "$(src_path)" -type f)) |
| 28 | #MY_SRC_LIST := $(filter $(MY_FILES_SUFFIX),$(My_All_Files)) |
| 29 | #MY_SRC_LIST := $(MY_SRC_LIST:$(LOCAL_PATH)/%=%) |
| 30 | #LOCAL_SRC_FILES += $(MY_SRC_LIST) |
| 31 | #$(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES)) |
| 32 | |
| 33 | #LOCAL_SRC_FILES = $(wildcard *.c) $(wildcard *.cpp) |
| 34 | LOCAL_SRC_FILES = ql_sim.c \ |
| 35 | ql_nw.c \ |
| 36 | ql_sms.c \ |
| 37 | ql_voice.c \ |
| 38 | ql_data_call_v1.c \ |
| 39 | ql_wifi.c \ |
| 40 | ql_test_utils.c \ |
| 41 | ql_absys_api.c \ |
| 42 | ql_adc.c \ |
| 43 | ql_atc.c \ |
| 44 | ql_audio_cfg.c \ |
| 45 | ql_audio_pcm.c \ |
| 46 | ql_cell_locator.c \ |
| 47 | ql_dm.c \ |
| 48 | ql_fota.c \ |
| 49 | ql_fota_api.c \ |
| 50 | ql_fota_common.c \ |
| 51 | ql_gnss.c \ |
| 52 | ql_gpio.c \ |
| 53 | ql_gpio_internal.c \ |
| 54 | ql_lanhost.c \ |
| 55 | ql_lpm.c \ |
| 56 | ql_ms_data_call.c \ |
| 57 | ql_ms_dm.c \ |
| 58 | ql_ms_nw.c \ |
| 59 | ql_ms_sim.c \ |
| 60 | ql_ms_sms.c \ |
| 61 | ql_ms_voice.c \ |
| 62 | ql_net_usb_dev.c \ |
| 63 | ql_nf.c \ |
| 64 | ql_nslookup.c \ |
| 65 | ql_sleep_wakelock.c \ |
b.liu | f15ba34 | 2025-05-14 19:31:01 +0800 | [diff] [blame] | 66 | ql_ecall.c \ |
| 67 | ql_tee_service.c |
b.liu | d440f9f | 2025-04-18 10:44:31 +0800 | [diff] [blame] | 68 | |
| 69 | |
| 70 | |
| 71 | |
| 72 | OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) |
| 73 | $(info OBJS = $(OBJS)) |
| 74 | |
| 75 | lib_name := libql_lib.so |
| 76 | lib_version := 2 |
| 77 | |
| 78 | dtarget := $(OUT_DIR)/lib/$(lib_name).$(lib_version) |
| 79 | |
| 80 | all: $(dtarget) |
| 81 | |
| 82 | $(dtarget): $(OBJS) |
| 83 | $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@ |
| 84 | cp $@ $(BUILD_ROOT)/rootfs/lib |
| 85 | ln -sf $(lib_name).$(lib_version) $(BUILD_ROOT)/rootfs/lib/$(lib_name) |
| 86 | |
| 87 | %.o:%.c |
| 88 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| 89 | |
| 90 | %.o:%.cpp |
| 91 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| 92 | |
| 93 | clean: |
| 94 | rm -f $(OBJS) $(dtarget) |
| 95 | |