Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use individual board makefiles #94

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Makefile: Use board makefiles
GrantM11235 committed May 7, 2020

Verified

This commit was signed with the committer’s verified signature. The key has expired.
michel-slm Michel Lind
commit 93bf94ed3f2b73323e1388187b42c346159186e6
19 changes: 17 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -12,6 +12,7 @@ THUMB_IW = -mthumb-interwork
# Target file name (without extension).
BUILDDIR = build
BINDIR = bootloader_only_binaries
BOARDSDIR = boards
TARGET = $(BUILDDIR)/maple_boot

ST_LIB = stm32_lib
@@ -112,8 +113,22 @@ LST = $(patsubst %, $(BUILDDIR)/%,$(_LST))
HEXSIZE = $(SIZE) --target=binary $(TARGET).hex
ELFSIZE = $(SIZE) -A $(TARGET).elf

BOARDS = $(notdir $(basename $(wildcard $(BOARDSDIR)/*.mk)))

# If $(MAKECMDGOALS) is in the list of $(BOARDS):
ifneq ($(filter $(MAKECMDGOALS),$(BOARDS)),)
include $(BOARDSDIR)/$(MAKECMDGOALS).mk
BINFILE = $(MAKECMDGOALS).bin
endif

# go!
all: begin gccversion build sizeafter finished end
all:
set -e ;\
for board in $(BOARDS) ; do \
make $$board ;\
done

$(BOARDS): begin clean gccversion build sizeafter finished copy end

maple-mini: begin clean gccversion build_maple-mini sizeafter finished copy_maple_mini end
maple-rev3: begin clean gccversion build_maple-rev3 sizeafter finished copy_maple-rev3 end
@@ -413,7 +428,7 @@ clean_list :

# Listing of phony targets.
.PHONY : all begin finish tags end sizeafter gccversion \
build elf hex bin lss sym copy clean clean_list program cscope
build elf hex bin lss sym copy clean clean_list program cscope $(BOARDS)

cscope:
rm -rf *.cscope
1 change: 1 addition & 0 deletions boards/cc3d.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_CC3D
1 change: 1 addition & 0 deletions boards/dso138_boot20.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_DSO138
1 change: 1 addition & 0 deletions boards/gd32f1_frankenmaple.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GD32F1_FRANKENMAPLE
1 change: 1 addition & 0 deletions boards/gd32f1_generic_boot20_pc13.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GD32F1_GENERIC_F103_PC13
1 change: 1 addition & 0 deletions boards/generic-none_bootloader.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_NONE
1 change: 1 addition & 0 deletions boards/generic_boot20_hytiny.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_HYTINY_STM32F103T
1 change: 1 addition & 0 deletions boards/generic_boot20_pa1.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PA1
1 change: 1 addition & 0 deletions boards/generic_boot20_pa1_button_pa8.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PA1_BUTTON_PA8
1 change: 1 addition & 0 deletions boards/generic_boot20_pa9.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PA9
1 change: 1 addition & 0 deletions boards/generic_boot20_pb0.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PB0
1 change: 1 addition & 0 deletions boards/generic_boot20_pb12.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PB12
1 change: 1 addition & 0 deletions boards/generic_boot20_pb7.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PB7
1 change: 1 addition & 0 deletions boards/generic_boot20_pb9.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PB9
1 change: 1 addition & 0 deletions boards/generic_boot20_pc13.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PC13
1 change: 1 addition & 0 deletions boards/generic_boot20_pc13_fastboot.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PC13_FASTBOOT
1 change: 1 addition & 0 deletions boards/generic_boot20_pd1.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PD1
1 change: 1 addition & 0 deletions boards/generic_boot20_pd2.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PD2
1 change: 1 addition & 0 deletions boards/generic_boot20_pe2.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PE2
1 change: 1 addition & 0 deletions boards/generic_boot20_pe5.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PE5
1 change: 1 addition & 0 deletions boards/generic_boot20_pe5_button_pa0.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PE5_BUTTON_PA0
1 change: 1 addition & 0 deletions boards/generic_boot20_pg15.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_GENERIC_F103_PG15
1 change: 1 addition & 0 deletions boards/maple_mini_boot20.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_MAPLE_MINI
1 change: 1 addition & 0 deletions boards/maple_rev3_boot20.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_MAPLE_REV3
1 change: 1 addition & 0 deletions boards/maple_rev5_boot20.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_MAPLE_REV5
1 change: 1 addition & 0 deletions boards/naze32_boot20.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_NAZE32
1 change: 1 addition & 0 deletions boards/smart-v2.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_STM32_SMART_V20
1 change: 1 addition & 0 deletions boards/stbee_boot20.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CFLAGS += -DTARGET_STBEE
27 changes: 0 additions & 27 deletions make_all.bat

This file was deleted.