Files
kunlun/dtest/bee_ai_test/Makefile
2024-09-28 14:24:04 +08:00

63 lines
1.3 KiB
Makefile
Executable File

# OUTPUT type
# 1 - .out
# 2 - .a
# 3 - .so
OUTPUT_TYPE = 1
OUTPUT_NAME = ai_test
SUB_DIRS = $(TOPDIR)/common/os_shim/freertos
# .h files dir
ADD_INCLUDE += $(TOPDIR)/inc/io_lib $(TOPDIR)/inc/driver $(TOPDIR)/inc/os_shim $(TOPDIR)/startup/riscv3/inc $(TOPDIR)/driver/inc
# predefined macro
PRE_MARCO +=
LD_SCRIPT = link.lds
#LD_SCRIPT = link_iram.lds
ifeq ($(gcc),arm)
ADD_LIB = cm3
ADD_LIBDIR = $(TOPDIR)/startup/cm3
else
ADD_LIB = riscv
ifeq ($(target), kunlun2)
ADD_LIBDIR = $(TOPDIR)/startup/riscv2
else
ifeq ($(target), bee)
ADD_LIBDIR = $(TOPDIR)/startup/riscv3
else
ADD_LIBDIR = $(TOPDIR)/startup/riscv
endif
endif
endif
# lib dir
ADD_LIBDIR += $(TOPDIR)/driver $(TOPDIR)/common $(TOPDIR)/os
# lib need to ld together
ADD_LIB += os driver common
#####################################################
ifdef TOPDIR
include $(TOPDIR)/build/makefile.cfg
else
include $(CURDIR)/build/makefile.cfg
TOPDIR = $(CURDIR)
export TOPDIR
endif
dump:
$(OBJDUMP) -D -S -l $(OUTPUT_FULL_NAME) > $(OUTPUT_FULL_NAME).dump
# display the obj files and output name
debug:
@echo TOPDIR=$(TOPDIR)
@echo OUTPUT_LIB=$(OUTPUT_FULL_NAME)
@echo DEPS=$(DEPS)
@echo OBJECTS=$(OBJECTS)
@echo SRCS=$(SRCS)
@echo OBJECTS folder=$(foreach dirname, $(SUB_DIRS), $(addprefix $(BIN_DIR)/, $(dirname)))
@echo output_name=$(OUTPUT_FULL_NAME)