+/*
+ * Duplicate definition from vl.c to avoid messing up the entire build
+ */
+enum {
+#define DEF(option, opt_arg, opt_enum, opt_help, arch_mask) \
+ opt_enum,
+#define DEFHEADING(text)
+#include "qemu-options.h"
+#undef DEF
+#undef DEFHEADING
+#undef GEN_DOCS
+};
I agree with Richard: this is gross.
The enum creation is gross by itself. Only way to get around not
duplicating it is to create a new header file to hold just that?
I don't think it's particularly gross. At least you don't have two
files to keep in sync.
You could rename qemu-options.h to qemu-options.def, and make a real
header file with the typedef and the enum. Then include the header from
vl.c and os-*.c.
BTW from Fedora 11 and newer you can easily build QEMU with a cross
compiler. (Running it is a bit harder). These packages should suffice:
mingw32-w32api mingw32-cpp mingw32-termcap mingw32-runtime
mingw32-binutils mingw32-filesystem mingw32-SDL mingw32-gcc
mingw32-zlib
and you need to configure it with "--cross-prefix=i686-pc-mingw32-"
(trailing dash included!).
Paolo