################################################################################
# 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/project/subdir.mk
-include src/library/middlewares/uart/gmd/subdir.mk
-include src/library/middlewares/gpio/subdir.mk
-include src/library/middlewares/dmm/subdir.mk
-include src/library/middlewares/delay/subdir.mk
-include src/library/libraries/drivers/src/subdir.mk
-include src/library/libraries/cmsis/cm1/device_support/startup/gmd/subdir.mk
-include src/library/libraries/cmsis/cm1/device_support/subdir.mk
-include subdir.mk
-include objects.mk

ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(SX_DEPS)),)
-include $(SX_DEPS)
endif
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 := cm1_secure_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 += \
cm1_secure_demo.bin \

SECONDARY_SIZE += \
cm1_secure_demo.siz \


# All Target
all: main-build

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

# Tool invocations
cm1_secure_demo.elf: $(OBJS) $(USER_OBJS) makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Building target: $@'
	@echo 'Invoking: GNU Arm Cross C Linker'
	arm-none-eabi-gcc -mcpu=cortex-m1 -mthumb -O0 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -g -T "D:\GMD_2025_workspace\workspace_security\cm1_secure_demo\src\library\libraries\cmsis\cm1\device_support\startup\gmd\linker\GOWIN_M1_flash_xip.ld" -Xlinker --gc-sections -L"D:\GMD_2025_workspace\workspace_security\cm1_secure_demo\src\project\iid_bk\lib" -Wl,-Map,"cm1_secure_demo.map" -o "cm1_secure_demo.elf" $(OBJS) $(USER_OBJS) $(LIBS)
	@echo 'Finished building target: $@'
	@echo ' '

cm1_secure_demo.bin: cm1_secure_demo.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Invoking: GNU Arm Cross Create Flash Image'
	arm-none-eabi-objcopy -O binary "cm1_secure_demo.elf"  "cm1_secure_demo.bin"
	@echo 'Finished building: $@'
	@echo ' '

cm1_secure_demo.siz: cm1_secure_demo.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
	@echo 'Invoking: GNU Arm Cross Print Size'
	arm-none-eabi-size --format=berkeley "cm1_secure_demo.elf"
	@echo 'Finished building: $@'
	@echo ' '

# Other Targets
clean:
	-$(RM) $(SX_DEPS)$(OBJS)$(SECONDARY_FLASH)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS) cm1_secure_demo.elf
	-@echo ' '

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

.PHONY: all clean dependents main-build

-include ../makefile.targets
