LIB_SND_MODPLUG=`pkg-config --libs libmodplug`
endif
+ifdef LINK_TO_ODE
+CFLAGS_ODE=-DLINK_TO_ODE `pkg-config --cflags ode`
+LIB_ODE=`pkg-config --libs ode`
+endif
+
ifdef LINK_TO_ZLIB
CFLAGS_ZLIB=-DLINK_TO_ZLIB
LIB_ZLIB=-lz
# NOTE: *never* *ever* use the -ffast-math or -funsafe-math-optimizations flag
# Additional stuff for libode
-LIB_ODE=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --libs` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -lstdc++`
-CFLAGS_ODE=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --cflags || { [ -n "$(DP_ODE_DYNAMIC)" ] && echo \ -DODE_DYNAMIC; }` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -DODE_STATIC`
+LIB_ODE?=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --libs` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -lstdc++`
+CFLAGS_ODE?=`[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && "$(DP_ODE_STATIC_LIBDIR)/../bin/ode-config" --cflags || { [ -n "$(DP_ODE_DYNAMIC)" ] && echo \ -DODE_DYNAMIC; }` `[ -n "$(DP_ODE_STATIC_LIBDIR)" ] && echo -DODE_STATIC`
SDL_CONFIG?=sdl-config
// physics engine support
//============================================================================
+// backwards compat
+#ifdef ODE_STATIC
+# define LINK_TO_ODE 1
+#endif
+
+#ifndef LINK_TO_ODE
+# define ODE_DYNAMIC 1
+#endif
+
+#if defined(LINK_TO_ODE) || defined(ODE_DYNAMIC)
+#define USEODE 1
+#endif
+
#ifdef USEODE
cvar_t physics_ode_quadtree_depth = {0, "physics_ode_quadtree_depth","5", "desired subdivision level of quadtree culling space"};
cvar_t physics_ode_allowconvex = {0, "physics_ode_allowconvex", "0", "allow usage of Convex Hull primitive type on trimeshes that have custom 'collisionconvex' mesh. If disabled, trimesh primitive type are used."};
// LordHavoc: this large chunk of definitions comes from the ODE library
// include files.
-#ifdef ODE_STATIC
+#ifdef LINK_TO_ODE
#include "ode/ode.h"
#else
#ifdef WINAPI
void World_Start(world_t *world);
void World_End(world_t *world);
-// physics macros
-#ifndef ODE_STATIC
-# define ODE_DYNAMIC 1
-#endif
-
-#if defined(ODE_STATIC) || defined(ODE_DYNAMIC)
-# define USEODE 1
-#endif
-
// update physics
// this is called by SV_Physics
void World_Physics_Frame(world_t *world, double frametime, double gravity);