diff --git a/hw/meson.build b/hw/meson.build index 8ba79b1a52..1aa7ffbf9a 100644 --- a/hw/meson.build +++ b/hw/meson.build @@ -38,6 +38,7 @@ subdir('usb') subdir('vfio') subdir('virtio') subdir('watchdog') +subdir('xbox') subdir('xen') subdir('xenpv') diff --git a/hw/xbox/Makefile.objs b/hw/xbox/Makefile.objs deleted file mode 100644 index f20a76c035..0000000000 --- a/hw/xbox/Makefile.objs +++ /dev/null @@ -1,11 +0,0 @@ -obj-y += xbox.o -obj-y += chihiro.o -obj-y += xbox_pci.o acpi_xbox.o -obj-y += amd_smbus.o smbus_xbox_smc.o smbus_cx25871.o smbus_adm1032.o smbus_storage.o eeprom_generation.o -obj-y += nvnet.o -obj-y += lpc47m157.o -obj-y += xid.o -obj-y += chihiro-usb.o - -obj-y += nv2a/ -obj-y += mcpx/ diff --git a/hw/xbox/mcpx/Makefile.objs b/hw/xbox/mcpx/Makefile.objs deleted file mode 100644 index f57042de5c..0000000000 --- a/hw/xbox/mcpx/Makefile.objs +++ /dev/null @@ -1,4 +0,0 @@ -obj-y += apu.o aci.o -apu.o-cflags := $(SDL_CFLAGS) - -obj-y += dsp/ diff --git a/hw/xbox/mcpx/dsp/Makefile.objs b/hw/xbox/mcpx/dsp/Makefile.objs deleted file mode 100644 index 9313398201..0000000000 --- a/hw/xbox/mcpx/dsp/Makefile.objs +++ /dev/null @@ -1,5 +0,0 @@ -obj-y += dsp.o dsp_cpu.o dsp_dma.o - -# dsp_cpu.c uses SDL_GetTicks() -dsp_cpu.o-cflags := $(SDL_CFLAGS) -dsp_cpu.o-libs := $(SDL_LIBS) diff --git a/hw/xbox/mcpx/meson.build b/hw/xbox/mcpx/meson.build new file mode 100644 index 0000000000..fd87ef118e --- /dev/null +++ b/hw/xbox/mcpx/meson.build @@ -0,0 +1,10 @@ +mcpx_ss = ss.source_set() +mcpx_ss.add(sdl, libsamplerate, files( + 'apu.c', + 'aci.c', + 'dsp/dsp.c', + 'dsp/dsp_cpu.c', + 'dsp/dsp_dma.c', + )) + +specific_ss.add_all(mcpx_ss) \ No newline at end of file diff --git a/hw/xbox/meson.build b/hw/xbox/meson.build new file mode 100644 index 0000000000..a22f3611c2 --- /dev/null +++ b/hw/xbox/meson.build @@ -0,0 +1,18 @@ +specific_ss.add(files( + 'acpi_xbox.c', + 'amd_smbus.c', + # 'chihiro-usb.c', + # 'chihiro.c', + 'eeprom_generation.c', + 'lpc47m157.c', + 'nvnet.c', + 'smbus_adm1032.c', + 'smbus_cx25871.c', + 'smbus_storage.c', + 'smbus_xbox_smc.c', + 'xbox.c', + 'xbox_pci.c', + 'xid.c', + )) +subdir('nv2a') +subdir('mcpx') diff --git a/hw/xbox/nv2a/Makefile.objs b/hw/xbox/nv2a/Makefile.objs deleted file mode 100644 index 3e65589d07..0000000000 --- a/hw/xbox/nv2a/Makefile.objs +++ /dev/null @@ -1,22 +0,0 @@ -obj-y += nv2a.o -obj-y += debug.o -obj-y += pbus.o -obj-y += pcrtc.o -obj-y += pfb.o -obj-y += pfifo.o -obj-y += pgraph.o -obj-y += pmc.o -obj-y += pramdac.o -obj-y += prmcio.o -obj-y += prmvio.o -obj-y += psh.o -obj-y += ptimer.o -obj-y += pvideo.o -obj-y += shaders.o -obj-y += stubs.o -obj-y += user.o -obj-y += vsh.o - -obj-y += gl/ -obj-y += swizzle.o -obj-y += s3tc.o diff --git a/hw/xbox/nv2a/gl/Makefile.objs b/hw/xbox/nv2a/gl/Makefile.objs deleted file mode 100644 index d359145ec2..0000000000 --- a/hw/xbox/nv2a/gl/Makefile.objs +++ /dev/null @@ -1,2 +0,0 @@ -obj-y += gloffscreen_common.o gloffscreen_sdl.o -gloffscreen_sdl.o-cflags := $(SDL_CFLAGS) diff --git a/hw/xbox/nv2a/gl/meson.build b/hw/xbox/nv2a/gl/meson.build new file mode 100644 index 0000000000..973a9aa8c1 --- /dev/null +++ b/hw/xbox/nv2a/gl/meson.build @@ -0,0 +1,6 @@ +softmmu_ss.add([sdl, files( + 'gloffscreen_common.c', + 'gloffscreen_sdl.c', + )]) + +# gloffscreen_sdl.o-cflags := $(SDL_CFLAGS) diff --git a/hw/xbox/nv2a/meson.build b/hw/xbox/nv2a/meson.build new file mode 100644 index 0000000000..b02ab01d39 --- /dev/null +++ b/hw/xbox/nv2a/meson.build @@ -0,0 +1,23 @@ +specific_ss.add(files( + 'nv2a.c', + 'debug.c', + 'pbus.c', + 'pcrtc.c', + 'pfb.c', + 'pfifo.c', + 'pgraph.c', + 'pmc.c', + 'pramdac.c', + 'prmcio.c', + 'prmvio.c', + 'psh.c', + 'ptimer.c', + 'pvideo.c', + 'shaders.c', + 'stubs.c', + 'user.c', + 'vsh.c', + 'swizzle.c', + 's3tc.c', + )) +subdir('gl') diff --git a/meson.build b/meson.build index a0c629cd40..4ad45c7d30 100644 --- a/meson.build +++ b/meson.build @@ -813,6 +813,15 @@ if 'CONFIG_OPENGL' in config_host link_args: config_host['OPENGL_LIBS'].split()) endif +xemu_gtk = declare_dependency(compile_args: config_host['XEMU_GTK_CFLAGS'].split(), + link_args: config_host['XEMU_GTK_LIBS'].split()) + +openssl = declare_dependency(compile_args: config_host['OPENSSL_CFLAGS'].split(), + link_args: config_host['OPENSSL_LIBS'].split()) + +libsamplerate = declare_dependency(compile_args: config_host['LIBSAMPLERATE_CFLAGS'].split(), + link_args: config_host['LIBSAMPLERATE_LIBS'].split()) + gtk = not_found gtkx11 = not_found if not get_option('gtk').auto() or (have_system and not cocoa.found()) @@ -1705,15 +1714,14 @@ qemu_version = custom_target('qemu-version.h', xemu_version_cmd = [find_program('scripts/xemu-version.sh'), meson.current_source_dir()] -xemu_version = custom_target('xemu-version.h', - output: 'xemu-version.h', +xemu_version = custom_target('xemu-version.c', + output: 'xemu-version.c', command: xemu_version_cmd, capture: true, build_by_default: true, build_always_stale: true) genh += qemu_version -genh += xemu_version hxdep = [] hx_headers = [ @@ -1938,6 +1946,14 @@ if have_block softmmu_ss.add(when: 'CONFIG_WIN32', if_true: [files('os-win32.c')]) endif +specific_ss.add(files('xemu-xbe.c')) + +libxemuver = static_library('xemuver', sources: xemu_version, + name_suffix: 'fa', + build_by_default: false) +xemuver = declare_dependency(link_whole: libxemuver) +common_ss.add(xemuver) + common_ss.add(files('cpus-common.c')) subdir('softmmu') diff --git a/target/i386/fpu_helper_hard.c b/target/i386/tcg/fpu_helper_hard.c similarity index 100% rename from target/i386/fpu_helper_hard.c rename to target/i386/tcg/fpu_helper_hard.c diff --git a/target/i386/tcg/meson.build b/target/i386/tcg/meson.build index 6a1a73cdbf..d002ee583f 100644 --- a/target/i386/tcg/meson.build +++ b/target/i386/tcg/meson.build @@ -3,6 +3,7 @@ i386_ss.add(when: 'CONFIG_TCG', if_true: files( 'cc_helper.c', 'excp_helper.c', 'fpu_helper.c', + 'fpu_helper_hard.c', 'int_helper.c', 'mem_helper.c', 'misc_helper.c', diff --git a/ui/meson.build b/ui/meson.build index e8d3ff41b9..0ca323cad2 100644 --- a/ui/meson.build +++ b/ui/meson.build @@ -12,6 +12,54 @@ softmmu_ss.add(files( 'keymaps.c', 'qemu-pixman.c', )) + +xemu_ss = ss.source_set() +xemu_ss.add(files( + 'imgui/imgui.cpp', + 'imgui/imgui_draw.cpp', + 'imgui/imgui_tables.cpp', + 'imgui/imgui_demo.cpp', + 'imgui/imgui_widgets.cpp', + 'imgui/backends/imgui_impl_opengl3.cpp', + 'imgui/backends/imgui_impl_sdl.cpp', + 'implot/implot.cpp', + 'implot/implot_demo.cpp', + 'implot/implot_items.cpp', + + 'xemu.c', + 'xemu-custom-widgets.c', + 'xemu-data.c', + 'xemu-input.c', + 'xemu-monitor.c', + 'xemu-net.c', + 'xemu-settings.c', + 'xemu-shaders.c', + 'xemu-hud.cc', + 'xemu-reporting.cc', +)) + +imgui_flags = ['-DIMGUI_IMPL_OPENGL_LOADER_CUSTOM="epoxy/gl.h"', + '-Iui/imgui'] + +if 'CONFIG_WIN32' in config_host +imgui_flags += ['-DWIN32', '-DMINGW32'] +endif + +if 'CONFIG_LINUX' in config_host +imgui_flags += ['-DLINUX'] +endif + +if 'CONFIG_DARWIN' in config_host +imgui_flags += ['-DAPPLE'] +endif + +imgui = declare_dependency(compile_args: imgui_flags) +xemu_ss.add(sdl, opengl, openssl, imgui) +xemu_ss.add(when: 'CONFIG_LINUX', if_true: [xemu_gtk, files('xemu-os-utils-linux.c', 'noc_file_dialog_gtk.c')]) +xemu_ss.add(when: 'CONFIG_WIN32', if_true: files('xemu-os-utils-windows.c', 'noc_file_dialog_win32.c')) +xemu_ss.add(when: 'CONFIG_DARWIN', if_true: files('xemu-os-utils-macos.m', 'noc_file_dialog_macos.m')) +softmmu_ss.add_all(xemu_ss) + softmmu_ss.add([spice_headers, files('spice-module.c')]) softmmu_ss.add(when: 'CONFIG_LINUX', if_true: files('input-linux.c')) @@ -80,7 +128,7 @@ if sdl.found() )) sdl_ss.add(when: [opengl, 'CONFIG_OPENGL'], if_true: files('sdl2-gl.c')) sdl_ss.add(when: x11, if_true: files('x_keymap.c')) - ui_modules += {'sdl' : sdl_ss} + # ui_modules += {'sdl' : sdl_ss} endif if config_host.has_key('CONFIG_SPICE') diff --git a/ui/shader/meson.build b/ui/shader/meson.build index 592bf596b9..ef29f31e0b 100644 --- a/ui/shader/meson.build +++ b/ui/shader/meson.build @@ -2,6 +2,7 @@ shaders = [ ['texture-blit', 'frag'], ['texture-blit', 'vert'], ['texture-blit-flip', 'vert'], + ['xemu-logo', 'frag'], ] foreach e : shaders