opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

gen.lua (703B)


      1 cflags({
      2 	'-std=c99', '-Wall', '-Wpedantic',
      3 	'-D WITH_ASM',
      4 })
      5 
      6 pkg.hdrs = {
      7 	copy('$outdir/include', '$srcdir', {'blake3.h'}),
      8 	install=true,
      9 }
     10 
     11 sub('host.ninja', function()
     12 	set('outdir', '$outdir/host')
     13 	toolchain(config.host)
     14 
     15 	lib('libblake3.a', {'blake3.c', 'blake3_dispatch.c', 'blake3_portable.c'})
     16 end)
     17 
     18 lib('libblake3.a', [[
     19 	blake3.c
     20 	blake3_dispatch.c
     21 	blake3_portable.c
     22 	@x86_64 (
     23 		blake3_cpuid.S
     24 		blake3_avx2_x86-64_unix.S
     25 		blake3_avx512_x86-64_unix.S
     26 		blake3_sse2_x86-64_unix.S
     27 		blake3_sse41_x86-64_unix.S
     28 	)
     29 ]])
     30 file('lib/libblake3.a', '644', '$outdir/libblake3.a')
     31 
     32 exe('b3sum', {'b3sum.c', 'libblake3.a'})
     33 file('bin/b3sum', '755', '$outdir/b3sum')
     34 man({'b3sum.1'})
     35 
     36 fetch('git')