#!/bin/sh
#
# SPDX-FileCopyrightText: 2023 Richard Masters <grick23@gmail.com>
# SPDX-License-Identifier: MIT

set -ex

cd src
tcc -m32 -march=i386 -std=c89 -I../../tcc/tcc-0.9.27/include -o ${BINDIR}/kexec-fiwix kexec-fiwix.c
cd ..

# Checksums
if match x${UPDATE_CHECKSUMS} xTrue; then
    sha256sum -o ${pkg}.checksums \
        /usr/bin/kexec-fiwix

    cp ${pkg}.checksums ${SRCDIR}
else
    sha256sum -c ${pkg}.checksums
fi
