b.liu | 3743bce | 2024-03-22 19:27:58 +0800 | [diff] [blame] | 1 | BUILD_ROOT = $(shell pwd)/../.. |
| 2 | include $(BUILD_ROOT)/Make.defines |
b.liu | 482dc0b | 2024-03-22 15:53:36 +0800 | [diff] [blame] | 3 | |
| 4 | INC_DIR += |
| 5 | |
| 6 | LIB_DIR += |
| 7 | |
| 8 | LIBS += -lmbtk_lib -lmbtk_net -lmbtk_ril -lql_lib -lmbtk_audio -lmbtk_http -lmbtk_fota -lmbtk_factory |
| 9 | |
| 10 | CFLAGS += |
| 11 | |
| 12 | DEFINE += |
| 13 | |
| 14 | LOCAL_SRC_FILES = $(wildcard *.c) $(wildcard *.cpp) |
| 15 | |
| 16 | $(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES)) |
| 17 | |
| 18 | OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LOCAL_SRC_FILES))) |
| 19 | BINS = $(patsubst %.o,%,$(OBJS)) |
| 20 | |
| 21 | all: $(BINS) |
| 22 | |
| 23 | $(BINS):$(OBJS) |
| 24 | @echo " BIN $@" |
| 25 | $(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $@.o -o $(OUT_DIR)/bin/$@ |
| 26 | |
| 27 | %.o:%.c |
| 28 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| 29 | |
| 30 | %.o:%.cpp |
| 31 | $(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@ |
| 32 | |
| 33 | clean: |
| 34 | rm -f $(OBJS) |