blob: 00f87eadb9044ca3740a502a3de5ae28bc113bce [file] [log] [blame]
b.liu87afc4c2024-08-14 17:33:45 +08001BUILD_ROOT = $(shell pwd)/..
2include $(BUILD_ROOT)/Make.defines
3
4LOCAL_PATH=$(BUILD_ROOT)/mbtk_rild_v2
5
6INC_DIR += \
7 -I$(LOCAL_PATH)/inc \
b.liuaf37b792024-11-19 16:09:58 +08008 -I$(BUILD_ROOT)/libmbtk_lib/ril/inc
b.liu87afc4c2024-08-14 17:33:45 +08009
10LIB_DIR +=
11
b.liu450e3992024-10-10 10:59:29 +080012LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm
b.liu87afc4c2024-08-14 17:33:45 +080013
14CFLAGS +=
15
16DEFINE +=
17
18MY_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
27LOCAL_SRC_FILES = $(wildcard src/*.c) $(wildcard src/*.cpp)
28OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES)))
29$(info OBJS = $(OBJS))
30
31dtarget := $(OUT_DIR)/bin/mbtk_rild
32
33all: $(dtarget)
34
35$(dtarget): $(OBJS)
36 @echo " BIN $@"
37 $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $(OBJS) -o $@
38
39%.o:%.c
40 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
41
42%.o:%.cpp
43 $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
44
45clean:
46 rm -f $(OBJS) $(dtarget)
47