gen.lua (1015B)
1 cflags({ 2 '-std=c99', '-Wall', '-Wpedantic', '-Wno-maybe-uninitialized', 3 '-isystem $builddir/pkg/crypt/b3sum/include', 4 }) 5 6 sub('host.ninja', function() 7 set('outdir', '$outdir/host') 8 toolchain(config.host) 9 cflags({'-isystem $builddir/pkg/crypt/b3sum/include'}) 10 11 lib('libcommon.a', {'fatal.c', 'parse.c', 'reallocarray.c'}) 12 exe('fspec-hash', {'fspec-hash.c', 'libcommon.a', '$builddir/pkg/crypt/b3sum/host/libblake3.a'}, {'pkg/crypt/b3sum/headers'}) 13 exe('fspec-sort', {'fspec-sort.c', 'libcommon.a'}) 14 exe('fspec-tar', {'fspec-tar.c', 'libcommon.a'}) 15 end) 16 17 lib('libcommon.a', {'fatal.c', 'parse.c', 'reallocarray.c'}) 18 19 exe('fspec-hash', {'fspec-hash.c', 'libcommon.a', '$builddir/pkg/crypt/b3sum/libblake3.a'}, {'pkg/crypt/b3sum/headers'}) 20 file('bin/fspec-hash', '755', '$outdir/fspec-hash') 21 22 exe('fspec-sort', {'fspec-sort.c', 'libcommon.a'}) 23 file('bin/fspec-sort', '755', '$outdir/fspec-sort') 24 25 exe('fspec-tar', {'fspec-tar.c', 'libcommon.a'}) 26 file('bin/fspec-tar', '755', '$outdir/fspec-tar') 27 28 fetch('git')