Skip to content

Commit

Permalink
Draft: store build artefacts in build folder.
Browse files Browse the repository at this point in the history
  • Loading branch information
aentinger committed Oct 10, 2023
1 parent d255416 commit 5bcba8c
Showing 1 changed file with 75 additions and 72 deletions.
147 changes: 75 additions & 72 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,76 +71,76 @@ INCLUDES = \
-Ilibraries/openamp_arduino/metal \

OBJS = \
src/system_stm32h7xx_dualcore_boot_cm4_cm7.o \
src/main.o \
src/can.o \
src/can_util.o \
src/peripherals.o \
src/ringbuffer.o \
src/rpc.o \
src/stm32h7xx_it.o \
src/syscalls.o \
src/sysmem.o \
src/adc.o \
src/uart.o \
src/pwm.o \
src/gpio.o \
src/timer.o \
src/rtc.o \
src/spi.o \
src/system.o \
src/watchdog.o \
src/m4_utilities.o \
startup/startup_stm32h747xx.o \
libraries/openamp_arduino/src/condition.o \
libraries/openamp_arduino/src/device.o \
libraries/openamp_arduino/src/generic_device.o \
libraries/openamp_arduino/src/generic_init.o \
libraries/openamp_arduino/src/generic_io.o \
libraries/openamp_arduino/src/init.o \
libraries/openamp_arduino/src/io.o \
libraries/openamp_arduino/src/irq.o \
libraries/openamp_arduino/src/log.o \
libraries/openamp_arduino/src/mailbox_hsem_if.o \
libraries/openamp_arduino/src/openamp.o \
libraries/openamp_arduino/src/remoteproc_virtio.o \
libraries/openamp_arduino/src/rpmsg.o \
libraries/openamp_arduino/src/rpmsg_virtio.o \
libraries/openamp_arduino/src/rsc_table.o \
libraries/openamp_arduino/src/shmem.o \
libraries/openamp_arduino/src/sys.o \
libraries/openamp_arduino/src/time.o \
libraries/openamp_arduino/src/virtio.o \
libraries/openamp_arduino/src/virtqueue.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hrtim.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_iwdg.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.o \
libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.o
build/src/system_stm32h7xx_dualcore_boot_cm4_cm7.o \
build/src/main.o \
build/src/can.o \
build/src/can_util.o \
build/src/peripherals.o \
build/src/ringbuffer.o \
build/src/rpc.o \
build/src/stm32h7xx_it.o \
build/src/syscalls.o \
build/src/sysmem.o \
build/src/adc.o \
build/src/uart.o \
build/src/pwm.o \
build/src/gpio.o \
build/src/timer.o \
build/src/rtc.o \
build/src/spi.o \
build/src/system.o \
build/src/watchdog.o \
build/src/m4_utilities.o \
build/startup/startup_stm32h747xx.o \
build/libraries/openamp_arduino/src/condition.o \
build/libraries/openamp_arduino/src/device.o \
build/libraries/openamp_arduino/src/generic_device.o \
build/libraries/openamp_arduino/src/generic_init.o \
build/libraries/openamp_arduino/src/generic_io.o \
build/libraries/openamp_arduino/src/init.o \
build/libraries/openamp_arduino/src/io.o \
build/libraries/openamp_arduino/src/irq.o \
build/libraries/openamp_arduino/src/log.o \
build/libraries/openamp_arduino/src/mailbox_hsem_if.o \
build/libraries/openamp_arduino/src/openamp.o \
build/libraries/openamp_arduino/src/remoteproc_virtio.o \
build/libraries/openamp_arduino/src/rpmsg.o \
build/libraries/openamp_arduino/src/rpmsg_virtio.o \
build/libraries/openamp_arduino/src/rsc_table.o \
build/libraries/openamp_arduino/src/shmem.o \
build/libraries/openamp_arduino/src/sys.o \
build/libraries/openamp_arduino/src/time.o \
build/libraries/openamp_arduino/src/virtio.o \
build/libraries/openamp_arduino/src/virtqueue.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_adc_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_cortex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_dma_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_exti.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_fdcan.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_flash_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_gpio.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hrtim.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_hsem.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_iwdg.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_i2c_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_mdma.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_pwr_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rcc_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_rtc_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_spi_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_tim_ex.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart.o \
build/libraries/STM32H7xx_HAL_Driver/Src/stm32h7xx_hal_uart_ex.o


# ----- Verbosity control -----------------------------------------------------
Expand Down Expand Up @@ -204,11 +204,14 @@ MKDEP = \
[ "$${PIPESTATUS[*]}" = "0 0" ] || \
{ rm -f $(basename $@).d; exit 1; }

%.o: %.c
build:
mkdir -p build

build/%.o: %.c | build
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -c $< -o $@
$(MKDEP)

%.o: %.S
build/%.o: %.S | build
$(CC) $(CFLAGS) $(DEFINES) $(INCLUDES) -D__ASSEMBLY__ -c $< -o $@
$(MKDEP)

Expand Down

0 comments on commit 5bcba8c

Please sign in to comment.