diff options
author | Cem Keylan <cem@ckyln.com> | 2021-08-30 11:30:48 +0300 |
---|---|---|
committer | Cem Keylan <cem@ckyln.com> | 2021-08-30 11:30:48 +0300 |
commit | 718d8642f46293da5d182e631d717428c3d6e7e5 (patch) | |
tree | b82ae9b191569214e3b7acae1a2b2f275623d3ca /core/samurai/build | |
parent | c6b37618f5edb567d307a95a07da2a042bc17f02 (diff) | |
download | repository-718d8642f46293da5d182e631d717428c3d6e7e5.tar.gz |
samurai: move to core
Diffstat (limited to 'core/samurai/build')
-rwxr-xr-x | core/samurai/build | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/core/samurai/build b/core/samurai/build new file mode 100755 index 00000000..8503932d --- /dev/null +++ b/core/samurai/build @@ -0,0 +1,21 @@ +#!/bin/sh -e + +export LDFLAGS="$LDFLAGS -static" + +# Samurai is faster than make, so we prefer using it instead if available +if cpt l -q samurai; then + cat - ninja.in <<EOF> build.ninja +destdir = $1 +cc = ${CC:-cc} +cflags = -std=c99 -Wall -Wextra -Wpedantic -Wno-unused-parameter $CFLAGS +ldflags = -static $LDFLAGS +EOF + ninja + ninja install +else + make PREFIX=/usr LDFLAGS="$LDFLAGS" + make PREFIX=/usr DESTDIR="$1" install +fi + +ln -s samu "$1/usr/bin/ninja" +ln -s samu.1 "$1/usr/share/man/man1/ninja.1" |