mirror of
https://github.com/bulletphysics/bullet3
synced 2025-01-10 17:30:12 +00:00
make MayaPlugin work under Mac OSX (intel/x86), build/install:
make -f Makefile.mac make install -f Makefile.mac It assumes Maya is installed in the default location, and plugin will install in default /Users/Shared/Autodesk/maya folder.
This commit is contained in:
parent
bf5eafb759
commit
ff46ceb519
79
Extras/MayaPlugin/Makefile.mac
Normal file
79
Extras/MayaPlugin/Makefile.mac
Normal file
@ -0,0 +1,79 @@
|
||||
#MayaPlugin Makefile
|
||||
|
||||
MAYA_LOCATION?=/Applications/Autodesk/maya2008/devkit
|
||||
|
||||
## MAYA_LOCATION is the Maya installation directory. It should be already defined in your
|
||||
# environment variables. If not, please change it to the appropriate directory
|
||||
MAYA=$(MAYA_LOCATION)
|
||||
|
||||
## Change this if you want to change the installation directory
|
||||
MAYA_PLUG_IN_PATH=/usr/maya-plugins
|
||||
|
||||
## Change this if you want to change the name of the final plugin
|
||||
LIBRARY=dynamicaMayaPlugin.bundle
|
||||
|
||||
##################################
|
||||
|
||||
BULLET=../..
|
||||
|
||||
CPP = g++
|
||||
LD = ld
|
||||
|
||||
CPPFLAGS = -DMAC_PLUGIN -DOSMac_MachO_ -DBits32_ -m32 -DUNIX -D_BOOL -DOSMac_ -DFUNCPROTO -D_GNU_SOURCE -fPIC \
|
||||
-fno-strict-aliasing -DREQUIRE_IOSTREAM -Wno-deprecated -Wall \
|
||||
-Wno-multichar -Wno-comment -Wno-sign-compare -funsigned-char \
|
||||
-Wno-reorder -fno-gnu-keywords -ftemplate-depth-25 -pthread \
|
||||
-Wno-deprecated -fno-gnu-keywords \
|
||||
-g
|
||||
|
||||
LDFLAGS =-bundle -ldl -shared
|
||||
|
||||
BULLET_INCLUDE=-I$(BULLET)/src -I$(BULLET)/Extras/GIMPACT/include
|
||||
BULLET_LIB=-L$(BULLET)/out/macosxx86/optimize/libs -L$(BULLET)/src \
|
||||
-lGIMPACT -lGIMPACTUtils -lbulletdynamics \
|
||||
-lbulletmath -lbulletcollision -lbulletopenglsupport
|
||||
|
||||
GL_LIB=-framework OpenGL
|
||||
|
||||
MAYA_INCLUDE=-I$(MAYA)/include
|
||||
MAYA_LIB=-L/Applications/Autodesk/maya2008/Maya.app/Contents/MacOS -lOpenMaya -lFoundation -Wl,-executable_path,/Applications/Autodesk/maya2008/Maya.app/Contents/MacOS -lOpenMayaUI -lOpenMayaFX -lOpenMaya -lFoundation
|
||||
|
||||
SOURCES = pluginMain.cpp rigidBodyNode.cpp rigidBodyArrayNode.cpp collisionShapeNode.cpp \
|
||||
solver.cpp bt_solver.cpp dSolverNode.cpp dSolverCmd.cpp dRigidBodyCmd.cpp dRigidBodyArrayCmd.cpp \
|
||||
pdbIO.cpp drawUtils.cpp
|
||||
|
||||
HEADERS = box_shape.h bt_sphere_shape.h dSolverNode.h rigid_body_impl.h \
|
||||
box_shape_impl.h collision_shape.h mathUtils.h rigidBodyNode.h \
|
||||
bt_box_shape.h collision_shape_impl.h mayaUtils.h solver.h \
|
||||
bt_collision_shape.h collisionShapeNode.h mesh_shape.h solver_impl.h \
|
||||
bt_convex_hull_shape.h convex_hull_shape.h mesh_shape_impl.h sphere_shape.h \
|
||||
bt_mesh_shape.h convex_hull_shape_impl.h plane_shape.h sphere_shape_impl.h \
|
||||
bt_plane_shape.h dRigidBodyArrayCmd.h plane_shape_impl.h \
|
||||
bt_rigid_body.h dRigidBodyCmd.h rigidBodyArrayNode.h \
|
||||
bt_solver.h dSolverCmd.h rigid_body.h pdbIO.h \
|
||||
shared_ptr.h drawUtils.h
|
||||
|
||||
|
||||
INCLUDE_FLAGS= $(GL_INCLUDE) $(BULLET_INCLUDE) $(MAYA_INCLUDE)
|
||||
LIB_FLAGS=$(BULLET_LIB) $(MAYA_LIB) $(GL_LIB)
|
||||
|
||||
OBJECTS=$(SOURCES:.cpp=.o)
|
||||
|
||||
all: $(SOURCES) $(LIBRARY)
|
||||
|
||||
.cpp.o: $(SOURCES) $(HEADERS)
|
||||
$(CPP) -c $< $(CPPFLAGS) $(INCLUDE_FLAGS) -o $@
|
||||
|
||||
$(OBJECTS): $(HEADERS)
|
||||
|
||||
$(LIBRARY): $(OBJECTS)
|
||||
$(CPP) $(OBJECTS) $(LDFLAGS) $(LIB_FLAGS) -o $@
|
||||
|
||||
install: $(LIBRARY)
|
||||
cp -f $(LIBRARY) /Users/Shared/Autodesk/maya/plug-ins
|
||||
cp -f scripts/*.mel /Users/Shared/Autodesk/maya/scripts
|
||||
cp -f icons/*.xpm /Users/Shared/Autodesk/maya/icons
|
||||
|
||||
clean:
|
||||
rm -f *.o *.bundle
|
||||
|
@ -25,7 +25,18 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
#ifndef DYN_BT_SPHERE_SHAPE_H
|
||||
#define DYN_BT_SPHERE_SHAPE_H
|
||||
|
||||
#ifdef WIN32//for glut.h
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
//think different
|
||||
#if defined(__APPLE__) && !defined (VMDMESA)
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include "sphere_shape_impl.h"
|
||||
#include "bt_collision_shape.h"
|
||||
|
@ -22,8 +22,20 @@ Written by: Nicola Candussi <nicola@fluidinteractive.com>
|
||||
|
||||
//drawUtils.cpp
|
||||
|
||||
#ifdef WIN32//for glut.h
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
//think different
|
||||
#if defined(__APPLE__) && !defined (VMDMESA)
|
||||
#include <OpenGL/gl.h>
|
||||
#include <OpenGL/glu.h>
|
||||
#include <GLUT/glut.h>
|
||||
#else
|
||||
#include <GL/gl.h>
|
||||
#include <GL/glu.h>
|
||||
#endif
|
||||
|
||||
|
||||
void wire_cube()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user