liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 1 | ROOT = $(shell pwd)/../.. |
2 | include ../Make.defines | ||||
3 | |||||
b.liu | 9a30686 | 2024-03-06 16:49:40 +0800 | [diff] [blame^] | 4 | LOCAL_PATH=$(BUILD_ROOT)/mbtk_rild |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 5 | |
6 | INC_DIR += \ | ||||
7 | -I$(LOCAL_PATH)/inc \ | ||||
b.liu | 9a30686 | 2024-03-06 16:49:40 +0800 | [diff] [blame^] | 8 | -I$(BUILD_ROOT)/libmbtk_ril |
9 | |||||
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 10 | LIB_DIR += |
11 | |||||
b.liu | 9a30686 | 2024-03-06 16:49:40 +0800 | [diff] [blame^] | 12 | LIBS += -lmbtk_lib -lmbtk_net -lmbtk_ril -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 13 | |
b.liu | 9a30686 | 2024-03-06 16:49:40 +0800 | [diff] [blame^] | 14 | CFLAGS += |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 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 | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 27 | LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp) |
28 | OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) | ||||
29 | $(info OBJS = $(OBJS)) | ||||
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 30 | |
b.liu | 9a30686 | 2024-03-06 16:49:40 +0800 | [diff] [blame^] | 31 | dtarget := $(OUT_DIR)/bin/mbtk_rild |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 32 | |
33 | all: $(dtarget) | ||||
34 | |||||
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 35 | $(dtarget): $(OBJS) |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 36 | @echo " BIN $@" |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 37 | $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@ |
38 | |||||
39 | %.o:%.c | ||||
40 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ | ||||
b.liu | 9a30686 | 2024-03-06 16:49:40 +0800 | [diff] [blame^] | 41 | |
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 42 | %.o:%.cpp |
43 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ | ||||
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 44 | |
45 | clean: | ||||
b.liu | 1acd338 | 2023-10-11 16:29:12 +0800 | [diff] [blame] | 46 | rm -f $(OBJS) $(dtarget) |
liubin | 281ac46 | 2023-07-19 14:22:54 +0800 | [diff] [blame] | 47 |