generated from freifunk-ruhr/boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
39 lines (36 loc) · 1.1 KB
/
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
CONFIG_REPOSITORY ?= https://gitea.indie-freifunk.net/oszilloskop/site-ffffm.git
CONFIG_BRANCH ?= top
GLUON_VERSION ?= master
GLUON_CORES ?= 1
GLUON_DEBUG ?= 0
DOCKER_IMAGE_VERSION ?= latest
DOCKER_IMAGE = docker.pkg.github.com/freifunk-ruhr/ff-firmware-automation/build:${DOCKER_IMAGE_VERSION}
BUILD_TARGETS ?= ar71xx-generic \
ar71xx-tiny \
ar71xx-nand \
ath79-generic \
brcm2708-bcm2708 \
brcm2708-bcm2709 \
ipq40xx-generic \
ipq806x-generic \
lantiq-xrx200 \
lantiq-xway \
mpc85xx-generic \
mpc85xx-p1020 \
ramips-mt7620 \
ramips-mt7621 \
ramips-mt76x8 \
ramips-rt305x \
sunxi-cortexa7 \
x86-generic \
x86-geode \
x86-64
.PHONY: build-container
build-container:
docker build . -t ${DOCKER_IMAGE}
.PHONY: clone-config
clone-config:
git clone ${CONFIG_REPOSITORY} -b ${CONFIG_BRANCH} site
.PHONY: build-targets
build-targets:
$(foreach target,$(BUILD_TARGETS),docker run --rm --cpus=${GLUON_CORES} -e GLUON_DEBUG=${GLUON_DEBUG} -e GLUON_CORES=${GLUON_CORES} -e GLUON_VERSION=${GLUON_VERSION} -e GLUON_TARGET=$(target) -v ${PWD}/output:/app/gluon/output -v ${PWD}/site:/app/site ${DOCKER_IMAGE};)