SHELL:=/bin/bash | SHELL:=/bin/bash | ||||
build: | |||||
.PHONY: help | |||||
help: # with thanks to Ben Rady | |||||
@grep -E '^[0-9a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' | |||||
build: ## build all packages | |||||
# Screw gocd, let's go with a simple build script for now | # Screw gocd, let's go with a simple build script for now | ||||
# for dir in */; do \ | # for dir in */; do \ | ||||
# if [ -f "$$dir/Makefile" ]; then \ | # if [ -f "$$dir/Makefile" ]; then \ | ||||
make -C tvision build | make -C tvision build | ||||
make -C v8pp build | make -C v8pp build | ||||
make -C vivid build | make -C vivid build | ||||
make -C starcry build | |||||
make -C msxsaver | |||||
prepare: | |||||
prepare: ## prepare and publish build container | |||||
sudo chown trigen:trigen . -R | |||||
make ubuntu2404 | make ubuntu2404 | ||||
make ubuntu2404publish | make ubuntu2404publish | ||||
publish: | |||||
publish: ## publish build deb packages | |||||
. env.sh; make -C apt-publisher build | . env.sh; make -C apt-publisher build | ||||
ubuntu1804: | ubuntu1804: |
. ../.env; make apt-ubuntu2404-pt2 | . ../.env; make apt-ubuntu2404-pt2 | ||||
apt-ubuntu1804: | apt-ubuntu1804: | ||||
wget $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
wget -c $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
tar -zxvf *secret.tar.gz | tar -zxvf *secret.tar.gz | ||||
make prepare-packages-ubuntu1804 | make prepare-packages-ubuntu1804 | ||||
make update-packages-ubuntu1804 | make update-packages-ubuntu1804 | ||||
apt-ubuntu2004: | apt-ubuntu2004: | ||||
wget $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
wget -c $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
tar -zxvf *secret.tar.gz | tar -zxvf *secret.tar.gz | ||||
make prepare-packages-ubuntu2004 | make prepare-packages-ubuntu2004 | ||||
make update-packages-ubuntu2004 | make update-packages-ubuntu2004 | ||||
bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | bash ../ubuntu2004.sh chown $$(id -u):$$(id -g) . -R # fix permissions | ||||
apt-ubuntu2204: | apt-ubuntu2204: | ||||
wget $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
wget -c $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
tar -zxvf *secret.tar.gz | tar -zxvf *secret.tar.gz | ||||
make prepare-packages-ubuntu2204 | make prepare-packages-ubuntu2204 | ||||
make update-packages-ubuntu2204 | make update-packages-ubuntu2204 | ||||
bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions | bash ../ubuntu2204.sh chown $$(id -u):$$(id -g) . -R # fix permissions | ||||
apt-ubuntu2404: | apt-ubuntu2404: | ||||
wget $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
wget -c $$SECRET_URL 1>/dev/null 2>/dev/null | |||||
tar -zxvf *secret.tar.gz | tar -zxvf *secret.tar.gz | ||||
make prepare-packages-ubuntu2404 | make prepare-packages-ubuntu2404 | ||||
make update-packages-ubuntu2404 | make update-packages-ubuntu2404 | ||||
prepare-packages-ubuntu2404: | prepare-packages-ubuntu2404: | ||||
mkdir -p packages | mkdir -p packages | ||||
# TODO: fix ../msxsaver/cppse-msxsaver_*.deb | |||||
# TODO: fix ../msxsaver/cppse-msxsaver_*.deb | |||||
cp -prv ../ffmpeg/cppse-ffmpeg_*.deb \ | cp -prv ../ffmpeg/cppse-ffmpeg_*.deb \ | ||||
../v8pp/cppse-v8_*_amd64.deb \ | ../v8pp/cppse-v8_*_amd64.deb \ | ||||
../allegro5/cppse-allegro5_*.deb \ | ../allegro5/cppse-allegro5_*.deb \ | ||||
../vivid/cppse-vivid_*.deb \ | ../vivid/cppse-vivid_*.deb \ | ||||
../inotify-cpp/cppse-inotify-cpp_*.deb \ | ../inotify-cpp/cppse-inotify-cpp_*.deb \ | ||||
../redis-plus-plus/cppse-redis-plus-plus_*.deb \ | ../redis-plus-plus/cppse-redis-plus-plus_*.deb \ | ||||
../msxsaver/msxsaver_*.deb \ | |||||
packages/ | packages/ | ||||
docker-ubuntu1804: | docker-ubuntu1804: |
SHELL:=/bin/bash | |||||
VERSION:=1.0 | |||||
build: msxsaver_$(VERSION)_amd64.deb | |||||
msxsaver_$(VERSION)_amd64.deb: | |||||
make ubuntu2404 | |||||
ubuntu2404: | |||||
git clone --recursive https://github.com/rayburgemeestre/msxsaver || true | |||||
pushd msxsaver && \ | |||||
git pull --rebase && \ | |||||
make build && \ | |||||
cp -prv msxsaver_1.0_amd64.deb ../ && \ | |||||
popd | |||||
clean: | |||||
rm -rf msxsaver |
SHELL:=/bin/bash | |||||
VERSION:=0.1.0 | |||||
build: cppse-starcry_$(VERSION)_amd64.deb | |||||
cppse-starcry_$(VERSION)_amd64.deb: | |||||
make ubuntu2404 | |||||
ubuntu2404: | |||||
git clone --recursive https://github.com/rayburgemeestre/starcry || true | |||||
pushd starcry && \ | |||||
git pull --rebase && \ | |||||
make clean && \ | |||||
make all && \ | |||||
make build-image && \ | |||||
make docs || true && \ | |||||
make docs || true && \ | |||||
make dockerize && \ | |||||
make push && \ | |||||
docker push docker.io/rayburgemeestre/build-starcry-ubuntu:24.04 && \ | |||||
popd | |||||
clean: | |||||
rm -rf starcry |
set +e | set +e | ||||
set -o pipefail | set -o pipefail | ||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-15 40 > /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-15 40 >> /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-15 40 >> /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-15 40 >> /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-15 40 >> /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/c++ c++ /usr/bin/clang++-19 40 > /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/cc cc /usr/bin/clang-19 40 >> /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/clang++ clang++ /usr/bin/clang++-19 40 >> /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/clang clang /usr/bin/clang-19 40 >> /tmp/.switch-to-clang.stdout | |||||
update-alternatives --install /usr/bin/ld ld /usr/bin/ld.lld-19 40 >> /tmp/.switch-to-clang.stdout | |||||
echo compiler set to: $(readlink /etc/alternatives/c++) | echo compiler set to: $(readlink /etc/alternatives/c++) |