################################################################################
# MRS Version: 2.3.0
# Automatically-generated file. Do not edit!
################################################################################
-include ../makefile.init

RM := rm -rf

# All of the sources participating in the build are defined here
-include sources.mk
-include components/ws2812b/subdir.mk
-include components/tools/subdir.mk
-include components/nfc/subdir.mk
-include components/led/subdir.mk
-include components/electlock/subdir.mk
-include components/config/subdir.mk
-include components/can/subdir.mk
-include components/action/subdir.mk
-include User/app_drv_fifo/subdir.mk
-include User/subdir.mk
-include Startup/subdir.mk
-include SRC/Peripheral/src/subdir.mk
-include SRC/Debug/subdir.mk
-include SRC/Core/subdir.mk
-include Profile/subdir.mk
-include LIB/subdir.mk
-include HAL/subdir.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(S_DEPS)),)
-include $(S_DEPS)
endif
ifneq ($(strip $(S_UPPER_DEPS)),)
-include $(S_UPPER_DEPS)
endif
ifneq ($(strip $(ASM_DEPS)),)
-include $(ASM_DEPS)
endif
ifneq ($(strip $(ASM_UPPER_DEPS)),)
-include $(ASM_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 += \
mainboard.bin \
mainboard.hex \

SECONDARY_LIST += \
mainboard.lst \

SECONDARY_SIZE += \
mainboard.siz \


# All Target
all: 
	$(MAKE) --no-print-directory main-build 
	$(MAKE) --no-print-directory post-build 

main-build: mainboard.elf secondary-outputs

post-build: 
	 riscv-none-embed-objcopy -O ihex "mainboard.elf" "mainboard.hex" && riscv-none-embed-objcopy -O binary "mainboard.elf" "mainboard.bin"

# Tool invocations
mainboard.elf: $(OBJS) $(USER_OBJS_ESCAPE)
	@	riscv-none-embed-gcc -march=rv32imacxw -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -fmax-errors=20 -Os -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-common -g -T "d:/git_workspace/bozz/loto/bozz_loto_software/for_can/ISCS_LOCK_BASE_CAN/mainboard/Ld/Link.ld" -nostartfiles -Xlinker --gc-sections -L"d:\git_workspace\bozz\loto\bozz_loto_software\for_can\ISCS_LOCK_BASE_CAN\mainboard" -L"d:/git_workspace/bozz/loto/bozz_loto_software/for_can/ISCS_LOCK_BASE_CAN/mainboard/components/Lib" -L"d:/git_workspace/bozz/loto/bozz_loto_software/for_can/ISCS_LOCK_BASE_CAN/Library/LIB" -Xlinker --print-memory-usage -Wl,-Map,"mainboard.map" --specs=nano.specs -u _printf_float -u _scanf_float --specs=nosys.specs -o "mainboard.elf" $(OBJS) $(LIBS) -lIQmath_RV32
mainboard.bin: mainboard.elf
	@	riscv-none-embed-objcopy -O binary "mainboard.elf" "mainboard.bin"
mainboard.hex: mainboard.elf
	@	riscv-none-embed-objcopy -O ihex "mainboard.elf" "mainboard.hex"
mainboard.lst: mainboard.elf
	@	riscv-none-embed-objdump --source --all-headers --demangle -M xw --line-numbers --wide "mainboard.elf" > "mainboard.lst"
mainboard.siz: mainboard.elf
	riscv-none-embed-size --format=berkeley "mainboard.elf"

# Other Targets
clean:
	-$(RM) $(DIR_OBJS) $(SECONDARY_FLASH)$(SECONDARY_LIST)$(SECONDARY_SIZE) mainboard.elf
	-$(RM) $(DIR_EXPANDS) $(CALLGRAPH_DOT)
	-$(RM) $(DIR_DEPS)
secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_LIST) $(SECONDARY_SIZE)

.PHONY: all clean dependents

-include ../makefile.targets