Permalink
Browse files

Improvements for msvgcc hack

Game can now be built with msvgcc hack. The built binary should work.
Automatic dependency generation does not work because includes have been
used inconsistently.
  • Loading branch information...
1 parent 89fc2f0 commit 5a322ce011a5348117edea659fcf1db5ab9f23e1 @turol turol committed May 27, 2011
@@ -26,7 +26,7 @@
#include "../editor/string_conversions.h"
#include "../filesystem/input_file_stream.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
#include <sstream>
View
@@ -4,7 +4,7 @@
// FIXME : standard stdint.h header is missing on MSVC
-#ifdef WIN32
+#ifdef _WIN32
typedef unsigned char uint8_t;
#else
#include <stdint.h>
@@ -9,11 +9,6 @@
#define PHYSICS_ACTOR boost::shared_ptr<frozenbyte::physics::ActorBase>
#endif
-#ifdef PHYSICS_ODE
-#define PHYSICS_ACTOR PhysicsActorOde
-#include "../../physics_ode/physics_ode.h"
-#endif
-
#ifdef PHYSICS_NONE
#define PHYSICS_ACTOR PhysicsActorNone
#include "physics_none.h"
View
@@ -6,3 +6,6 @@ msvgcc.hi
*.obj
local.mk
+
+claw_d3d.exe
+claw_opengl.exe
View
@@ -50,6 +50,7 @@ CXXFLAGS:=
CXXFLAGS+=-I$(TOPDIR) -I$(TOPDIR)/claw_proto -I$(TOPDIR)/storm/include -I$(TOPDIR)/storm/keyb3
CXXFLAGS+=/FI$(TOPDIR)/claw_proto/configuration.h
CXXFLAGS+=-DLIGHT_MAX_AMOUNT=5
+CXXFLAGS+=-DDISABLE_STORM_DLL
# enable exceptions or the compiler complains about its standard headers
CXXFLAGS+=/EHsc
@@ -58,18 +59,21 @@ CXXFLAGS+=-D_CRT_SECURE_NO_DEPRECATE
# linker settings
-LDFLAGS:=/subsystem:windows
-LDLIBS:=winmm.lib comdlg32.lib gdi32.lib
+LDFLAGS:=/subsystem:windows /nodefaultlib:libcmt.lib
+LDLIBS:=winmm.lib comdlg32.lib gdi32.lib user32.lib
LDLIBS+=PhysXLoader.lib
-LDLIBS+=$(TOPDIR)/storm/lib/minizip.lib
-LDLIBS+=$(TOPDIR)/storm/lib/zlib.lib
-LDLIBS_d3d:=d3d9.lib d3dx9_33.lib dinput8.lib dxguid.lib vfw32.lib
-LDLIBS_opengl:=glew32.dll opengl32.lib glu32.lib SDL.lib SDL_image.lib SDL_ttf.lib
+LDLIBS+=minizip.lib zlib.lib
+LDLIBS_d3d:=d3d9.lib d3dx9.lib dinput8.lib dxguid.lib vfw32.lib
+LDLIBS_opengl:=glew32.lib opengl32.lib glu32.lib SDL.lib SDL_image.lib SDL_ttf.lib
-LDLIBS_fmod:=fmod.lib
+LDLIBS_fmod:=fmodvc.lib
LDLIBS_openal:=boost-thread.lib
+# FIXME: WTF is this?
+LDLIBS+=/nodefaultlib:LIBCD.lib
+
+
OBJSUFFIX:=.obj
EXESUFFIX:=.exe
@@ -81,7 +85,7 @@ PHYSX_INCDIR:=/usr/include/PhysX
PHYSX_PARTS:=Physics Cooking NxExtensions NxCharacter Foundation PhysXLoader
PHYSX_INCLUDE_DIRS:=$(foreach dir,$(PHYSX_PARTS), $(PHYSX_INCDIR)/v$(PHYSX_VERSION)/SDKs/$(dir)/include)
-LPHYSX:=-L$(PHYSX_LIBDIR)/v$(PHYSX_VERSION)
+LPHYSX:=
IPHYSX:=$(foreach dir,$(PHYSX_INCLUDE_DIRS),-I$(dir))
@@ -21,7 +21,7 @@
//#define PHYSX_SPAWN_TEST
#ifdef PHYSX_SPAWN_TEST
-#include "NxPhysics.h"
+#include <NxPhysics.h>
struct BoxStruct
{
@@ -2,7 +2,7 @@
#include "precompiled.h"
#include "actor_base.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
#include <cassert>
namespace frozenbyte {
@@ -2,7 +2,7 @@
#include "precompiled.h"
#include "box_actor.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
#include <vector>
#include <stdio.h>
@@ -3,7 +3,7 @@
#include "physics_lib.h"
#include "capsule_actor.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -2,7 +2,7 @@
#include "precompiled.h"
#include "car_actor.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -3,7 +3,7 @@
#include "convex_actor.h"
#include "file_stream.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
View
@@ -6,7 +6,7 @@
#include <IStorm3D_Model.h>
#include <IStorm3D_Mesh.h>
-#include "NxPhysics.h"
+#include <NxPhysics.h>
#include "NxCooking.h"
#include <vector>
#include <deque>
@@ -2,7 +2,7 @@
#include "physics_lib.h"
#include "d6_joint.h"
#include "actor_base.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -3,7 +3,7 @@
#include "../filesystem/input_stream.h"
#include "../filesystem/output_stream.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
#include "NxStream.h"
namespace frozenbyte {
View
@@ -2,7 +2,7 @@
#include "precompiled.h"
#include "fluid.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -2,7 +2,7 @@
#include "precompiled.h"
#include "heightmap_actor.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -1,6 +1,6 @@
#include "precompiled.h"
#include "joint_base.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -13,7 +13,7 @@
#include "spherical_joint.h"
#include "d6_joint.h"
#include "fluid.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
#include "../system/Logger.h"
#include "../game/physics/physics_collisiongroups.h"
#include <boost/lexical_cast.hpp>
@@ -2,7 +2,7 @@
#include "precompiled.h"
#include "rack_actor.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -1,7 +1,7 @@
#include "precompiled.h"
#include "spherical_joint.h"
#include "actor_base.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -3,7 +3,7 @@
#include "static_mesh_actor.h"
#include "file_stream.h"
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
namespace physics {
@@ -5,7 +5,7 @@
#include "visualizer.h"
#include "physics_lib.h"
#include <IStorm3D_Scene.h>
-#include "NxPhysics.h"
+#include <NxPhysics.h>
namespace frozenbyte {
@@ -12,7 +12,7 @@
#include "Storm3D_Datatypes.h"
// FIXME : standard stdint.h header is missing on MSVC
-#ifdef WIN32
+#ifdef _WIN32
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
#else
@@ -14,7 +14,7 @@
//------------------------------------------------------------------
// Defines for DLL export/import
//------------------------------------------------------------------
-#ifdef __GNUC__
+#if defined(__GNUC__) || defined (DISABLE_STORM_DLL)
// on targets using gcc we build a single monolithic binary
#define ST3D_EXP_DLLAPI
#define ST3D_IMP_DLLAPI
View
@@ -37,7 +37,7 @@ namespace __gnu_cxx
#else // __GNUC__
-#define FB_HASH_MAP std::hash_map
+#define FB_HASH_MAP stdext::hash_map
#endif // __GNUC__

0 comments on commit 5a322ce

Please sign in to comment.