From 8094bdce23a72264e54641ec4c34189935829251 Mon Sep 17 00:00:00 2001 From: hathach Date: Tue, 14 May 2019 13:59:45 +0700 Subject: [PATCH] makefile clean up --- examples/device/cdc_msc_hid/Makefile | 3 --- examples/device/cdc_msc_hid_freertos/Makefile | 3 --- examples/device/hid_generic_inout/Makefile | 3 --- examples/device/msc_dual_lun/Makefile | 3 --- examples/make.mk | 3 +++ hw/bsp/metro_m0_express/board.mk | 2 -- hw/bsp/metro_m4_express/board.mk | 2 -- hw/bsp/stm32f303disc/board.mk | 2 -- hw/bsp/stm32f407g_disc1/board.mk | 2 -- 9 files changed, 3 insertions(+), 20 deletions(-) diff --git a/examples/device/cdc_msc_hid/Makefile b/examples/device/cdc_msc_hid/Makefile index 4ff3371dc..69b633fea 100644 --- a/examples/device/cdc_msc_hid/Makefile +++ b/examples/device/cdc_msc_hid/Makefile @@ -9,7 +9,4 @@ INC += \ EXAMPLE_SOURCE += $(wildcard src/*.c) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) -# Board source -SRC_C += hw/bsp/$(BOARD)/board_$(BOARD).c - include ../../rules.mk diff --git a/examples/device/cdc_msc_hid_freertos/Makefile b/examples/device/cdc_msc_hid_freertos/Makefile index 3a39f4601..7401f355a 100644 --- a/examples/device/cdc_msc_hid_freertos/Makefile +++ b/examples/device/cdc_msc_hid_freertos/Makefile @@ -11,9 +11,6 @@ INC += \ EXAMPLE_SOURCE += $(wildcard src/*.c) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) -# Board source -SRC_C += hw/bsp/$(BOARD)/board_$(BOARD).c - # FreeRTOS source SRC_C += \ lib/FreeRTOS/Source/list.c \ diff --git a/examples/device/hid_generic_inout/Makefile b/examples/device/hid_generic_inout/Makefile index 4ff3371dc..69b633fea 100644 --- a/examples/device/hid_generic_inout/Makefile +++ b/examples/device/hid_generic_inout/Makefile @@ -9,7 +9,4 @@ INC += \ EXAMPLE_SOURCE += $(wildcard src/*.c) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) -# Board source -SRC_C += hw/bsp/$(BOARD)/board_$(BOARD).c - include ../../rules.mk diff --git a/examples/device/msc_dual_lun/Makefile b/examples/device/msc_dual_lun/Makefile index 59eeacf4d..5a455078e 100644 --- a/examples/device/msc_dual_lun/Makefile +++ b/examples/device/msc_dual_lun/Makefile @@ -9,7 +9,4 @@ INC += \ EXAMPLE_SOURCE += $(wildcard src/*.c) SRC_C += $(addprefix $(CURRENT_PATH)/, $(EXAMPLE_SOURCE)) -# Board source -SRC_C += hw/bsp/$(BOARD)/board_$(BOARD).c - include ../../rules.mk diff --git a/examples/make.mk b/examples/make.mk index d76f611fb..d972c1fea 100644 --- a/examples/make.mk +++ b/examples/make.mk @@ -31,6 +31,9 @@ BUILD = build-$(BOARD) # Board specific include $(TOP)/hw/bsp/$(BOARD)/board.mk +# Include all source C in board folder +SRC_C += $(subst $(TOP)/,,$(wildcard $(TOP)/hw/bsp/$(BOARD)/*.c)) + # Compiler Flags CFLAGS += \ -fsingle-precision-constant \ diff --git a/hw/bsp/metro_m0_express/board.mk b/hw/bsp/metro_m0_express/board.mk index 532a3d3fe..3ea672807 100644 --- a/hw/bsp/metro_m0_express/board.mk +++ b/hw/bsp/metro_m0_express/board.mk @@ -10,8 +10,6 @@ CFLAGS += \ # All source paths should be relative to the top level. LD_FILE = hw/bsp/metro_m0_express/samd21g18a_flash.ld -LD_FLAGS += -mthumb -mcpu=cortex-m0plus - SRC_C += \ hw/mcu/microchip/samd/asf4/samd21/gcc/gcc/startup_samd21.c \ hw/mcu/microchip/samd/asf4/samd21/gcc/system_samd21.c \ diff --git a/hw/bsp/metro_m4_express/board.mk b/hw/bsp/metro_m4_express/board.mk index 3a1de04ac..c62d9bc33 100644 --- a/hw/bsp/metro_m4_express/board.mk +++ b/hw/bsp/metro_m4_express/board.mk @@ -13,8 +13,6 @@ CFLAGS += -Wno-error=undef # All source paths should be relative to the top level. LD_FILE = hw/bsp/metro_m4_express/samd51g19a_flash.ld -LDFLAGS += -mthumb -mcpu=cortex-m4 - SRC_C += \ hw/mcu/microchip/samd/asf4/samd51/gcc/gcc/startup_samd51.c \ hw/mcu/microchip/samd/asf4/samd51/gcc/system_samd51.c \ diff --git a/hw/bsp/stm32f303disc/board.mk b/hw/bsp/stm32f303disc/board.mk index 8efa5e6ab..76922a46a 100644 --- a/hw/bsp/stm32f303disc/board.mk +++ b/hw/bsp/stm32f303disc/board.mk @@ -12,8 +12,6 @@ CFLAGS += \ # All source paths should be relative to the top level. LD_FILE = hw/bsp/stm32f303disc/STM32F303VCTx_FLASH.ld -LDFLAGS += -mthumb -mcpu=cortex-m4 - SRC_C += \ hw/mcu/st/system-init/system_stm32f3xx.c \ hw/mcu/st/stm32lib/STM32F3xx_HAL_Driver/Src/stm32f3xx_hal.c \ diff --git a/hw/bsp/stm32f407g_disc1/board.mk b/hw/bsp/stm32f407g_disc1/board.mk index 2aa0a7ab1..ab3043a40 100644 --- a/hw/bsp/stm32f407g_disc1/board.mk +++ b/hw/bsp/stm32f407g_disc1/board.mk @@ -12,8 +12,6 @@ CFLAGS += \ # All source paths should be relative to the top level. LD_FILE = hw/bsp/stm32f407g_disc1/STM32F407VGTx_FLASH.ld -LDFLAGS += -mthumb -mcpu=cortex-m4 - SRC_C += \ hw/mcu/st/system-init/system_stm32f4xx.c