No need for rnn_path.h, just construct the whole thing in meson and pass
via c_args. Also move where the path is constructed up one level. This
will be needed for syncing back to envytools, where the path will be
different.
Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6154>
inc_freedreno = include_directories(['.', './registers', './common'])
inc_freedreno_rnn = include_directories('rnn')
+rnn_src_path = meson.source_root() + '/src/freedreno/registers'
+rnn_install_path = get_option('datadir') + '/freedreno/registers'
+rnn_path = rnn_src_path + ':' + get_option('prefix') + '/' + rnn_install_path
+
subdir('common')
subdir('registers')
subdir('drm')
'rnn.h',
'rnndec.c',
'rnndec.h',
- 'rnn_path.h',
'util.h',
)
],
c_args : [
no_override_init_args,
- '-DSOURCE_DIR="' + meson.source_root() + '"',
-# TODO how do we get install prefix??
- '-DINSTALL_DIR=""',
+ '-DRNN_DEF_PATH="' + rnn_path + '"',
],
gnu_symbol_visibility: 'hidden',
dependencies: [ dep_libxml2 ],
#include <ctype.h>
#include <stdio.h>
#include "rnn.h"
-#include "rnn_path.h"
#include "util.h"
#include "util/u_debug.h"
+++ /dev/null
-#define RNN_DEF_PATH SOURCE_DIR "/src/freedreno/registers:" INSTALL_DIR "share/mesa/freedreno/registers"