forked from scakemyer/cross-compiler
-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathMakefile
executable file
·55 lines (44 loc) · 995 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
# Name of the project.
PROJECT = elementumorg
IMAGE = cross-compiler
# Set binaries and platform specific variables.
DOCKER = docker
# Platforms on which we want to build the project.
PLATFORMS = \
android-arm \
android-arm64 \
android-x64 \
android-x86 \
darwin-x64 \
darwin-x86 \
linux-armv6 \
linux-armv7 \
linux-armv7_softfp \
linux-arm64 \
linux-x64 \
linux-x86 \
windows-x64 \
windows-x86
.PHONY: $(PLATFORMS)
all:
for i in $(PLATFORMS); do \
$(MAKE) $$i; \
done
base:
$(DOCKER) build -t $(PROJECT)/$(IMAGE):base -f debian.Dockerfile .
musl:
$(DOCKER) build -t $(PROJECT)/$(IMAGE):musl -f musl.Dockerfile .
$(PLATFORMS): base musl
$(DOCKER) build -t $(PROJECT)/$(IMAGE):$@ -f docker/[email protected] docker
push:
docker push $(PROJECT)/$(IMAGE):$(PLATFORM)
push-all:
for i in $(PLATFORMS); do \
PLATFORM=$$i $(MAKE) push; \
done
pull:
docker pull $(PROJECT)/$(IMAGE):$(PLATFORM)
pull-all:
for i in $(PLATFORMS); do \
PLATFORM=$$i $(MAKE) pull; \
done