From 1e69f4893643d020b3e28835fb1806cbaa02aa45 Mon Sep 17 00:00:00 2001 From: Max Audron Date: Sat, 13 Feb 2021 16:09:43 +0100 Subject: [PATCH] add meson build files build common, cdbus, alsapid, and proxies as static libraries. daemon aka ladishd links to them at build time. --- alsapid/meson.build | 8 +++++ cdbus/meson.build | 12 ++++++++ common/meson.build | 11 +++++++ daemon/meson.build | 55 +++++++++++++++++++++++++++++++++++ meson.build | 71 +++++++++++++++++++++++++++++++++++++++++++++ proxies/meson.build | 18 ++++++++++++ 6 files changed, 175 insertions(+) create mode 100644 alsapid/meson.build create mode 100644 cdbus/meson.build create mode 100644 common/meson.build create mode 100644 daemon/meson.build create mode 100644 meson.build create mode 100644 proxies/meson.build diff --git a/alsapid/meson.build b/alsapid/meson.build new file mode 100644 index 00000000..b97ccb1a --- /dev/null +++ b/alsapid/meson.build @@ -0,0 +1,8 @@ +alsapid_sources = [ + 'helper.c', + 'lib.c', +] + +alsapidlib = static_library('alsapid', alsapid_sources, + include_directories : inc, + install : false) diff --git a/cdbus/meson.build b/cdbus/meson.build new file mode 100644 index 00000000..0ebda0c1 --- /dev/null +++ b/cdbus/meson.build @@ -0,0 +1,12 @@ +cdbus_sources = [ + 'helpers.c', + 'interface.c', + 'method.c', + 'object_path.c', + 'signal.c', +] + +cdbuslib = static_library('cdbus', cdbus_sources, + include_directories : inc, + dependencies : dbus_dep, + install : false) diff --git a/common/meson.build b/common/meson.build new file mode 100644 index 00000000..8ff41b84 --- /dev/null +++ b/common/meson.build @@ -0,0 +1,11 @@ +common_sources = [ + 'catdup.c', + 'dirhelpers.c', + 'file.c', + 'log.c', + 'time.c', +] + +commonlib = static_library('common', common_sources, + include_directories : inc, + install : false) diff --git a/daemon/meson.build b/daemon/meson.build new file mode 100644 index 00000000..d2e9d0bf --- /dev/null +++ b/daemon/meson.build @@ -0,0 +1,55 @@ +daemon_sources = [ + 'appdb.c', + 'app_supervisor.c', + 'check_integrity.c', + 'client.c', + 'cmd_change_app_state.c', + 'cmd_create_room.c', + 'cmd_delete_room.c', + 'cmd_exit.c', + 'cmd_load_project.c', + 'cmd_load_studio.c', + 'cmd_new_app.c', + 'cmd_new_studio.c', + 'cmd_remove_app.c', + 'cmd_rename_studio.c', + 'cmd_save_project.c', + 'cmd_save_studio.c', + 'cmd_start_studio.c', + 'cmd_stop_studio.c', + 'cmd_unload_project.c', + 'cmd_unload_studio.c', + 'control.c', + 'cqueue.c', + 'dict.c', + 'escape.c', + 'graph.c', + 'graph_dict.c', + 'graph_manager.c', + 'jack_session.c', + 'lash_server.c', + 'load.c', + 'loader.c', + 'main.c', + 'port.c', + 'procfs.c', + 'proctitle.c', + 'recent_projects.c', + 'recent_store.c', + 'room.c', + 'room_load.c', + 'room_save.c', + 'save.c', + 'siginfo.c', + 'studio.c', + 'studio_jack_conf.c', + 'studio_list.c', + 'virtualizer.c', + '../string_constants.c', +] + +ladishd = executable('ladishd', daemon_sources, + dependencies : deps, + include_directories : inc, + link_with : [commonlib, cdbuslib, proxieslib, alsapidlib], + install : true) diff --git a/meson.build b/meson.build new file mode 100644 index 00000000..81f333e3 --- /dev/null +++ b/meson.build @@ -0,0 +1,71 @@ +project('ladish', 'c', + version : '0.3', + license : 'MIT') + +data_dir = get_option('prefix') / 'share' / 'ladish' +locale_dir = get_option('prefix') / 'share' / 'locale' +dbus_name_base = 'org.ladish' +dbus_base_path = '/org/ladish' + +git_version = run_command(['git', 'rev-parse', '--short', 'HEAD']).stdout().strip() + +run_command(['touch', 'build/version.h', 'build/config.h']) + +configure_file(output : 'version.h', + configuration : { + 'GIT_VERSION' : '"@0@"'.format(git_version) + } +) + +configure_file(output : 'config.h', + configuration : { + 'PACKAGE_VERSION' : '"@0@"'.format(meson.project_version()), + 'BASE_NAME' : '"@0@"'.format(meson.project_name()), + 'DATA_DIR' : '"@0@"'.format(data_dir), + 'LOCALE_DIR' : '"@0@"'.format(locale_dir), + 'DBUS_NAME_BASE' : '"@0@"'.format(dbus_name_base), + 'DBUS_BASE_PATH' : '"@0@"'.format(dbus_base_path), + '_GNU_SOURCE' : 1, + } +) + +cc = meson.get_compiler('c') + +inc = include_directories('build') +lash_inc = include_directories('lash_compat/liblash') + +dbus_dep = dependency('dbus-1') +jack_dep = dependency('jack') + +deps = [ + cc.find_library('dl'), + cc.find_library('util'), + dbus_dep, + jack_dep, + dependency('alsa'), + dependency('uuid'), + dependency('expat') +] + +subdir('common') +subdir('proxies') +subdir('cdbus') +subdir('alsapid') + +# ladishd +subdir('daemon') + +install_data(['AUTHORS', 'README', 'NEWS'], install_dir : data_dir) + +install_data('ladish_control', + install_dir : get_option('prefix') / 'bin') + +jmcore = executable('jmcore', 'jmcore.c', + dependencies : deps, + link_with : [commonlib, cdbuslib], + install : true) + +ladiconfd = executable('ladiconfd', 'conf.c', + dependencies : deps, + link_with : [commonlib, cdbuslib], + install : true) diff --git a/proxies/meson.build b/proxies/meson.build new file mode 100644 index 00000000..aef9f92b --- /dev/null +++ b/proxies/meson.build @@ -0,0 +1,18 @@ +proxies_sources = [ + 'a2j_proxy.c', + 'app_supervisor_proxy.c', + 'conf_proxy.c', + 'control_proxy.c', + 'graph_proxy.c', + 'jack_proxy.c', + 'jmcore_proxy.c', + 'lash_client_proxy.c', + 'notify_proxy.c', + 'room_proxy.c', + 'studio_proxy.c', +] + +proxieslib = static_library('proxies', proxies_sources, + include_directories : inc, + dependencies : dbus_dep, + install : false)