forked from freifunkMUC/site-ffm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
72 lines (57 loc) · 1.69 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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
GLUON_BUILD_DIR := gluon-build
GLUON_GIT_URL := https://github.com/freifunk-gluon/gluon.git
GLUON_GIT_REF := 35c9f9aecc5de53324ee61904faa1c5763d61134 # latest v2016.2.x
SECRET_KEY_FILE ?= ${HOME}/.gluon-secret-key
GLUON_TARGETS ?= \
ar71xx-generic \
ar71xx-tiny \
ar71xx-nand \
mpc85xx-generic \
x86-64 \
x86-generic \
x86-geode \
brcm2708-bcm2708 \
brcm2708-bcm2709
GLUON_RELEASE := $(shell git describe --tags 2>/dev/null)
ifneq (,$(shell git describe --exact-match --tags 2>/dev/null))
GLUON_BRANCH := stable
else
GLUON_BRANCH := experimental
endif
JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
GLUON_MAKE := ${MAKE} -j ${JOBS} -C ${GLUON_BUILD_DIR} \
GLUON_RELEASE=${GLUON_RELEASE} \
GLUON_BRANCH=${GLUON_BRANCH} \
GLUON_ATH10K_MESH=ibss
all: info
${MAKE} manifest
info:
@echo
@echo '#########################'
@echo '# FFMUC Firmware build'
@echo '# Building release ${GLUON_RELEASE} for branch ${GLUON_BRANCH}'
@echo
build: gluon-prepare
for target in ${GLUON_TARGETS}; do \
echo ""Building target $$target""; \
${GLUON_MAKE} GLUON_TARGET="$$target"; \
done
manifest: build
${GLUON_MAKE} manifest
mv ${GLUON_BUILD_DIR}/output .
sign: manifest
${GLUON_BUILD_DIR}/contrib/sign.sh ${SECRET_KEY_FILE} output/images/sysupgrade/${GLUON_BRANCH}.manifest
${GLUON_BUILD_DIR}:
git clone ${GLUON_GIT_URL} ${GLUON_BUILD_DIR}
gluon-prepare: output-clean ${GLUON_BUILD_DIR}
(cd ${GLUON_BUILD_DIR} \
&& git remote set-url origin ${GLUON_GIT_URL} \
&& git fetch origin \
&& git checkout -q ${GLUON_GIT_REF})
ln -sfT .. ${GLUON_BUILD_DIR}/site
${GLUON_MAKE} update
gluon-clean:
rm -rf ${GLUON_BUILD_DIR}
output-clean:
rm -rf output
clean: gluon-clean output-clean