# OUTPUT type # 1 - .out # 2 - .a # 3 - .so OUTPUT_TYPE = 2 OUTPUT_NAME = clzma ifeq ($(target), kunlun2) hw_dep = hw2 riscv_dep = riscv2 else ifeq ($(target), kunlun3) hw_dep = hw3 riscv_dep = riscv3 else hw_dep = hw riscv_dep = riscv endif endif SUB_DIRS = ram # .h files dir ADD_INCLUDE += . ADD_INCLUDE += $(TOPDIR)/driver/inc $(TOPDIR)/driver/src/$(hw_dep)/inc $(TOPDIR)/inc/driver $(TOPDIR)/mfgtool/ram/inc # predefined macro PRE_MARCO += ##################################################### 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)