2015-03-03 11:27:16 +01:00
|
|
|
GLUON_BUILD_DIR := gluon-build
|
2015-05-19 14:17:58 +02:00
|
|
|
GLUON_GIT_URL := https://github.com/freifunk-gluon/gluon.git
|
2016-04-16 20:24:00 +02:00
|
|
|
GLUON_GIT_REF := v2016.1.3
|
2015-03-03 11:27:16 +01:00
|
|
|
|
|
|
|
SECRET_KEY_FILE ?= ${HOME}/.gluon-secret-key
|
|
|
|
|
2015-05-19 14:17:58 +02:00
|
|
|
GLUON_TARGETS ?= \
|
|
|
|
ar71xx-generic \
|
|
|
|
ar71xx-nand \
|
|
|
|
x86-kvm_guest
|
|
|
|
|
2015-04-17 14:44:06 +02:00
|
|
|
GLUON_RELEASE := $(shell git describe --tags 2>/dev/null)
|
|
|
|
ifneq (,$(shell git describe --exact-match --tags 2>/dev/null))
|
2015-03-03 11:27:16 +01:00
|
|
|
GLUON_BRANCH := stable
|
|
|
|
else
|
|
|
|
GLUON_BRANCH := experimental
|
|
|
|
endif
|
|
|
|
|
2016-04-16 20:19:22 +02:00
|
|
|
JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
|
2015-05-20 17:16:29 +02:00
|
|
|
|
2015-03-03 11:27:16 +01:00
|
|
|
GLUON_MAKE := ${MAKE} -j ${JOBS} -C ${GLUON_BUILD_DIR} \
|
2015-05-19 14:17:58 +02:00
|
|
|
GLUON_RELEASE=${GLUON_RELEASE} \
|
2016-04-16 20:19:22 +02:00
|
|
|
GLUON_BRANCH=${GLUON_BRANCH}
|
2015-03-03 11:27:16 +01:00
|
|
|
|
2015-04-17 14:47:46 +02:00
|
|
|
all: info
|
2015-03-03 11:27:16 +01:00
|
|
|
${MAKE} manifest
|
2015-05-19 14:17:58 +02:00
|
|
|
|
2015-04-17 14:47:46 +02:00
|
|
|
info:
|
|
|
|
@echo
|
|
|
|
@echo '#########################'
|
|
|
|
@echo '# FFRGB Firmare build'
|
|
|
|
@echo '# Building release ${GLUON_RELEASE} for branch ${GLUON_BRANCH}'
|
2015-05-27 12:19:26 +02:00
|
|
|
@echo '# make params: ${GLUON_MAKE}'
|
2015-05-19 14:17:58 +02:00
|
|
|
@echo
|
|
|
|
|
2015-03-03 11:27:16 +01:00
|
|
|
build: gluon-prepare
|
2015-05-19 14:17:58 +02:00
|
|
|
for target in ${GLUON_TARGETS}; do \
|
|
|
|
echo ""Building target $$target""; \
|
|
|
|
${GLUON_MAKE} GLUON_TARGET="$$target"; \
|
|
|
|
done
|
2015-03-03 11:27:16 +01:00
|
|
|
|
|
|
|
manifest: build
|
|
|
|
${GLUON_MAKE} manifest
|
2016-04-16 20:18:40 +02:00
|
|
|
mv ${GLUON_BUILD_DIR}/output .
|
2015-03-03 11:27:16 +01:00
|
|
|
|
|
|
|
sign: manifest
|
2016-04-16 20:18:40 +02:00
|
|
|
${GLUON_BUILD_DIR}/contrib/sign.sh ${SECRET_KEY_FILE} output/images/sysupgrade/${GLUON_BRANCH}.manifest
|
2015-03-03 11:27:16 +01:00
|
|
|
|
|
|
|
${GLUON_BUILD_DIR}:
|
|
|
|
git clone ${GLUON_GIT_URL} ${GLUON_BUILD_DIR}
|
|
|
|
|
2016-04-16 20:18:40 +02:00
|
|
|
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})
|
2015-03-03 11:27:16 +01:00
|
|
|
ln -sfT .. ${GLUON_BUILD_DIR}/site
|
|
|
|
${GLUON_MAKE} update
|
|
|
|
|
|
|
|
gluon-clean:
|
|
|
|
rm -rf ${GLUON_BUILD_DIR}
|
|
|
|
|
2016-04-16 20:18:40 +02:00
|
|
|
output-clean:
|
|
|
|
rm -rf output
|
2015-03-03 11:27:16 +01:00
|
|
|
|
2016-04-16 20:18:40 +02:00
|
|
|
clean: gluon-clean output-clean
|