#! /bin/bash
gcc -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/usr/local/include -fPIC -g -O2 -m64 -I/usr/local/include -fPIC -g -O2 -m64 -I/Applications/usr/include -I/usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c giacpy.cpp -o build/temp.macosx-10.10-x86_64-2.7/giacpy.o -D HAVE_CONFIG
g++ -Wl,-F. -bundle -undefined dynamic_lookup -m64  build/temp.macosx-10.10-x86_64-2.7/giacpy.o -o giacpy.so -L/Applications/usr/64/local/lib/ ~/giac-1.2.2/src/.libs/libgiac.a /usr/64/local/lib/libntl.a  /usr/64/local/lib/libpari.a /usr/64/local/lib/libmpfi.a /usr/64/local/lib/libmpfr.a /Applications/usr/64/local/lib/libgmp.dylib /usr/64/local/lib/libfltk_images.a /usr/64/local/lib/libfltk.a /usr/64/local/lib/libfltk_gl.a /usr/64/local/lib/libfltk_forms.a /usr/64/local/lib/libfltk_png.a /usr/64/local/lib/libfltk_jpeg.a /usr/64/local/lib/libgsl.a /usr/64/local/lib/libgslcblas.a /usr/64/local/lib/libreadline.a /usr/64/local/lib/libhistory.a /usr/64/local/lib/libintl.a /usr/64/local/lib/libgettextpo.a -liconv -lncurses -lm -lz /Applications/usr/64/local/lib/libao.dylib -framework AGL -framework OpenGL -framework ApplicationServices -lpthread  -framework Cocoa -framework Accelerate
cp giacpy.so /Applications/usr/lib/python2.7/site-packages
install_name_tool -change "/usr/local/lib/libao.4.dylib" "/Applications/usr/64/local/lib/libao.4.dylib" /Applications/usr/lib/python2.7/site-packages/giacpy.so
install_name_tool -change "/usr/local/lib/libgmp.10.dylib" "/Applications/usr/64/local/lib/libgmp.10.dylib" /Applications/usr/lib/python2.7/site-packages/giacpy.so
