rules.ninja (2777B)
1 rule gen 2 command = lua $basedir/setup.lua $gendir 3 generator = 1 4 5 # toolchain 6 rule cc 7 command = $cc -MD -MF $out.d $cflags -c -o $out $in 8 depfile = $out.d 9 deps = gcc 10 description = CC $out 11 12 rule cpp 13 command = $cc -MD -MF $out.d $cflags -E -P -o $out $in 14 depfile = $out.d 15 deps = gcc 16 description = CPP $out 17 18 rule as 19 command = $as $asflags -o $out $in 20 description = AS $out 21 22 rule link 23 command = $cc $ldflags -o $out $in $ldlibs 24 description = LINK $out 25 26 rule ar 27 command = rm -f $out && $ar crs $out $in 28 description = AR $out 29 30 rule ld 31 command = $ld -o $out $in 32 description = LD $out 33 34 rule objcopy 35 command = $objcopy $objcopyflags $in $out 36 37 rule rsp 38 command = ln -f $rspfile $out 39 description = RSP $out 40 rspfile = $out.tmp 41 rspfile_content = $in_newline 42 43 # TODO: Enable dependency-tracking for nasm when 44 # https://bugzilla.nasm.us/show_bug.cgi?id=3392280#c6 is fixed. 45 rule nasm 46 command = nasm $nasmflags -o $out $in 47 48 rule mc 49 command = $mc $mcflags -o $out $in 50 51 rule muse 52 command = muse $museflags -o $out $in 53 54 rule probe 55 command = sh $basedir/scripts/probe.sh $var $out $cc $cflags $ldflags -o /dev/null -x c $in 56 57 rule probe-size 58 command = sh $basedir/scripts/probe-size.sh $var $out $cc $cflags -c -o /dev/null -x c $in 59 60 # misc tools 61 rule touch 62 command = touch $out 63 64 rule empty 65 command = >$out 66 description = EMPTY $out 67 68 rule copy 69 command = ln -f $in $out 70 description = COPY $out 71 72 rule cat 73 command = cat $in >$out 74 75 rule gzip 76 command = gzip -c -9 -n <$in >$out 77 description = GZIP $out 78 79 rule yacc 80 command = yacc $yaccflags $in 81 description = YACC $out 82 83 rule sed 84 command = sed $expr $in >$out 85 description = SED $out 86 87 rule awk 88 command = awk $expr $in >$out 89 description = AWK $out 90 91 rule grep 92 command = grep $expr $in >$out 93 94 rule printf 95 command = printf $args >$out 96 97 rule tic 98 command = tic $ticflags $in 99 100 rule wayland-proto 101 command = wayland-scanner $type <$in >$out 102 103 rule git-hash 104 command = sh $basedir/scripts/hash.sh $repo $args $in >$out 105 description = HASH $args 106 107 rule git-tree 108 command = sh $basedir/scripts/tree.sh $repo $repo_tag $in $out 109 description = TREE $out 110 restat = 1 111 112 rule git-commit 113 command = sh $basedir/scripts/commit.sh $repo $repo_branch $repo_tag $out 114 115 rule git-init 116 command = git init $repo_flags $repo && touch $out 117 118 rule fspec-hash 119 command = $builddir/pkg/devel/fspec-sync/host/fspec-hash <$in >$out 120 121 rule fspec-sort 122 command = $builddir/pkg/devel/fspec-sync/host/fspec-sort -p <$in >$out 123 124 rule fspec-tar 125 command = $builddir/pkg/devel/fspec-sync/host/fspec-tar <$in | zstd >$out 126 127 rule fetch 128 command = cd $basedir && sh $$OLDPWD/$script $gendir && touch $$OLDPWD/$out 129 description = FETCH $gendir 130 restat = 1 131 generator = 1 132 pool = console