|
@@ -1,3 +1,7 @@
|
|
|
+if not get_option('plugins')
|
|
|
+ subdir_done()
|
|
|
+endif
|
|
|
+
|
|
|
# Modules need more symbols than just those in plugins/qemu-plugins.symbols
|
|
|
if not enable_modules
|
|
|
if host_os == 'darwin'
|
|
@@ -12,29 +16,27 @@ if not enable_modules
|
|
|
endif
|
|
|
endif
|
|
|
|
|
|
-if get_option('plugins')
|
|
|
- if host_os == 'windows'
|
|
|
- dlltool = find_program('dlltool', required: true)
|
|
|
+if host_os == 'windows'
|
|
|
+ dlltool = find_program('dlltool', required: true)
|
|
|
|
|
|
- # Generate a .lib file for plugins to link against.
|
|
|
- # First, create a .def file listing all the symbols a plugin should expect to have
|
|
|
- # available in qemu
|
|
|
- win32_plugin_def = configure_file(
|
|
|
- input: files('qemu-plugins.symbols'),
|
|
|
- output: 'qemu_plugin_api.def',
|
|
|
- capture: true,
|
|
|
- command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
|
|
|
- # then use dlltool to assemble a delaylib.
|
|
|
- win32_qemu_plugin_api_lib = configure_file(
|
|
|
- input: win32_plugin_def,
|
|
|
- output: 'libqemu_plugin_api.a',
|
|
|
- command: [dlltool, '--input-def', '@INPUT@',
|
|
|
- '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe']
|
|
|
- )
|
|
|
- endif
|
|
|
- specific_ss.add(files(
|
|
|
- 'loader.c',
|
|
|
- 'core.c',
|
|
|
- 'api.c',
|
|
|
- ))
|
|
|
+ # Generate a .lib file for plugins to link against.
|
|
|
+ # First, create a .def file listing all the symbols a plugin should expect to have
|
|
|
+ # available in qemu
|
|
|
+ win32_plugin_def = configure_file(
|
|
|
+ input: files('qemu-plugins.symbols'),
|
|
|
+ output: 'qemu_plugin_api.def',
|
|
|
+ capture: true,
|
|
|
+ command: ['sed', '-e', '0,/^/s//EXPORTS/; s/[{};]//g', '@INPUT@'])
|
|
|
+ # then use dlltool to assemble a delaylib.
|
|
|
+ win32_qemu_plugin_api_lib = configure_file(
|
|
|
+ input: win32_plugin_def,
|
|
|
+ output: 'libqemu_plugin_api.a',
|
|
|
+ command: [dlltool, '--input-def', '@INPUT@',
|
|
|
+ '--output-delaylib', '@OUTPUT@', '--dllname', 'qemu.exe']
|
|
|
+ )
|
|
|
endif
|
|
|
+specific_ss.add(files(
|
|
|
+ 'loader.c',
|
|
|
+ 'core.c',
|
|
|
+ 'api.c',
|
|
|
+))
|