Files
kunlun/dtest/startup/Makefile

44 lines
899 B
Makefile
Raw Permalink Normal View History

2024-09-28 14:24:04 +08:00
# OUTPUT type
# 1 - .out
# 2 - .a
# 3 - .so
OUTPUT_TYPE = 2
OUTPUT_NAME = riscv
ifeq ($(target), kunlun2)
SUB_DIRS = riscv2/src
ADD_INCLUDE += $(TOPDIR)/startup/riscv2/inc $(TOPDIR)/driver/inc/hw2
else
SUB_DIRS = riscv/src
ADD_INCLUDE += $(TOPDIR)/startup/riscv/inc $(TOPDIR)/driver/inc/hw
endif
ADD_INCLUDE += $(TOPDIR)/driver/inc
# predefined macro
PRE_MARCO += __riscv_float_abi_soft
# lib dir
ADD_LIBDIR =
# lib need to ld together
ADD_LIB =
ifdef TOPDIR
include $(TOPDIR)/build/makefile.cfg
else
include $(CURDIR)/build/makefile.cfg
TOPDIR = $(CURDIR)
export TOPDIR
endif
# 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)