86 lines
2.7 KiB
Makefile
86 lines
2.7 KiB
Makefile
################################################################################
|
|
# 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/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 := mkrtos_ym
|
|
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 += \
|
|
mkrtos_ym.hex \
|
|
|
|
SECONDARY_SIZE += \
|
|
mkrtos_ym.siz \
|
|
|
|
|
|
# All Target
|
|
all: mkrtos_ym.elf secondary-outputs
|
|
|
|
# Tool invocations
|
|
mkrtos_ym.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-m3 -mthumb -mthumb-interwork -Os -ffunction-sections -fdata-sections -fno-builtin -fPIC -n -pie -fpie -fPIC -fpic -msingle-pic-base -mno-pic-data-is-text-relative -Wall -g -T "D:\Project\MyProject1\mkrtos_real\mkrtos_ym\link.lds" -nostartfiles -nodefaultlibs -nostdlib -Xlinker --gc-sections -L"D:\Project\MyProject1\mkrtos_real\mkrtos_sdk\Debug" -Wl,-Map,"mkrtos_ym.map" -Xlinker --cref -o "mkrtos_ym.elf" $(OBJS) $(USER_OBJS) $(LIBS)
|
|
@echo 'Finished building target: $@'
|
|
@echo ' '
|
|
$(MAKE) --no-print-directory post-build
|
|
|
|
mkrtos_ym.hex: mkrtos_ym.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
|
|
@echo 'Invoking: GNU Arm Cross Create Flash Image'
|
|
arm-none-eabi-objcopy -O ihex "mkrtos_ym.elf" "mkrtos_ym.hex"
|
|
@echo 'Finished building: $@'
|
|
@echo ' '
|
|
|
|
mkrtos_ym.siz: mkrtos_ym.elf makefile objects.mk $(OPTIONAL_TOOL_DEPS)
|
|
@echo 'Invoking: GNU Arm Cross Print Size'
|
|
arm-none-eabi-size --format=berkeley "mkrtos_ym.elf"
|
|
@echo 'Finished building: $@'
|
|
@echo ' '
|
|
|
|
# Other Targets
|
|
clean:
|
|
-$(RM) $(OBJS)$(SECONDARY_FLASH)$(SECONDARY_SIZE)$(ASM_DEPS)$(S_UPPER_DEPS)$(C_DEPS) mkrtos_ym.elf
|
|
-@echo ' '
|
|
|
|
post-build:
|
|
-arm-none-eabi-objcopy -O binary "mkrtos_ym.elf" "app.bi" && arm-none-eabi-strip "mkrtos_ym.elf" -o "app.elf"
|
|
-@echo ' '
|
|
|
|
secondary-outputs: $(SECONDARY_FLASH) $(SECONDARY_SIZE)
|
|
|
|
.PHONY: all clean dependents post-build
|
|
|
|
-include ../makefile.targets
|