forked from betaflight/betaflight
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtop_makefile
62 lines (50 loc) · 1.8 KB
/
top_makefile
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
ALL_TARGETS := naze
ALL_TARGETS += cc3d
ALL_TARGETS += cc3d_opbl
ALL_TARGETS += spracingf3
ALL_TARGETS += spracingf3mini
ALL_TARGETS += sparky
ALL_TARGETS += alienflightf1
ALL_TARGETS += alienflightf3
ALL_TARGETS += colibri_race
ALL_TARGETS += lux_race
ALL_TARGETS += motolab
ALL_TARGETS += rmdo
ALL_TARGETS += ircfusionf3
ALL_TARGETS += afromini
CLEAN_TARGETS := $(addprefix clean_, $(ALL_TARGETS))
clean_naze naze : opts := TARGET=NAZE
clean_cc3d cc3d: opts := TARGET=CC3D
clean_cc3d_opbl cc3d_opbl : opts := TARGET=CC3D_OPBL
clean_spracingf3mini spracingf3mini : opts := TARGET=SPRACINGF3MINI
clean_spracingf3 spracingf3 : opts := TARGET=SPRACINGF3
clean_sparky sparky : opts := TARGET=SPARKY
clean_alienflightf1 alienflightf1 : opts := TARGET=ALIENFLIGHTF1
clean_alienflightf3 alienflightf3 : opts := TARGET=ALIENFLIGHTF3
clean_colibri_race colibri_race : opts := TARGET=COLIBRI_RACE
clean_lux_race lux_race : opts := TARGET=LUX_RACE
clean_motolab motolab : opts := TARGET=MOTOLAB
clean_rmdo rmdo : opts := TARGET=RMDO
clean_ircfusionf3 ircfusionf3 : opts := TARGET=IRCFUSIONF3
clean_afromini afromini : opts := TARGET=AFROMINI
.PHONY: all clean
all: everything
clean: clean_everything
.PHONY: clean_everything
clean_everything: $(CLEAN_TARGETS)
.PHONY: everything
everything: $(ALL_TARGETS)
.PHONY:$(ALL_TARGETS)
$(ALL_TARGETS):
make -f Makefile $(opts)
.PHONY: $(CLEAN_TARGETS)
$(CLEAN_TARGETS):
make -f Makefile clean $(opts)
.PHONY: help
help:
@echo "This is your new top makefile. synopsis: make <target>" .
@echo "Valid targets":
@echo "all"
@echo "clean"
@echo "$(ALL_TARGETS)"
@echo "$(CLEAN_TARGETS)"