b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 1 | BUILD_ROOT = $(shell pwd)/.. |
| 2 | include $(BUILD_ROOT)/Make.defines |
| 3 | |
| 4 | LOCAL_PATH=$(BUILD_ROOT)/mbtk_rild_v2 |
| 5 | |
| 6 | INC_DIR += \ |
| 7 | -I$(LOCAL_PATH)/inc \ |
b.liu | af37b79 | 2024-11-19 16:09:58 +0800 | [diff] [blame] | 8 | -I$(BUILD_ROOT)/libmbtk_lib/ril/inc |
b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 9 | |
| 10 | LIB_DIR += |
| 11 | |
b.liu | 450e399 | 2024-10-10 10:59:29 +0800 | [diff] [blame] | 12 | LIBS += -lmbtk_lib -lrilutil -lprop2uci -lmtel -laudio-apu -lcutils -ltinyalsa -lacm |
b.liu | 87afc4c | 2024-08-14 17:33:45 +0800 | [diff] [blame] | 13 | |
| 14 | CFLAGS += |
| 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 | OBJS = $(patsubst %.c, %.o, $(patsubst %.cpp, %.o, $(LOCAL_SRC_FILES))) |
| 29 | $(info OBJS = $(OBJS)) |
| 30 | |
| 31 | dtarget := $(OUT_DIR)/bin/mbtk_rild |
| 32 | |
| 33 | all: $(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 | |
| 45 | clean: |
| 46 | rm -f $(OBJS) $(dtarget) |
| 47 | |