-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (27 loc) · 821 Bytes
/
Makefile
File metadata and controls
36 lines (27 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# This file is release support file.
# All projects are build at a time.
SAMPLE_DIRS := src/F4/f401xe/nucleo_f401re\
src/F4/f401xe/nucleo_f411re\
src/F4/f401xe/STM32F4Discovery\
src/F3/f303xc/STM32F3Discovery\
src/F0/f030x8/STM32F0Discovery\
src/F0/f030x8/nucleo_f030r8\
src/L1/l152xe/nucleo_l152re
all:
-@mkdir -p doc/hex
$(foreach exdir,$(SAMPLE_DIRS), $(call def_make,$(exdir) ) )
test:
@echo $(notdir $(SAMPLE_DIRS))
clean:
$(foreach exdir,$(SAMPLE_DIRS), $(call def_clean,$(exdir) ))
# definition loop funciton
DIR_NAME = $(strip $(1))
FNAME = $(notdir $(DIR_NAME))
define def_make
@$(MAKE) -C $(1) clean all
cp $(DIR_NAME)/BINHEX/$(FNAME).hex doc/hex/$(FNAME).hex
cp $(DIR_NAME)/BINHEX/$(FNAME).bin doc/hex/$(FNAME).bin
endef
define def_clean
@$(MAKE) -C $(1) clean
endef