diff options
Diffstat (limited to 'pkg/tinyalsa/gen.lua')
| -rw-r--r-- | pkg/tinyalsa/gen.lua | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/pkg/tinyalsa/gen.lua b/pkg/tinyalsa/gen.lua new file mode 100644 index 00000000..d1713458 --- /dev/null +++ b/pkg/tinyalsa/gen.lua @@ -0,0 +1,33 @@ +cflags{ + '-std=c99', '-Wall', '-Wpedantic', '-Wno-overflow', + '-D _POSIX_C_SOURCE=201112L', + '-I $srcdir/include', + '-isystem $builddir/pkg/linux-headers/include', +} + +pkg.deps = {'pkg/linux-headers/headers'} + +pkg.hdrs = copy('$outdir/include/tinyalsa', '$srcdir/include/tinyalsa', { + 'attributes.h', + 'pcm.h', + 'mixer.h', + 'asoundlib.h', + 'version.h', +}) + +lib('libtinyalsa.a', [[ + src/( + limits.c + pcm.c + pcm_hw.c + mixer.c + mixer_hw.c + ) +]]) + +for _, tool in ipairs{'tinycap', 'tinymix', 'tinypcminfo', 'tinyplay'} do + file('bin/'..tool, '755', exe(tool, {'utils/'..tool..'.c', 'libtinyalsa.a'})) + man{'$srcdir/utils/'..tool..'.1'} +end + +fetch 'git' |
