-
Notifications
You must be signed in to change notification settings - Fork 123
/
Makefile
41 lines (25 loc) · 872 Bytes
/
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
all: mettle
include make/Makefile.tools
include make/Makefile.common
include make/Makefile.mettle
distclean:
@rm -fr $(BUILD)
clean:
@rm -fr $(BUILD)/mettle
ARCHES := $(shell cat ARCHES)
# Create the individual build/clean/dist-clean rules for each arch...
define rules_for_each_arch
$(strip $(1)).build: $(TOOLS)/musl-cross/.unpacked $(ROOT)/mettle/configure
make TARGET=$(strip $(1))
$(strip $(1)).install:
make TARGET=$(strip $(1)) install
$(strip $(1)).clean:
make TARGET=$(strip $(1)) clean
$(strip $(1)).distclean:
make TARGET=$(strip $(1)) distclean
endef
$(foreach a, $(ARCHES), $(eval $(call rules_for_each_arch, $(strip $(a)))))
all-parallel: $(TOOLS) $(patsubst %,%.build,$(ARCHES))
clean-parallel: $(patsubst %,%.clean,$(ARCHES))
distclean-parallel: $(patsubst %,%.distclean,$(ARCHES))
install-parallel: $(patsubst %,%.install,$(ARCHES))