OSX support for the PhysX SDK

This commit is contained in:
rdb 2010-11-17 15:35:40 +00:00
parent 3d43d0c8ad
commit 0d12ddf3e9
2 changed files with 15 additions and 22 deletions

View File

@ -636,8 +636,12 @@ if (COMPILER=="LINUX"):
IncDirectory("PHYSX", SDK["PHYSX"] + "/Foundation/include")
IncDirectory("PHYSX", SDK["PHYSX"] + "/Cooking/include")
LibDirectory("PHYSX", SDK["PHYSXLIBS"])
LibName("PHYSX", "-lPhysXLoader")
LibName("PHYSX", "-lNxCharacter")
if (sys.platform == "darwin"):
LibName("PHYSX", SDK["PHYSXLIBS"] + "/osxstatic/PhysXCooking.a")
LibName("PHYSX", SDK["PHYSXLIBS"] + "/osxstatic/PhysXCore.a")
else:
LibName("PHYSX", "-lPhysXLoader")
LibName("PHYSX", "-lNxCharacter")
DefSymbol("ALWAYS", "MAKEPANDA", "")
DefSymbol("WITHINPANDA", "WITHIN_PANDA", "1")
@ -3349,7 +3353,7 @@ if (PkgSkip("ODE")==0 and not RUNTIME):
#
if (PkgSkip("PHYSX")==0):
OPTS=['DIR:panda/src/physx', 'BUILDING:PANDAPHYSX', 'PHYSX']
OPTS=['DIR:panda/src/physx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOPPC']
TargetAdd('physx_composite.obj', opts=OPTS, input='physx_composite.cxx')
IGATEFILES=GetDirectoryContents('panda/src/physx', ["*.h", "*_composite.cxx"])
TargetAdd('libpandaphysx.in', opts=OPTS, input=IGATEFILES)
@ -3361,7 +3365,7 @@ if (PkgSkip("PHYSX")==0):
#
if (PkgSkip("PHYSX")==0):
OPTS=['DIR:panda/metalibs/pandaphysx', 'BUILDING:PANDAPHYSX', 'PHYSX']
OPTS=['DIR:panda/metalibs/pandaphysx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOPPC']
TargetAdd('pandaphysx_pandaphysx.obj', opts=OPTS, input='pandaphysx.cxx')
TargetAdd('libpandaphysx_module.obj', input='libpandaphysx.in')
@ -3373,7 +3377,7 @@ if (PkgSkip("PHYSX")==0):
TargetAdd('libpandaphysx.dll', input='physx_composite.obj')
TargetAdd('libpandaphysx.dll', input='libpandaphysx_igate.obj')
TargetAdd('libpandaphysx.dll', input=COMMON_PANDA_LIBS)
TargetAdd('libpandaphysx.dll', opts=['WINUSER', 'PHYSX'])
TargetAdd('libpandaphysx.dll', opts=['WINUSER', 'PHYSX', 'NOPPC'])
#
# DIRECTORY: panda/src/physics/

View File

@ -17,34 +17,23 @@
// Platform-specific defines
#ifdef WIN32
#if _WIN64 || __amd64__
#define NX64 1
#else
#define NX32 1
#if NATIVE_WORDSIZE == 64
#define NX64
#endif
#if NATIVE_WORDSIZE == 32
#define NX32
#endif
#ifdef IS_LINUX
#define LINUX 1
#ifdef _LP64
#define NX64 1
#else
#define NX32 1
#endif
#define CORELIB 1
#define NX_DISABLE_FLUIDS 1
#define NX_DISABLE_HARDWARE 1
#endif
#ifdef IS_FREEBSD
#endif
#ifdef IS_OSX
#endif
// Undefine min and max before ay PhysX headers get included
// Undefine min and max before any PhysX headers get included
#undef min
#undef max