Skip to content

Commit

Permalink
MLAgent: Change the name of ML-Agent
Browse files Browse the repository at this point in the history
This patch changes the name of ML-Agent from ml-agentd to ml-agent.

Signed-off-by: Wook Song <[email protected]>
  • Loading branch information
wooksong committed Oct 13, 2023
1 parent 2eac2ba commit 6b6c726
Show file tree
Hide file tree
Showing 8 changed files with 67 additions and 67 deletions.
10 changes: 5 additions & 5 deletions c/src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -102,27 +102,27 @@ nns_capi_dep = declare_dependency(link_with: nns_capi_lib,

# Service API
if get_option('enable-ml-service')
ml_service_deps = [nns_capi_dep, ml_agentd_deps]
ml_service_deps = [nns_capi_dep, ml_agent_deps]
if support_remote_service
ml_service_deps += [nnstreamer_edge_dep, curl_dep]
endif

nns_capi_service_shared_lib = shared_library ('capi-ml-service',
nns_capi_service_srcs,
dependencies: ml_service_deps,
include_directories: [nns_capi_include, ml_agentd_incs],
include_directories: [nns_capi_include, ml_agent_incs],
install: true,
install_dir: api_install_libdir,
link_with: ml_agentd_lib,
link_with: ml_agent_lib,
version: api_version,
)

nns_capi_service_static_lib = static_library ('capi-ml-service',
nns_capi_service_srcs,
dependencies: ml_service_deps,
include_directories: [nns_capi_include, ml_agentd_incs],
include_directories: [nns_capi_include, ml_agent_incs],
install: true,
link_with: ml_agentd_lib,
link_with: ml_agent_lib,
install_dir: api_install_libdir,
)

Expand Down
2 changes: 1 addition & 1 deletion daemon/include/meson.build
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ml_agentd_headers = files('ml-agent-interface.h')
ml_agent_headers = files('ml-agent-interface.h')
80 changes: 40 additions & 40 deletions daemon/meson.build
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Machine Learning Agent
# This file should be included when ml-service feature is enabled.
ml_agentd_incs = include_directories('.', 'include')
ml_agentd_lib_common_srcs = files('modules.c', 'gdbus-util.c', 'ml-agent-interface.c',
ml_agent_incs = include_directories('.', 'include')
ml_agent_lib_common_srcs = files('modules.c', 'gdbus-util.c', 'ml-agent-interface.c',
'pipeline-dbus-impl.cc', 'model-dbus-impl.cc', 'resource-dbus-impl.cc')
ml_agentd_lib_service_db_srcs = files('service-db.cc')
ml_agent_lib_service_db_srcs = files('service-db.cc')

if (get_option('enable-tizen'))
ml_agentd_lib_common_srcs += files('pkg-mgr.cc')
ml_agent_lib_common_srcs += files('pkg-mgr.cc')
endif

# Generate GDbus header and code
Expand Down Expand Up @@ -38,7 +38,7 @@ gdbus_gen_resource_src = custom_target('gdbus-resource-gencode',
gdbus_gen_header_dep = declare_dependency(
sources: [gdbus_gen_pipeline_src, gdbus_gen_model_src, gdbus_gen_resource_src])

ml_agentd_deps = [
ml_agent_deps = [
gdbus_gen_header_dep,
glib_dep,
gio_dep,
Expand All @@ -49,7 +49,7 @@ ml_agentd_deps = [
]

if (get_option('enable-tizen'))
ml_agentd_deps += [
ml_agent_deps += [
dependency('capi-appfw-app-common'),
dependency('capi-appfw-package-manager'),
dependency('dlog')
Expand All @@ -62,66 +62,66 @@ daemon_cpp_db_path_arg = '-DDB_PATH="' + serviceDBPath + '"'
serviceDBKeyPrefix = get_option('service-db-key-prefix')
daemon_cpp_db_key_prefix_arg = '-DMESON_KEY_PREFIX="' + serviceDBKeyPrefix + '"'

ml_agentd_lib_srcs = [ml_agentd_lib_common_srcs, ml_agentd_lib_service_db_srcs]
ml_agentd_shared_lib = shared_library ('ml-agentd',
ml_agentd_lib_srcs,
dependencies: ml_agentd_deps,
include_directories: ml_agentd_incs,
ml_agent_lib_srcs = [ml_agent_lib_common_srcs, ml_agent_lib_service_db_srcs]
ml_agent_shared_lib = shared_library ('ml-agent',
ml_agent_lib_srcs,
dependencies: ml_agent_deps,
include_directories: ml_agent_incs,
install: true,
install_dir: api_install_libdir,
cpp_args: [daemon_cpp_db_path_arg, daemon_cpp_db_key_prefix_arg],
version: api_version,
)
ml_agentd_static_lib = static_library('ml-agentd',
ml_agentd_lib_srcs,
dependencies: ml_agentd_deps,
include_directories: ml_agentd_incs,
ml_agent_static_lib = static_library('ml-agent',
ml_agent_lib_srcs,
dependencies: ml_agent_deps,
include_directories: ml_agent_incs,
install: true,
install_dir: api_install_libdir,
cpp_args: [daemon_cpp_db_path_arg, daemon_cpp_db_key_prefix_arg],
pic: true,
)

ml_agentd_lib = ml_agentd_shared_lib
ml_agent_lib = ml_agent_shared_lib
if get_option('default_library') == 'static'
ml_agentd_lib = ml_agentd_static_lib
ml_agent_lib = ml_agent_static_lib
endif

ml_agentd_lib_common_objs = ml_agentd_shared_lib.extract_objects(ml_agentd_lib_common_srcs)
ml_agentd_test_both_lib = both_libraries('ml-agentd-test',
ml_agentd_lib_service_db_srcs,
dependencies: ml_agentd_deps,
include_directories: ml_agentd_incs,
ml_agent_lib_common_objs = ml_agent_shared_lib.extract_objects(ml_agent_lib_common_srcs)
ml_agent_test_both_lib = both_libraries('ml-agent-test',
ml_agent_lib_service_db_srcs,
dependencies: ml_agent_deps,
include_directories: ml_agent_incs,
install: get_option('install-test'),
install_dir: api_install_libdir,
cpp_args: ['-DDB_PATH="."', daemon_cpp_db_key_prefix_arg],
objects: ml_agentd_lib_common_objs,
objects: ml_agent_lib_common_objs,
version: api_version,
pic: true,
)

ml_agentd_test_lib = ml_agentd_test_both_lib.get_shared_lib()
ml_agent_test_lib = ml_agent_test_both_lib.get_shared_lib()
if get_option('default_library') == 'static'
ml_agentd_test_lib = ml_agentd_test_both_lib.get_static_lib()
ml_agent_test_lib = ml_agent_test_both_lib.get_static_lib()
endif

lib_ml_agentd_test_dep = declare_dependency(
dependencies: ml_agentd_deps,
include_directories: ml_agentd_incs,
link_with: ml_agentd_test_lib,
lib_ml_agent_test_dep = declare_dependency(
dependencies: ml_agent_deps,
include_directories: ml_agent_incs,
link_with: ml_agent_test_lib,
)

subdir('include')
install_headers(ml_agentd_headers,
subdir: 'ml-agentd'
install_headers(ml_agent_headers,
subdir: 'ml-agent'
)

ml_agentd_main_file = files('main.c')
ml_agent_main_file = files('main.c')
ml_agent_executable = executable('machine-learning-agent',
ml_agentd_main_file,
link_with: ml_agentd_lib,
dependencies: ml_agentd_deps,
include_directories: ml_agentd_incs,
ml_agent_main_file,
link_with: ml_agent_lib,
dependencies: ml_agent_deps,
include_directories: ml_agent_incs,
install: true,
install_dir: api_install_bindir,
pie: true
Expand Down Expand Up @@ -151,9 +151,9 @@ configure_file(input: '../dbus/machine-learning-agent.service.in',
configuration: systemd_conf
)

ml_agentd_conf = configuration_data()
ml_agentd_conf.merge_from(api_conf)
configure_file(input: 'ml-agentd.pc.in', output: 'ml-agentd.pc',
ml_agent_conf = configuration_data()
ml_agent_conf.merge_from(api_conf)
configure_file(input: 'ml-agent.pc.in', output: 'ml-agent.pc',
install_dir: join_paths(api_install_libdir, 'pkgconfig'),
configuration: ml_agentd_conf
configuration: ml_agent_conf
)
4 changes: 2 additions & 2 deletions daemon/ml-agentd.pc.in → daemon/ml-agent.pc.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ includedir=@INCLUDE_INSTALL_DIR@
Name: ml-agent-service
Description: Development headers and libraries for interfaces provided by Machine Learning Agent Service
Version: @VERSION@
Libs: -L${libdir} -lml-agentd
Cflags: -I${includedir}/ml-agentd
Libs: -L${libdir} -lml-agent
Cflags: -I${includedir}/ml-agent
14 changes: 7 additions & 7 deletions packaging/machine-learning-api.spec
Original file line number Diff line number Diff line change
Expand Up @@ -510,14 +510,14 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests
%if 0%{?enable_ml_service}
%files -n libmachine-learning-agent
%manifest machine-learning-agent.manifest
%{_libdir}/libml-agentd.so.*
%{_libdir}/libml-agent.so.*

%files -n libmachine-learning-agent-devel
%manifest machine-learning-agent.manifest
%{_libdir}/libml-agentd.so
%{_libdir}/libml-agentd.a
%{_includedir}/ml-agentd/ml-agent-interface.h
%{_libdir}/pkgconfig/ml-agentd.pc
%{_libdir}/libml-agent.so
%{_libdir}/libml-agent.a
%{_includedir}/ml-agent/ml-agent-interface.h
%{_libdir}/pkgconfig/ml-agent.pc

%files -n machine-learning-agent
%manifest machine-learning-agent.manifest
Expand Down Expand Up @@ -545,8 +545,8 @@ install -m 0755 packaging/run-unittest.sh %{buildroot}%{_bindir}/tizen-unittests
%files -n capi-machine-learning-unittests
%manifest capi-machine-learning.manifest
%{_bindir}/unittest-ml
%{_libdir}/libml-agentd-test.a
%{_libdir}/libml-agentd-test.so*
%{_libdir}/libml-agent-test.a
%{_libdir}/libml-agent-test.so*
%{_libdir}/libunittest_mock.so*
%if 0%{?gcov:1}
%{_bindir}/tizen-unittests/%{name}/run-unittest.sh
Expand Down
4 changes: 2 additions & 2 deletions tests/capi/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test('unittest_capi_datatype_consistency', unittest_capi_datatype_consistency, e
if get_option('enable-ml-service')
unittest_capi_service_agent_client = executable('unittest_capi_service_agent_client',
'unittest_capi_service_agent_client.cc',
dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agentd_test_dep],
dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agent_test_dep],
install: get_option('install-test'),
install_dir: unittest_install_dir,
include_directories: nns_capi_include,
Expand All @@ -44,7 +44,7 @@ if get_option('enable-ml-service')
if support_remote_service
unittest_capi_remote_service = executable('unittest_capi_remote_service',
'unittest_capi_remote_service.cc',
dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agentd_test_dep],
dependencies: [unittest_common_dep, nns_capi_service_dep, gdbus_gen_test_dep, lib_ml_agent_test_dep],
install: get_option('install-test'),
install_dir: unittest_install_dir,
include_directories: nns_capi_include,
Expand Down
14 changes: 7 additions & 7 deletions tests/daemon/meson.build
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
unittest_ml_agent = executable('unittest_ml_agent',
'unittest_ml_agent.cc',
dependencies: [unittest_common_dep, ml_agentd_deps, gdbus_gen_test_dep],
dependencies: [unittest_common_dep, ml_agent_deps, gdbus_gen_test_dep],
install: get_option('install-test'),
install_dir: unittest_install_dir,
include_directories: [nns_capi_include, ml_agentd_incs]
include_directories: [nns_capi_include, ml_agent_incs]
)
test('unittest_ml_agent', unittest_ml_agent, env: testenv, timeout: 100)

unittest_service_db = executable('unittest_service_db',
'unittest_service_db.cc',
link_with: ml_agentd_test_lib,
dependencies: [unittest_common_dep, ml_agentd_deps],
link_with: ml_agent_test_lib,
dependencies: [unittest_common_dep, ml_agent_deps],
install: get_option('install-test'),
install_dir: unittest_install_dir,
include_directories: [nns_capi_include, ml_agentd_incs],
include_directories: [nns_capi_include, ml_agent_incs],
)
test('unittest_service_db', unittest_service_db, env: testenv, timeout: 100)

unittest_gdbus_util = executable('unittest_gdbus_util',
'unittest_gdbus_util.cc',
dependencies: [unittest_common_dep],
link_with: ml_agentd_lib,
link_with: ml_agent_lib,
install: get_option('install-test'),
install_dir: unittest_install_dir,
include_directories: [ml_agentd_incs],
include_directories: [ml_agent_incs],
)
test('unittest_gdbus_util', unittest_gdbus_util, env: testenv, timeout: 100)
6 changes: 3 additions & 3 deletions tests/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ if get_option('enable-ml-service')
subdir('mock')
subdir('dbus')

ml_agentd_main_objs = ml_agent_executable.extract_objects(ml_agentd_main_file)
ml_agent_main_objs = ml_agent_executable.extract_objects(ml_agent_main_file)
executable('machine-learning-agent-test',
test_dbus_impl_srcs,
dependencies: [lib_ml_agentd_test_dep, gdbus_gen_test_dep],
dependencies: [lib_ml_agent_test_dep, gdbus_gen_test_dep],
install: get_option('install-test'),
install_dir: unittest_base_dir,
link_with: lib_unittest_mock,
objects: ml_agentd_main_objs,
objects: ml_agent_main_objs,
)

subdir('services')
Expand Down

0 comments on commit 6b6c726

Please sign in to comment.