forked from steeve/cross-compiler
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Makefile
52 lines (42 loc) · 999 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
# Name of the project.
PROJECT = quasarhq
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 \
linux-arm \
linux-armv7 \
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 $(IMAGE):base .
$(PLATFORMS): base
$(DOCKER) build -t $(IMAGE):$@ -f docker/[email protected] docker
push:
docker tag cross-compiler:$(PLATFORM) $(PROJECT)/cross-compiler:$(PLATFORM)
docker push $(PROJECT)/cross-compiler:$(PLATFORM)
push-all:
for i in $(PLATFORMS); do \
PLATFORM=$$i $(MAKE) push; \
done
pull:
docker pull $(PROJECT)/cross-compiler:$(PLATFORM)
docker tag $(PROJECT)/cross-compiler:$(PLATFORM) cross-compiler:$(PLATFORM)
pull-all:
for i in $(PLATFORMS); do \
PLATFORM=$$i $(MAKE) pull; \
done