site-ffrgb-dev/Makefile

92 lines
2.0 KiB
Makefile
Raw Normal View History

GLUON_BUILD_DIR ?= gluon-build
GLUON_GIT_URL ?= https://github.com/freifunk-gluon/gluon
GLUON_GIT_REF ?= 2ce07ae2fe251bcf8a424dc39aba8da1df7f164d
2015-12-18 17:10:01 +01:00
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 ?= \
2018-02-04 02:08:52 +01:00
ar71xx-generic \
2018-01-21 17:27:18 +01:00
ar71xx-tiny \
2018-01-17 01:32:43 +01:00
ar71xx-nand \
ipq40xx \
ipq806x \
2018-01-17 01:32:43 +01:00
brcm2708-bcm2708 \
brcm2708-bcm2709 \
brcm2708-bcm2710 \
pc85xx-generic \
ramips-mt7620 \
2018-01-17 01:32:43 +01:00
ramips-mt7621 \
ramips-mt76x8 \
2018-01-17 01:32:43 +01:00
ramips-rt305x \
x86-64 \
x86-generic \
x86-geode \
sunxi-cortexa7
2015-05-19 14:17:58 +02:00
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
JOBS ?= $(shell cat /proc/cpuinfo | grep processor | wc -l)
#JOBS = 1
2015-11-22 18:13:58 +01:00
2018-07-10 00:14:58 +02:00
GLUON_MAKE := ${MAKE} BROKEN=0 -j ${JOBS} -C ${GLUON_BUILD_DIR} \
2015-05-19 14:17:58 +02:00
GLUON_RELEASE=${GLUON_RELEASE} \
2015-05-27 12:24:50 +02:00
GLUON_BRANCH=${GLUON_BRANCH} \
2015-03-03 11:27:16 +01:00
2016-07-27 14:08:03 +02: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
buildonly:
2015-12-30 18:25:55 +01:00
for target in ${GLUON_TARGETS}; do \
2015-12-18 16:52:02 +01:00
echo ""Building target $$target""; \
${GLUON_MAKE} GLUON_TARGET="$$target"; \
2015-12-30 18:25:55 +01:00
done
2015-12-18 16:52:02 +01:00
2015-03-03 11:27:16 +01:00
manifest: build
${GLUON_MAKE} manifest
mv ${GLUON_BUILD_DIR}/output .
2015-03-03 11:27:16 +01:00
sign: manifest
${GLUON_BUILD_DIR}/contrib/sign.sh ${SECRET_KEY_FILE} images/sysupgrade/${GLUON_BRANCH}.manifest
${GLUON_BUILD_DIR}:
git clone ${GLUON_GIT_URL} ${GLUON_BUILD_DIR}
gluon-prepare: images-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}
images-clean:
rm -rf images
clean: gluon-clean images-clean