From 4b340679e50005a3f0d8b40c60bfe70e553d8846 Mon Sep 17 00:00:00 2001 From: Lucas Fryzek Date: Fri, 26 Jul 2024 15:20:36 +0100 Subject: meson: Remove hardcoded path and make it configurable --- meson.build | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/meson.build b/meson.build index 3ec1eb1..4b0857b 100644 --- a/meson.build +++ b/meson.build @@ -4,17 +4,23 @@ add_project_arguments('-D_GNU_SOURCE', language: 'c') dl = dependency('dl') -kmod_dir = '/home/lfryzek/Documents/projects/hw/ci20/imgtec_files/kernel_3.18_1.14.3759903/SGX_DDK_Linux_XOrg_MAIN@3759903_source_km/eurasia_km' +ddk_path = get_option('ddk-path') + +if ddk_path == '' + error('ddk-path is required') +endif + +ddk_path += '/eurasia_km' incs = [ - kmod_dir + '/services4/srvkm/hwdefs', - kmod_dir + '/include4', - kmod_dir + '/services4/include', - kmod_dir + '/services4/system/sgx_jz4780', - kmod_dir + '/services4/include/env/linux', - kmod_dir + '/services4/srvkm/devices/sgx', - kmod_dir + '/services4/srvkm/env/linux', - './src' + ddk_path + '/services4/srvkm/hwdefs', + ddk_path + '/include4', + ddk_path + '/services4/include', + ddk_path + '/services4/system/sgx_jz4780', + ddk_path + '/services4/include/env/linux', + ddk_path + '/services4/srvkm/devices/sgx', + ddk_path + '/services4/srvkm/env/linux', + './src' ] shared_library('drvemu', -- cgit