QEMU_CFLAGS="-mdynamic-no-pic $QEMU_CFLAGS"
fi
darwin_user="yes"
- cocoa="yes"
+ cocoa="no"
audio_drv_list="coreaudio"
audio_possible_drivers="coreaudio sdl fmod"
LDFLAGS="-framework CoreFoundation -framework IOKit $LDFLAGS"
return virtio_exit_pci(pci_dev);
}
-//#ifndef _WIN32
+#ifndef CONFIG_DARWIN
extern VirtIODevice *virtio_gl_init(DeviceState *dev);
static int virtio_gl_init_pci(PCIDevice *pci_dev)
{
virtio_init_pci(proxy, vdev);
return 0;
}
-//#endif
+#endif
static PCIDeviceInfo virtio_info[] = {
{
},
.qdev.reset = virtio_pci_reset,
},{
-//#ifndef _WIN32
+#ifndef CONFIG_DARWIN
.qdev.name = "virtio-gl-pci",
.qdev.alias = "virtio-gl",
.qdev.size = sizeof(VirtIOPCIProxy),
},
.qdev.reset = virtio_pci_reset,
},{
-//#endif
+#endif
/* end of list */
}
};
ifdef CONFIG_WIN32
LIBS += -lavformat -lavcodec -lavutil -lm -lopengl32 -lglu32 -lgdi32
-else
+endif
+ifdef CONFIG_LINUX
LIBS += -lavformat -lavcodec -lavutil -lm -lGL
endif
+ifdef CONFIG_DARWIN
+# FIXME: disabled codec on Mac now
+# LIBS += -lavformat -lavcodec -lavutil -lm
+endif
ifdef CONFIG_DEBUG_EXEC
GL_CFLAGS := -Wall -g -O0 -fno-strict-aliasing
GL_CFLAGS := -Wall -g -O2 -fno-strict-aliasing
endif
-#ifndef CONFIG_WIN32
+ifndef CONFIG_DARWIN
###########################################################
## Build openGL
# i386
endif #($(TARGET_ARCH), i386)
###########################################################
-#endif #CONFIG_WIN32
-
+endif #!CONFIG_DARWIN
+
# maru loader
obj-y += emulator.o emul_state.o option.o maru_err_table.o
# maru hardware
obj-i386-y += maru_board.o
obj-i386-y += maru_overlay.o
+ifndef CONFIG_DARWIN
obj-i386-y += maru_codec.o
+endif
obj-i386-y += maru_pm.o
obj-i386-y += maru_vga.o
obj-i386-y += maru_brightness.o
obj-i386-y += maru_touchscreen.o
+
+# FIXME: camera disabled
+ifndef CONFIG_DARWIN
obj-i386-$(CONFIG_PCI) += maru_camera_common_pci.o
obj-i386-$(CONFIG_LINUX) += maru_camera_linux_pci.o
obj-i386-$(CONFIG_WIN32) += maru_camera_win32_pci.o
+endif
+
ifdef CONFIG_LINUX # libs for maru camera on linux host
LIBS += -lv4l2 -lv4lconvert
endif
# guest server
obj-i386-y += guest_server.o
-#ifndef CONFIG_WIN32
+ifndef CONFIG_DARWIN
###########################################################
## opengl library for i386
obj-i386-y += virtio-gl.o helper_opengl.o opengl_exec.o mesa_mipmap.o gloffscreen_common.o gloffscreen_xcomposite.o gloffscreen_wgl.o gloffscreen_test.o
###########################################################
-#endif
+endif
#define JAR_SKINFILE_PATH "emulator-skin.jar"
#define JAVA_EXEFILE_PATH "java"
+#ifndef CONFIG_DARWIN
#define JAVA_EXEOPTION "-jar"
+#else
+#define JAVA_EXEOPTION "-XstartOnFirstThread -jar" // Must start the Java window on the first thread on Mac
+#endif
#define JAVA_SIMPLEMODE_OPTION "simple.msg"
uint8_t qemu_extra_params_fw[2];
//virtio-gl
-//#ifndef _WIN32
+#ifndef CONFIG_DARWIN
extern int gl_acceleration_capability_check (void);
int enable_gl = 0;
int capability_check_gl = 0;
-//#endif
+#endif
typedef struct FWBootEntry FWBootEntry;
{
DeviceState *dev;
-//#ifndef _WIN32
+#ifndef CONFIG_DARWIN
// virtio-gl pci device
if (!enable_gl) {
// ignore virtio-gl-pci device, even if users set it in option.
return 0;
}
}
-//#endif
+#endif
dev = qdev_device_add(opts);
if (!dev)
qemu_opts_parse(olist, "accel=kvm", 0);
break;
case QEMU_OPTION_enable_gl:
-//#ifndef _WIN32
+#ifndef CONFIG_DARWIN
enable_gl = 1;
-//#endif
+#endif
break;
case QEMU_OPTION_machine:
olist = qemu_find_opts("machine");
}
loc_set_none();
-//#ifndef _WIN32
+#ifndef CONFIG_DARWIN
capability_check_gl = gl_acceleration_capability_check();
if (enable_gl && (capability_check_gl != 0)) {
enable_gl = 0;
}
}
}
-//#endif
+#endif
/* Open the logfile at this point, if necessary. We can't open the logfile