mirror of
https://github.com/google/liblc3.git
synced 2026-06-01 09:27:01 +00:00
build: Add meson build system
This commit is contained in:
@@ -100,3 +100,15 @@ validated.
|
||||
For more detail on conformance, refer to [_Bluetooth Conformance
|
||||
Documents and scripts_](https://www.bluetooth.com/specifications/specs/low-complexity-communication-codec-1-0/)
|
||||
|
||||
## Meson build system
|
||||
|
||||
Meson build system is also available to build and install lc3 codec in Linux
|
||||
environment.
|
||||
|
||||
```sh
|
||||
$ meson build
|
||||
$ cd build
|
||||
$ ninja
|
||||
$ sudo ninja install
|
||||
```
|
||||
|
||||
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
# Copyright © 2022 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at:
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
project('lc3', 'c',
|
||||
version: '0.1',
|
||||
license: 'Apache-2.0',
|
||||
meson_version: '>= 0.47.0',
|
||||
default_options: ['b_lto=true'])
|
||||
|
||||
add_project_arguments('-ffast-math', language: 'c')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
m_dep = cc.find_library('m', required: false)
|
||||
|
||||
subdir('src')
|
||||
|
||||
if get_option('tools')
|
||||
subdir('tools')
|
||||
endif
|
||||
@@ -0,0 +1,18 @@
|
||||
# Copyright © 2022 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at:
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
option('tools',
|
||||
type: 'boolean',
|
||||
value: false,
|
||||
description: 'Build tools')
|
||||
@@ -0,0 +1,46 @@
|
||||
# Copyright © 2022 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at:
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
inc = include_directories('../include')
|
||||
|
||||
lc3_sources = [
|
||||
'attdet.c',
|
||||
'bits.c',
|
||||
'bwdet.c',
|
||||
'energy.c',
|
||||
'lc3.c',
|
||||
'ltpf.c',
|
||||
'mdct.c',
|
||||
'plc.c',
|
||||
'sns.c',
|
||||
'spec.c',
|
||||
'tables.c',
|
||||
'tns.c'
|
||||
]
|
||||
|
||||
lc3lib = library('lc3',
|
||||
lc3_sources,
|
||||
dependencies: m_dep,
|
||||
include_directories: inc,
|
||||
install: true)
|
||||
|
||||
install_headers('../include/lc3.h', '../include/lc3_private.h')
|
||||
|
||||
pkg_mod = import('pkgconfig')
|
||||
|
||||
pkg_mod.generate(libraries : lc3lib,
|
||||
version : '0.1',
|
||||
name : 'liblc3',
|
||||
filebase : 'lc3',
|
||||
description : 'LC3 codec library')
|
||||
@@ -0,0 +1,25 @@
|
||||
# Copyright © 2022 Intel Corporation
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at:
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
inc = include_directories('../include')
|
||||
|
||||
executable('elc3', ['elc3.c', 'lc3bin.c', 'wave.c'],
|
||||
link_with : lc3lib,
|
||||
include_directories: inc,
|
||||
dependencies: m_dep)
|
||||
|
||||
executable('dlc3', ['dlc3.c', 'lc3bin.c', 'wave.c'],
|
||||
link_with : lc3lib,
|
||||
include_directories: inc,
|
||||
dependencies: m_dep)
|
||||
Reference in New Issue
Block a user