aboutsummaryrefslogtreecommitdiff
path: root/core/sinit/build
blob: e51e3f5c366ae873d7266febe7793324cddb0604 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/bin/sh -e

(
    cd sinit
    make CFLAGS="$CFLAGS -static" PREFIX=/usr DESTDIR="$1" install
)
ln -s sinit "$1/usr/bin/init"

install -Dm755 poweroff "$1/usr/bin/poweroff"
install -Dm755 reboot "$1/usr/bin/reboot"

# shellcheck disable=2086
"${CC:-gcc}" -o "$1/usr/bin/kpow" init/bin/kpow.c $CFLAGS -static