X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=meson.build;h=6289a6839bb5f72ed4b3d5cc2ea453ce03399545;hb=18da3c854bb8105818dc23c36eecf3465596052a;hp=e8bb9c4c1ec652a1e8b7bb050654ef51944373cb;hpb=de321d59181c680774e01e338f09e8e9c89c71be;p=dpdk.git diff --git a/meson.build b/meson.build index e8bb9c4c1e..6289a6839b 100644 --- a/meson.build +++ b/meson.build @@ -8,14 +8,29 @@ project('DPDK', 'C', files('VERSION')).stdout().strip(), license: 'BSD', default_options: ['buildtype=release', 'default_library=static'], - meson_version: '>= 0.47.1' + meson_version: '>= 0.49.2' ) +# check for developer mode +developer_mode = false +if get_option('developer_mode').auto() + if meson.version().version_compare('>=0.53') # fs module available + fs = import('fs') + developer_mode = fs.is_dir('.git') + endif +else + developer_mode = get_option('developer_mode').enabled() +endif +if developer_mode + message('## Building in Developer Mode ##') +endif + # set up some global vars for compiler, platform, configuration, etc. cc = meson.get_compiler('c') dpdk_conf = configuration_data() dpdk_libraries = [] dpdk_static_libraries = [] +dpdk_chkinc_headers = [] dpdk_driver_classes = [] dpdk_drivers = [] dpdk_extra_ldflags = [] @@ -39,10 +54,12 @@ global_inc = include_directories('.', 'config', 'lib/librte_eal/@0@/include'.format(host_machine.system()), 'lib/librte_eal/@0@/include'.format(arch_subdir), ) + +# do configuration and get tool paths +subdir('buildtools') subdir('config') # build libs and drivers -subdir('buildtools') subdir('lib') subdir('drivers') @@ -56,12 +73,20 @@ subdir('doc') # build any examples explicitly requested - useful for developers - and # install any example code into the appropriate install path subdir('examples') +install_subdir('examples', + install_dir: get_option('datadir') + '/dpdk', + exclude_files: ex_file_excludes) # build kernel modules if enabled if get_option('enable_kmods') subdir('kernel') endif +# check header includes if requested +if get_option('check_includes') + subdir('buildtools/chkincs') +endif + # write the build config build_cfg = 'rte_build_config.h' configure_file(output: build_cfg,