b.liu | 1c74d69 | 2024-08-14 17:43:59 +0800 | [diff] [blame] | 1 | BUILD_ROOT = $(shell pwd)/.. |
| 2 | include $(BUILD_ROOT)/Make.defines |
| 3 | |
| 4 | LOCAL_PATH=$(BUILD_ROOT)/lynq_lib_v2 |
| 5 | |
| 6 | INC_DIR += |
| 7 | |
| 8 | LIB_DIR += |
| 9 | |
| 10 | #LIBS += -llog -lmbtk_lib |
| 11 | LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm -llog -ljson-c -lblobmsg_json |
| 12 | LIBS += -lmbtk_audio -lmbtk_ril -lmbtk_fota -lmbtk_factory -lmbtk_net -lmbtk_gnss |
| 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 | |
| 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 \ |
| 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 \ |
| 40 | src/lynq_thermal.c \ |
| 41 | src/lynq_time.c \ |
| 42 | src/lynq_voice_call.c \ |
| 43 | src/lynq_chip_id.c \ |
| 44 | src/lynq_gnss.c |
| 45 | |
| 46 | ifeq ($(BUILD_PLATFORM), v2102) |
| 47 | LOCAL_SRC_FILES += src/lynq_audio.c |
| 48 | endif |
| 49 | |
| 50 | OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) |
| 51 | $(info OBJS = $(OBJS)) |
| 52 | |
| 53 | dtarget := $(OUT_DIR)/lib/liblynq_lib.so |
| 54 | |
| 55 | all: $(dtarget) |
| 56 | |
| 57 | $(dtarget): $(OBJS) |
| 58 | $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@ |
| 59 | |
| 60 | %.o:%.c |
| 61 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| 62 | |
| 63 | %.o:%.cpp |
| 64 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| 65 | |
| 66 | clean: |
| 67 | rm -f $(OBJS) $(dtarget) |
| 68 | |