bximage fixes for compiling with VS2008Ex DLL plugins

This commit is contained in:
Volker Ruppert 2013-10-28 20:31:34 +00:00
parent 2c779f60da
commit 08b66534aa
4 changed files with 21 additions and 10 deletions

View File

@ -113,7 +113,7 @@ GUI_LINK_OPTS = @GUI_LINK_OPTS@ @DEVICE_LINK_OPTS@
RANLIB = @RANLIB@
CFLAGS_CONSOLE = @CFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS)
CXXFLAGS_CONSOLE = @CXXFLAGS@ $(MCH_CFLAGS) $(FLA_FLAGS)
CXXFLAGS_CONSOLE = @CXXFLAGS_CONSOLE@ $(MCH_CFLAGS) $(FLA_FLAGS)
BXIMAGE_LINK_OPTS = @BXIMAGE_LINK_OPTS@
BX_INCDIRS = -I. -I$(srcdir)/. -I@INSTRUMENT_DIR@ -I$(srcdir)/@INSTRUMENT_DIR@

View File

@ -308,7 +308,7 @@
// have __declspec(dllexport) on variables, functions, or classes that the
// plugins can access. The plugins should #define PLUGGABLE which will
// activate the __declspec(dllimport) instead.
#if defined(WIN32) || defined(__CYGWIN__)
#if (defined(WIN32) || defined(__CYGWIN__)) && !defined(BXIMAGE)
# if BX_PLUGINS && defined(BX_PLUGGABLE)
// #warning I will import DLL symbols from Bochs main program.
# define BOCHSAPI __declspec(dllimport)

View File

@ -2375,8 +2375,6 @@ fi
# everybody has to re-invent the wheel. differently.
test "${WGET}" = "curl" && WGET="curl -O"
BXIMAGE_FLAG="-DBXIMAGE"
# modify settings based on target platform
case "$target" in
*-macosx*)
@ -2421,7 +2419,6 @@ case "$target" in
EXE=".exe"
PRIMARY_TARGET="bochs.exe"
BXIMAGE_LINK_OPTS="user32.lib"
BXIMAGE_FLAG="/DBXIMAGE"
# also compile niclist if networking is on
if test "$networking" = yes; then
PRIMARY_TARGET="$PRIMARY_TARGET niclist.exe"
@ -2458,6 +2455,21 @@ case "$target" in
;;
esac
# bximage specific settings
case "$target" in
*-pc-windows*)
BXIMAGE_FLAG="/DBXIMAGE"
CXXFLAGS_CONSOLE="/nologo /MT /W3 /EHs-c- /DNDEBUG /DWIN32 /D_WINDOWS /D_CRT_SECURE_NO_WARNINGS $C_OPT"
;;
*)
BXIMAGE_FLAG="-DBXIMAGE"
CXXFLAGS_CONSOLE="$CXXFLAGS"
;;
esac
AC_SUBST(BXIMAGE_FLAG)
AC_SUBST(BXIMAGE_LINK_OPTS)
AC_SUBST(CXXFLAGS_CONSOLE)
ENH_DBG_OBJS=""
if test "$gui_debugger" = 1; then
if test "$needs_gtk2" = 1; then
@ -2828,8 +2840,6 @@ AC_SUBST(DEVICE_LINK_OPTS)
AC_SUBST(GUI_LINK_OPTS)
AC_SUBST(GUI_LINK_OPTS_TERM)
AC_SUBST(GUI_LINK_OPTS_WX)
AC_SUBST(BXIMAGE_LINK_OPTS)
AC_SUBST(BXIMAGE_FLAG)
AC_SUBST(DASH)
AC_SUBST(SLASH)
AC_SUBST(CXXFP)

View File

@ -51,6 +51,10 @@
// Resize a hard disk image.
// Commit a redolog file to a supported base image.
#ifndef BXIMAGE
#define BXIMAGE
#endif
#include "config.h"
#include "bxcompat.h"
@ -63,9 +67,6 @@
#include "osdep.h"
#include "bswap.h"
#ifndef BXIMAGE
#define BXIMAGE
#endif
#include "iodev/hdimage/hdimage.h"
#include "iodev/hdimage/vmware3.h"
#include "iodev/hdimage/vmware4.h"