sathya
Version:
An xPack with a blinky application running on HiFive1
97 lines (80 loc) • 3.1 kB
Plain Text
################################################################################
# Automatically-generated file. Do not edit!
################################################################################
-include ../../makefile.init
RM := rm -rf
CC := riscv-none-embed-gcc
CXX := riscv-none-embed-g++
LD := riscv-none-embed-g++
# By default, build the project artefact.
all: sathya.elf
# Initialise variables to collect source files.
-include variables.mk
# SUBDIR is not actively used, but is prepared in case the custom make
# parts need it. It collects subfolders that are part of the build.
SUBDIRS :=
SUBDIRS += src
SUBDIRS += xpacks/micro-os-plus-c-libs/src
SUBDIRS += xpacks/micro-os-plus-c-libs/src/stdlib
SUBDIRS += xpacks/micro-os-plus-cpp-libs/src
SUBDIRS += xpacks/micro-os-plus-diag-trace/src
SUBDIRS += xpacks/micro-os-plus-riscv-arch/src
SUBDIRS += xpacks/micro-os-plus-startup/src
SUBDIRS += xpacks/sifive-devices/src
SUBDIRS += xpacks/sifive-devices/src/arty/e31
SUBDIRS += xpacks/sifive-devices/src/arty/e51
SUBDIRS += xpacks/sifive-devices/src/fe310
SUBDIRS += xpacks/sifive-hifive1-board/src
# The source files participating in the build are contributed by each folder.
-include src/subdir.mk
-include xpacks/micro-os-plus-c-libs/src/subdir.mk
-include xpacks/micro-os-plus-c-libs/src/stdlib/subdir.mk
-include xpacks/micro-os-plus-cpp-libs/src/subdir.mk
-include xpacks/micro-os-plus-diag-trace/src/subdir.mk
-include xpacks/micro-os-plus-riscv-arch/src/subdir.mk
-include xpacks/micro-os-plus-startup/src/subdir.mk
-include xpacks/sifive-devices/src/subdir.mk
-include xpacks/sifive-devices/src/arty/e31/subdir.mk
-include xpacks/sifive-devices/src/arty/e51/subdir.mk
-include xpacks/sifive-devices/src/fe310/subdir.mk
-include xpacks/sifive-hifive1-board/src/subdir.mk
# TODO test with project root
-include subdir.mk
-include objects.mk
ifneq ($(MAKECMDGOALS),clean)
ifneq ($(strip $(C_DEPS)),)
-include $(C_DEPS)
endif
ifneq ($(strip $(CPP_DEPS)),)
-include $(CPP_DEPS)
endif
ifneq ($(strip $(C_UPPER_DEPS)),)
-include $(C_UPPER_DEPS)
endif
ifneq ($(strip $(C++_DEPS)),)
-include $(C++_DEPS)
endif
ifneq ($(strip $(CXX_DEPS)),)
-include $(CXX_DEPS)
endif
ifneq ($(strip $(S_UPPER_DEPS)),)
-include $(S_UPPER_DEPS)
endif
ifneq ($(strip $(ASM_DEPS)),)
-include $(ASM_DEPS)
endif
endif
-include ../../makefile.defs
# Add inputs and outputs from these tool invocations to the build variables
# Tool invocations
sathya.elf: $(OBJS) $(USER_OBJS)
@echo '[$(LD)]: $@'
@$(LD) -march=rv32imac -mabi=ilp32 -mcmodel=medany -msmall-data-limit=8 -g3 -fmessage-length=0 -fsigned-char -ffunction-sections -fdata-sections -Wall -Wextra -nostartfiles -Xlinker --gc-sections --specs=nano.specs -L"../../ldscripts" -T mem.ld -T libs.ld -T sections.ld $(OBJS) $(USER_OBJS) $(LIBS) -o "sathya.elf"
# Other Targets
clean:
-@echo '[$(firstword $(RM))]: *'
-@$(RM) $(C_DEPS) $(CPP_DEPS) $(C_UPPER_DEPS) $(C++_DEPS) $(CXX_DEPS) $(S_UPPER_DEPS) $(ASM_DEPS)
-@$(RM) $(EXECUTABLES) $(OBJS) sathya.elf
.SECONDARY:
-include ../../makefile.targets