SHARE
TWEET

OS X Xbox Controller Brew Makefile

a guest Jul 19th, 2015 196 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PYTHON_INCLUDE = /usr/local/Frameworks/Python.framework/Versions/2.7/include/python2.7
  2. BOOST_INCLUDE = /usr/local/Cellar/boost/1.58.0/include
  3. SDL_INCLUDE = /usr/local/include
  4.  
  5. BASE_LIB_DIR = /usr/local/lib
  6. PYTHON_LIB_DIR = /Library/Frameworks/Python.framework/Versions/2.7/lib/
  7. FORTRAN_LIB_DIR = /usr/local/Cellar/gcc/5.1.0/lib/gcc/5
  8.  
  9. PYTHON_LIB = python2.7
  10. BOOST_LIB = boost_python
  11. SDL_LIB = SDL
  12.  
  13. # got the below line from running sdl-config --cflags --libs
  14. FLAGS_FROM_SDL = -L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa -I/usr/local/include/SDL -D_GNU_SOURCE=1 -D_THREAD_SAFE
  15.  
  16. TARGET = boost_xbox_controller
  17.  
  18. COMBINED_FLAGS = -L$(FORTRAN_LIB_DIR) -L$(BASE_LIB_DIR) -L$(PYTHON_LIB_DIR) -l$(BOOST_LIB) -l$(PYTHON_LIB) -l$(SDL_LIB) -I$(PYTHON_INCLUDE) -I$(BOOST_INCLUDE) -I$(SDL_INCLUDE) $(FLAGS_FROM_SDL)
  19.  
  20. # .so file is the file that python will import as a module
  21. $(TARGET).so: $(TARGET).o
  22.         g++ -shared $(TARGET).o $(COMBINED_FLAGS) -o $(TARGET).so
  23.  
  24. $(TARGET).o: $(TARGET).cpp
  25.         g++ $(COMBINED_FLAGS) -fPIC -c $(TARGET).cpp
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top