################################################################################
# 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 utils/subdir.mk
-include src/subdir.mk
-include drv/subdir.mk
-include Library/SPL/src/subdir.mk
-include Library/CMSIS/DeviceSupport/src/gcc/MDR32F02/subdir.mk
-include Library/CMSIS/DeviceSupport/src/gcc/MDR1206/subdir.mk
-include Library/CMSIS/DeviceSupport/src/subdir.mk
-include Library/CMSIS/CoreSupport/src/subdir.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(CC_DEPS)),)
-include $(CC_DEPS)
endif
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(CCM_DEPS)),)
-include $(CCM_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(ASM_DEPS)),)
-include $(ASM_DEPS)
endif
ifneq ($(strip $(S_UPPER_DEPS)),)
-include $(S_UPPER_DEPS)
endif
ifneq ($(strip $(CXXM_DEPS)),)
-include $(CXXM_DEPS)
endif
ifneq ($(strip $(C++M_DEPS)),)
-include $(C++M_DEPS)
endif
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
endif

-include ../makefile.defs

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


BUILD_ARTIFACT_NAME := EnergyMeter_Demo
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_FLASH += \
EnergyMeter_Demo.hex \

SECONDARY_LIST += \
EnergyMeter_Demo.lst \

SECONDARY_SIZE += \
EnergyMeter_Demo.siz \


# All Target
all: main-build

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

# Tool invocations
EnergyMeter_Demo.elf: $(OBJS) $(USER_OBJS) makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Building target: $@'
	@echo 'Invoking: GNU RISC-V Cross C++ Linker'
	riscv-none-embed-g++ -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -mno-save-restore -Werror=return-type -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -fno-move-loop-invariants -Wunused -Wuninitialized -Wall -Wextra -Wconversion -Wpointer-arith -Wpadded -Wshadow -Wlogical-op -Waggregate-return -Wfloat-equal -g3 -T "C:\Project\EnergyMeter_Demo\EnergyMeter_Demo\Library\CMSIS\DeviceSupport\src\gcc\MDR1206\link_FLASH.ld" -nostartfiles -Xlinker --gc-sections -L"C:\Project\EnergyMeter_Demo\EnergyMeter_Demo\Library\CMSIS\DeviceSupport\src\gcc\MDR1206" -Wl,-Map,"EnergyMeter_Demo.map" --specs=nano.specs -o "EnergyMeter_Demo.elf" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

EnergyMeter_Demo.hex: EnergyMeter_Demo.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Invoking: GNU RISC-V Cross Create Flash Image'
	riscv-none-embed-objcopy -O ihex "EnergyMeter_Demo.elf"  "EnergyMeter_Demo.hex"
	@echo 'Finished building: $@'
	@echo ' '

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

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

# Other Targets
clean:
	-$(RM) $(CCM_DEPS)$(C_UPPER_DEPS)$(SECONDARY_LIST)$(SECONDARY_SIZE)$(CXXM_DEPS)$(C_DEPS)$(CC_DEPS)$(C++_DEPS)$(OBJS)$(CXX_DEPS)$(SECONDARY_FLASH)$(ASM_DEPS)$(S_UPPER_DEPS)$(C++M_DEPS)$(CPP_DEPS) EnergyMeter_Demo.elf
	-@echo ' '

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

.PHONY: all clean dependents main-build

-include ../makefile.targets
