blob: 93c4517effa4605c02c4078fc78f7814075880bd [file] [log] [blame]
BUILD_ROOT = $(shell pwd)/../..
include $(BUILD_ROOT)/Make.defines
INSTALL_DIR = $(BUILD_ROOT)/rootfs/bin
INC_DIR +=
LIB_DIR +=
LIBS += -lmbtk_lib -lgsw_lib -ldl
CFLAGS += $(CFLAGS_TEST)
DEFINE +=
LOCAL_SRC_FILES = $(wildcard *.c) $(wildcard *.cpp)
$(info LOCAL_SRC_FILES = $(LOCAL_SRC_FILES))
OBJS = $(patsubst %.c,%.o,$(patsubst %.cpp,%.o,$(LOCAL_SRC_FILES)))
BINS = $(patsubst %.o,%,$(OBJS))
all: $(BINS)
$(BINS):$(OBJS)
@echo " BIN $@"
$(CC) $(CFLAGS) $(LIB_DIR) $(LIBS) $@.o -o $(OUT_DIR)/bin/$@
cp $(OUT_DIR)/bin/$@ $(INSTALL_DIR)/
%.o:%.c
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
%.o:%.cpp
$(CC) $(CFLAGS) $(INC_DIR) $(DEFINE) -c $< -o $@
clean:
rm -f $(OBJS)