logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

rules.ninja (2800B)


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