################################################################################
# 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 src/bsp/driver/uart/subdir.mk
-include src/bsp/driver/riscv_mc/subdir.mk
-include src/bsp/driver/i2c_controller/subdir.mk
-include src/bsp/driver/gpio/subdir.mk
-include src/subdir.mk
-include subdir.mk
-include objects.mk

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

-include ../makefile.defs

OPTIONAL_TOOL_DEPS := \
$(wildcard ../makefile.defs) \
$(wildcard ../makefile.init) \
$(wildcard ../makefile.targets) \


BUILD_ARTIFACT_NAME := i2c_qsfp_lpmode
BUILD_ARTIFACT_EXTENSION := elf
BUILD_ARTIFACT_PREFIX :=
BUILD_ARTIFACT := $(BUILD_ARTIFACT_PREFIX)$(BUILD_ARTIFACT_NAME)$(if $(BUILD_ARTIFACT_EXTENSION),.$(BUILD_ARTIFACT_EXTENSION),)

# Add inputs and outputs from these tool invocations to the build variables 
SECONDARY_LIST += \
i2c_qsfp_lpmode.lst \

SECONDARY_SIZE += \
i2c_qsfp_lpmode.siz \

SECONDARY_MEMORY += \
i2c_qsfp_lpmode.mem \


# All Target
all: main-build

# Main-build Target
main-build: i2c_qsfp_lpmode.elf secondary-outputs

# Tool invocations
i2c_qsfp_lpmode.elf: $(OBJS) $(USER_OBJS) makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Building target: $@'
	@echo 'Invoking: GNU RISC-V Cross C Linker'
	riscv-none-embed-gcc -march=rv32ic -mabi=ilp32 -msmall-data-limit=8 -mno-save-restore -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections  -g3 -T "C:/Users/aloh/Downloads/i2c_qsfp_lpmode_avantx_example/i2c_qsfp_lpmode_avantx/i2c_qsfp_lpmode_avantx/i2c_qsfp_lpmode/src/linker.ld" -nostartfiles -Xlinker --gc-sections -Wl,-Map,"i2c_qsfp_lpmode.map" --specs=picolibc.specs -DPICOLIBC_INTEGER_PRINTF_SCANF -o "i2c_qsfp_lpmode.elf" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

i2c_qsfp_lpmode.lst: i2c_qsfp_lpmode.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Invoking: GNU RISC-V Cross Create Listing'
	riscv-none-embed-objdump --source --all-headers --demangle --line-numbers --wide "i2c_qsfp_lpmode.elf" > "i2c_qsfp_lpmode.lst"
	@echo 'Finished building: $@'
	@echo ' '

i2c_qsfp_lpmode.siz: i2c_qsfp_lpmode.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Invoking: GNU RISC-V Cross Print Size'
	riscv-none-embed-size --format=berkeley "i2c_qsfp_lpmode.elf"
	@echo 'Finished building: $@'
	@echo ' '

i2c_qsfp_lpmode.mem: i2c_qsfp_lpmode.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Invoking: Lattice Create Memory Deployment'
	riscv-none-embed-objcopy -O binary --gap-fill 0 "i2c_qsfp_lpmode.elf" "i2c_qsfp_lpmode.bin"; srec_cat "i2c_qsfp_lpmode.bin" -Binary -byte-swap 4 -DISable Header -Output "i2c_qsfp_lpmode.mem" -MEM 32
	@echo 'Finished building: $@'
	@echo ' '

# Other Targets
clean:
	-$(RM) $(SECONDARY_MEMORY)$(OBJS)$(SECONDARY_LIST)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS) i2c_qsfp_lpmode.elf
	-@echo ' '

secondary-outputs: $(SECONDARY_LIST) $(SECONDARY_SIZE) $(SECONDARY_MEMORY)

.PHONY: all clean dependents main-build

-include ../makefile.targets
