# No libraries with the exception of LIBXML should be listed
# here. List them against the individual XXX_la_CFLAGS targets
# that actually use them.
-AM_CPPFLAGS = -I$(top_srcdir) \
- -I../include \
- -I$(top_srcdir)/include \
+AM_CPPFLAGS = \
-I$(srcdir)/util \
-I./util \
- -DIN_LIBVIRT \
- -Dabs_top_builddir="\"$(abs_top_builddir)\"" \
- -Dabs_top_srcdir="\"$(abs_top_srcdir)\"" \
$(NULL)
-AM_CFLAGS = $(LIBXML_CFLAGS) \
- $(GLIB_CFLAGS) \
- $(WARN_CFLAGS) \
- $(WIN32_EXTRA_CFLAGS) \
- $(COVERAGE_CFLAGS) \
- $(NULL)
-AM_LDFLAGS = $(DRIVER_MODULES_LDFLAGS) \
- $(COVERAGE_LDFLAGS) \
- $(RELRO_LDFLAGS) \
- $(NO_INDIRECT_LDFLAGS) \
- $(MINGW_EXTRA_LDFLAGS) \
- $(NULL)
AM_LDFLAGS_MOD = \
-module \
-avoid-version \
--- /dev/null
+src_inc_dir = include_directories('.')
+
+src_dep = declare_dependency(
+ compile_args: [
+ '-DIN_LIBVIRT',
+ '-Dabs_top_builddir="@0@"'.format(meson.build_root()),
+ '-Dabs_top_srcdir="@0@"'.format(meson.source_root()),
+ ] + coverage_flags + win32_flags,
+ dependencies: [
+ glib_dep,
+ libxml_dep,
+ ],
+ include_directories: [
+ libvirt_inc,
+ src_inc_dir,
+ top_inc_dir,
+ ],
+ link_args: (
+ libvirt_relro
+ + libvirt_no_indirect
+ + coverage_flags
+ + driver_modules_flags
+ + win32_link_flags
+ ),
+)