################################################################################
# MRS Version: {"version":"1.8.5","date":"2023/05/22"}
# 自动生成的文件。不要编辑！
################################################################################

-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include User/subdir.mk
-include Startup/subdir.mk
-include Peripheral/src/subdir.mk
-include Debug/subdir.mk
-include Core/subdir.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(ASM_UPPER_DEPS)),)
-include $(ASM_UPPER_DEPS)
endif
ifneq ($(strip $(ASM_DEPS)),)
-include $(ASM_DEPS)
endif
ifneq ($(strip $(S_DEPS)),)
-include $(S_DEPS)
endif
ifneq ($(strip $(S_UPPER_DEPS)),)
-include $(S_UPPER_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
endif

-include ../makefile.defs

# Add inputs and outputs from these tool invocations to the build variables 
SECONDARY_FLASH += \
SPIFLASH_U-Disk.hex \

SECONDARY_LIST += \
SPIFLASH_U-Disk.lst \

SECONDARY_SIZE += \
SPIFLASH_U-Disk.siz \


# 所有目标
all: SPIFLASH_U-Disk.elf secondary-outputs

# 工具调用
SPIFLASH_U-Disk.elf: $(OBJS) $(USER_OBJS)
	@	@	riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -msmall-data-limit=8 -msave-restore -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -w  -g -T "C:\Users\15165\Desktop\SPIFLASH_U-Disk DMA\Project\Ld\Link.ld" -nostartfiles -Xlinker --gc-sections -Wl,-Map,"SPIFLASH_U-Disk.map" --specs=nano.specs --specs=nosys.specs -Wl,--print-memory-usage -o "SPIFLASH_U-Disk.elf" $(OBJS) $(USER_OBJS) $(LIBS)
	@	@
SPIFLASH_U-Disk.hex: SPIFLASH_U-Disk.elf
	@	riscv-none-embed-objcopy -O ihex "SPIFLASH_U-Disk.elf"  "SPIFLASH_U-Disk.hex"
	@	@
SPIFLASH_U-Disk.lst: SPIFLASH_U-Disk.elf
	@	riscv-none-embed-objdump --source --all-headers --demangle --line-numbers --wide -M xw "SPIFLASH_U-Disk.elf" > "SPIFLASH_U-Disk.lst"
	@	@
SPIFLASH_U-Disk.siz: SPIFLASH_U-Disk.elf
	@	riscv-none-embed-size --format=berkeley "SPIFLASH_U-Disk.elf"
	@	@
# 其他目标
clean:
	-$(RM) $(ASM_UPPER_DEPS)$(OBJS)$(SECONDARY_FLASH)$(SECONDARY_LIST)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_DEPS)$(S_UPPER_DEPS)$(C_DEPS) SPIFLASH_U-Disk.elf
	-@
secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_LIST) $(SECONDARY_SIZE)

.PHONY: all clean dependents

-include ../makefile.targets
