Browse Source

libigl.a and mosek/tetgen extras compile on redhat (with some warnings and removed deprecations), static library makefile for anttweakbar

Former-commit-id: 3d067452a799042723747a5d2cbf6564afbc4b4e
jalec 13 years ago
parent
commit
13020d0872
61 changed files with 250 additions and 61 deletions
  1. 3 3
      Makefile
  2. 38 1
      Makefile.conf
  3. 5 2
      examples/Core/Makefile
  4. 4 1
      examples/MatlabWorkspace/Makefile
  5. 7 3
      examples/ReAntTweakBar/Makefile
  6. 4 1
      examples/affine/Makefile
  7. 4 1
      examples/cat/Makefile
  8. 4 1
      examples/dmat/Makefile
  9. 4 1
      examples/eigen-gotchas/Makefile
  10. 3 0
      examples/example_fun/Makefile
  11. 3 0
      examples/file_contents_as_string/Makefile
  12. 3 0
      examples/get_seconds/Makefile
  13. 3 0
      examples/glslversion/Makefile
  14. 3 0
      examples/glut_speed_test/Makefile
  15. 4 1
      examples/harwell_boeing/Makefile
  16. 3 0
      examples/is_dir/Makefile
  17. 4 1
      examples/marching_cubes/Makefile
  18. 4 1
      examples/meshio/Makefile
  19. 4 1
      examples/mode/Makefile
  20. 3 0
      examples/path_tests/Makefile
  21. 3 0
      examples/pathinfo/Makefile
  22. 4 1
      examples/slice/Makefile
  23. 4 1
      examples/sort/Makefile
  24. 3 0
      examples/stdin_to_temp/Makefile
  25. 3 0
      examples/trackball/Makefile
  26. 4 1
      examples/transpose_blocks/Makefile
  27. 1 0
      include/igl/ReAntTweakBar.cpp
  28. 4 0
      include/igl/adjacency_matrix.cpp
  29. 5 0
      include/igl/cat.cpp
  30. 5 0
      include/igl/cotmatrix.cpp
  31. 5 4
      include/igl/create_index_vbo.h
  32. 5 4
      include/igl/create_mesh_vbo.h
  33. 6 5
      include/igl/create_shader_program.h
  34. 5 4
      include/igl/create_vector_vbo.h
  35. 4 3
      include/igl/destroy_shader_program.h
  36. 4 0
      include/igl/diag.cpp
  37. 2 0
      include/igl/get_seconds.cpp
  38. 1 0
      include/igl/launch_medit.cpp
  39. 4 3
      include/igl/load_shader.h
  40. 9 1
      include/igl/lu_lagrange.cpp
  41. 1 0
      include/igl/min_quad_dense.cpp
  42. 4 1
      include/igl/min_quad_with_fixed.cpp
  43. 4 1
      include/igl/min_quad_with_fixed.h
  44. 5 3
      include/igl/mosek/Makefile
  45. 1 1
      include/igl/mosek/mosek_quadprog.cpp
  46. 1 1
      include/igl/mosek/mosek_quadprog.h
  47. 1 0
      include/igl/pathinfo.cpp
  48. 5 3
      include/igl/print_program_info_log.h
  49. 4 3
      include/igl/print_shader_info_log.h
  50. 4 0
      include/igl/read.cpp
  51. 1 0
      include/igl/readOBJ.cpp
  52. 2 0
      include/igl/readOFF.cpp
  53. 4 0
      include/igl/repdiag.cpp
  54. 4 0
      include/igl/slice.cpp
  55. 4 0
      include/igl/slice_into.cpp
  56. 4 0
      include/igl/sparse.cpp
  57. 2 2
      include/igl/tetgen/Makefile
  58. 1 0
      include/igl/texture_from_tga.cpp
  59. 4 0
      include/igl/upsample.cpp
  60. 2 1
      include/igl/writeOBJ.cpp
  61. 1 0
      include/igl/writeOFF.cpp

+ 3 - 3
Makefile

@@ -6,7 +6,7 @@ include Makefile.conf
 
 # optimized default settings
 all: LFLAGS +=
-OPTFLAGS=-O3 -DNDEBUG -j
+OPTFLAGS=-O3 -DNDEBUG
 debug: OPTFLAGS= -g -Wall -Werror
 CFLAGS += $(OPTFLAGS)
 
@@ -52,11 +52,11 @@ INC+=-Iinclude/
 #############################################################################
 
 # Eigen dependency
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
+EIGEN3_INC=-I$(OPT)/local/include/eigen3 -I$(OPT)/local/include/eigen3/unsupported
 INC+=$(EIGEN3_INC)
 
 # AntTweakBar dependency
-ANTTWEAKBAR_INC=-I/opt/local/include
+ANTTWEAKBAR_INC=-I$(OPT)/local/include
 INC+=$(ANTTWEAKBAR_INC)
 
 ## OpenGL dependency

+ 38 - 1
Makefile.conf

@@ -1,19 +1,56 @@
 #############################################################################
 # FLAGS 
 #############################################################################
-AFLAGS += -arch x86_64 -m64
+UNAME := $(shell uname)
+
 CFLAGS += -Wall
 
+ifeq ($(UNAME), Linux)
+	OPT = /usr/
+else
+	OPT = /opt/
+	# I guess arch only works in Mac OSX
+	AFLAGS += -arch x86_64 -m64
+endif
+
+
 # Default parameters for the IGL group members based on there computer's
 # username
 ifndef IGL_USERNAME
 	IGL_USERNAME := $(shell whoami)
 endif
+
 ifeq ($(IGL_USERNAME),ajx)
+	MOSEKPLATFORM=osx64x86
 	IGL_WITH_TETGEN=1
 	IGL_WITH_MATLAB=1
 	IGL_WITH_MOSEK=1
 endif
+
+ifeq ($(IGL_USERNAME),jalec)
+	MOSEKPLATFORM=linux64x86
+	IGL_WITH_TETGEN=1
+	IGL_WITH_MATLAB=0
+	IGL_WITH_MOSEK=1
+	OPENGL_LIB=-lGL -lGLU
+	GLUT_LIB=-lglut
+	ANTTWEAKBAR_LIB=-lAntTweakBar
+endif
 ifeq ($(IGL_USERNAME),daniele)
 	IGL_WITH_MATLAB=1
 endif
+
+#############################################################################
+# DEFAULTS (USUALLY TO SOMETHING THAT WORKS FOR SURE ON MAC OS X
+#############################################################################
+
+ifndef OPENGL_LIB
+	OPENGL_LIB=-framework OpenGL
+endif
+ifndef GLUT_LIB
+	GLUT_LIB=-framework GLUT
+endif
+ifndef ANTTWEAKBAR_LIB
+	# AntTweakBar needs AppKit on mac os x
+	ANTTWEAKBAR_LIB=-lAntTweakBar -framework AppKit
+endif

+ 5 - 2
examples/Core/Makefile

@@ -1,8 +1,11 @@
 
 all: example1
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 igl_lib=../../
-eigen_lib=/opt/local/include/eigen3/
+eigen_lib=$(OPT)/local/include/eigen3/
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include -I$(eigen_lib)
@@ -12,7 +15,7 @@ matlab_inc=-I$(MATLAB)/extern/include
 matlab_lib=-L$(MATLAB)/bin/maci64/ -leng -lmx
 
 example1: example1.o
-	g++ $(CFLAGS) -o example1 example1.o -framework OpenGL -framework GLUT $(lib)
+	g++ $(CFLAGS) -o example1 example1.o $(OPENGL_LIB) $(GLUT_LIB) $(lib)
 
 example1.o: example1.cpp
 	g++ $(CFLAGS) -c example1.cpp -o example1.o $(inc)

+ 4 - 1
examples/MatlabWorkspace/Makefile

@@ -1,10 +1,13 @@
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 IGL=../../
 IGL_LIB=-L$(IGL)/lib -ligl
 IGL_INC=-I$(IGL)/include
 
-EIGEN3_INC=-I/usr/local/include/eigen3 -I/usr/local/include/eigen3/unsupported -I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
+EIGEN3_INC=-I/usr/local/include/eigen3 -I/usr/local/include/eigen3/unsupported -I$(OPT)/local/include/eigen3 -I$(OPT)/local/include/eigen3/unsupported
 
 MATLAB_INC=-I$(MATLAB)/extern/include/
 MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat

+ 7 - 3
examples/ReAntTweakBar/Makefile

@@ -1,17 +1,21 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
 
-lib=-lAntTweakBar -framework AppKit -L$(igl_lib)/lib -ligl -L/opt/local/lib
-inc=-I$(igl_lib)/include -I/opt/local/include
+APPKIT_LIB =
+lib= $(ANTTWEAKBAR_LIB) -L$(igl_lib)/lib -ligl -L$(OPT)/local/lib $(OPENGL_LIB) $(GLUT_LIB)
+inc=-I$(igl_lib)/include -I$(OPT)/local/include
 
 example: example.o
-	g++ $(CFLAGS) -o example example.o -framework OpenGL -framework GLUT $(lib)
+	g++ $(CFLAGS) -o example example.o $(lib)
 
 example.o: example.cpp
 	g++ $(CFLAGS) -c example.cpp -o example.o $(inc)

+ 4 - 1
examples/affine/Makefile

@@ -3,10 +3,13 @@
 
 all: example
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 .PHONY: example
 
 igl_lib=../../
-eigen=/opt/local/include/eigen3
+eigen=$(OPT)/local/include/eigen3
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include -I$(eigen)

+ 4 - 1
examples/cat/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=/opt/local/include/eigen3/
+eigen=$(OPT)/local/include/eigen3/
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include -I$(eigen)

+ 4 - 1
examples/dmat/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=/opt/local/include/eigen3
+eigen=$(OPT)/local/include/eigen3
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include -I$(eigen)

+ 4 - 1
examples/eigen-gotchas/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
+eigen=-I$(OPT)/local/include/eigen3 -I$(OPT)/local/include/eigen3/unsupported
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include $(eigen)

+ 3 - 0
examples/example_fun/Makefile

@@ -2,6 +2,9 @@
 
 all: example_static example_header_only
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 igl_lib=../../
 
 CFLAGS=-g

+ 3 - 0
examples/file_contents_as_string/Makefile

@@ -1,6 +1,9 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example

+ 3 - 0
examples/get_seconds/Makefile

@@ -1,6 +1,9 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example

+ 3 - 0
examples/glslversion/Makefile

@@ -1,6 +1,9 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example

+ 3 - 0
examples/glut_speed_test/Makefile

@@ -3,6 +3,9 @@
 
 all: example
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 .PHONY: example
 
 igl_lib=../../

+ 4 - 1
examples/harwell_boeing/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
+eigen=-I$(OPT)/local/include/eigen3 -I$(OPT)/local/include/eigen3/unsupported
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include $(eigen)

+ 3 - 0
examples/is_dir/Makefile

@@ -1,6 +1,9 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example

+ 4 - 1
examples/marching_cubes/Makefile

@@ -5,8 +5,11 @@ all: example
 
 .PHONY: example
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 igl_lib=../../
-eigen=-I/opt/local/include/eigen3
+eigen=-I$(OPT)/local/include/eigen3
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include $(eigen)

+ 4 - 1
examples/meshio/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=-I/opt/local/include/eigen3
+eigen=-I$(OPT)/local/include/eigen3
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include $(eigen)

+ 4 - 1
examples/mode/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=/opt/local/include/eigen3/
+eigen=$(OPT)/local/include/eigen3/
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include -I$(eigen)

+ 3 - 0
examples/path_tests/Makefile

@@ -1,6 +1,9 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example

+ 3 - 0
examples/pathinfo/Makefile

@@ -3,6 +3,9 @@
 
 all: example
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 .PHONY: example
 
 igl_lib=../../

+ 4 - 1
examples/slice/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
+eigen=-I$(OPT)/local/include/eigen3 -I$(OPT)/local/include/eigen3/unsupported
 
 #CFLAGS=-g
 CFLAGS=-Os -DNDEBUG

+ 4 - 1
examples/sort/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=/opt/local/include/eigen3/
+eigen=$(OPT)/local/include/eigen3/
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include -I$(eigen)

+ 3 - 0
examples/stdin_to_temp/Makefile

@@ -1,6 +1,9 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example

+ 3 - 0
examples/trackball/Makefile

@@ -3,6 +3,9 @@
 
 all: example
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 .PHONY: example
 
 igl_lib=../../

+ 4 - 1
examples/transpose_blocks/Makefile

@@ -1,12 +1,15 @@
 
 .PHONY: all
 
+# Shared flags etc.
+include ../../Makefile.conf
+
 all: example
 
 .PHONY: example
 
 igl_lib=../../
-eigen=/opt/local/include/eigen3
+eigen=$(OPT)/local/include/eigen3
 
 CFLAGS=-g
 inc=-I$(igl_lib)/include -I$(eigen)

+ 1 - 0
include/igl/ReAntTweakBar.cpp

@@ -1,6 +1,7 @@
 #include "ReAntTweakBar.h"
 
 #include <cstdio>
+#include <cstring>
 #include <sstream>
 #include <map>
 

+ 4 - 0
include/igl/adjacency_matrix.cpp

@@ -2,6 +2,10 @@
 
 #include "verbose.h"
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <typename T>
 IGL_INLINE void igl::adjacency_matrix(
   const Eigen::MatrixXi & F, 

+ 5 - 0
include/igl/cat.cpp

@@ -1,4 +1,9 @@
 #include "cat.h"
+#include <cstdio>
+
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
 
 // Sparse matrices need to be handled carefully. Because C++ does not 
 // Template:

+ 5 - 0
include/igl/cotmatrix.cpp

@@ -4,6 +4,10 @@
 #include <cstdio>
 #include "cotangent.h"
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <typename DerivedV, typename DerivedF, typename Scalar>
 IGL_INLINE void igl::cotmatrix(
   const Eigen::MatrixBase<DerivedV> & V, 
@@ -12,6 +16,7 @@ IGL_INLINE void igl::cotmatrix(
 {
   using namespace igl;
   using namespace Eigen;
+  Eigen::DynamicSparseMatrix<double> foo;
 
   DynamicSparseMatrix<Scalar, RowMajor> dyn_L (V.rows(), V.rows());
   Matrix<int,Dynamic,2> edges;

+ 5 - 4
include/igl/create_index_vbo.h

@@ -5,15 +5,16 @@
 
 #include <Eigen/Core>
 
-#if __APPLE__
+#ifdef __APPLE__
 #  include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
+#else
+#define GL_GLEXT_PROTOTYPES
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
 
 // Create a VBO (Vertex Buffer Object) for a list of indices:

+ 5 - 4
include/igl/create_mesh_vbo.h

@@ -5,15 +5,16 @@
 
 #include <Eigen/Core>
 
-#if __APPLE__
+#ifdef __APPLE__
 #  include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
+#else
+#define GL_GLEXT_PROTOTYPES
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
 
 // Create a VBO (Vertex Buffer Object) for a mesh. Actually two VBOs: one 

+ 6 - 5
include/igl/create_shader_program.h

@@ -5,14 +5,15 @@
 #include <map>
 
 #ifdef __APPLE__
-#   include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#  include <OpenGL/gl.h>
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
-#   include <GL/gl.h>
+#else
+#define GL_GLEXT_PROTOTYPES
+#  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
 
 namespace igl

+ 5 - 4
include/igl/create_vector_vbo.h

@@ -5,15 +5,16 @@
 
 #include <Eigen/Core>
 
-#if __APPLE__
+#ifdef __APPLE__
 #  include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
+#else
+#define GL_GLEXT_PROTOTYPES
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
 
 // Create a VBO (Vertex Buffer Object) for a list of vectors:

+ 4 - 3
include/igl/destroy_shader_program.h

@@ -4,13 +4,14 @@
 
 #ifdef __APPLE__
 #  include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
+#else
+#define GL_GLEXT_PROTOTYPES
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
 
 namespace igl

+ 4 - 0
include/igl/diag.cpp

@@ -2,6 +2,10 @@
 
 #include "verbose.h"
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <typename T>
 IGL_INLINE void igl::diag(
   const Eigen::SparseMatrix<T>& X, 

+ 2 - 0
include/igl/get_seconds.cpp

@@ -1,4 +1,6 @@
 #include "get_seconds.h"
+// NULL for Linux
+#include <cstddef>
 
 #if _WIN32
 #  include <ctime>

+ 1 - 0
include/igl/launch_medit.cpp

@@ -1,5 +1,6 @@
 #include "launch_medit.h"
 #include "writeMESH.h"
+#include <cstdio>
 #include <iostream>
 #include <string>
 #include <sstream>

+ 4 - 3
include/igl/load_shader.h

@@ -4,13 +4,14 @@
 
 #ifdef __APPLE__
 #  include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
+#else
+#define GL_GLEXT_PROTOTYPES
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
 
 namespace igl

+ 9 - 1
include/igl/lu_lagrange.cpp

@@ -1,7 +1,10 @@
 #include "lu_lagrange.h"
 
 // Cholesky LLT decomposition for symmetric positive definite
-#include <Eigen/SparseExtra>
+//#include <Eigen/SparseExtra>
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
 #include <cassert>
 #include "find.h"
 #include "sparse.h"
@@ -13,6 +16,10 @@ IGL_INLINE bool igl::lu_lagrange(
   Eigen::SparseMatrix<T> & L,
   Eigen::SparseMatrix<T> & U)
 {
+#if EIGEN_VERSION_AT_LEAST(3,0,92)
+#  warning lu_lagrange has not yet been implemented for your Eigen Version
+  return false;
+#else
   // number of unknowns
   int n = ATA.rows();
   // number of lagrange multipliers
@@ -130,6 +137,7 @@ IGL_INLINE bool igl::lu_lagrange(
   }
 
   return true;
+  #endif
 }
 
 #ifndef IGL_HEADER_ONLY

+ 1 - 0
include/igl/min_quad_dense.cpp

@@ -3,6 +3,7 @@
 #include <Eigen/Core>
 #include <Eigen/LU>
 #include "EPS.h"
+#include <cstdio>
 
 template <typename T>
 IGL_INLINE void igl::min_quad_dense_precompute(

+ 4 - 1
include/igl/min_quad_with_fixed.cpp

@@ -1,6 +1,9 @@
 #include "min_quad_with_fixed.h"
 
-#include <Eigen/SparseExtra>
+//#include <Eigen/SparseExtra>
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
 #include <cassert>
 #include <cstdio>
 #include <iostream>

+ 4 - 1
include/igl/min_quad_with_fixed.h

@@ -6,7 +6,10 @@
 #include <Eigen/Core>
 #include <Eigen/Dense>
 #include <Eigen/Sparse>
-#include <Eigen/SparseExtra>
+//#include <Eigen/SparseExtra>
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
 
 namespace igl
 {

+ 5 - 3
include/igl/mosek/Makefile

@@ -5,7 +5,7 @@ all: libiglmosek
 debug: libiglmosek
 
 include ../../../Makefile.conf
-all: CFLAGS += -O3 -DNDEBUG -j 
+all: CFLAGS += -O3 -DNDEBUG
 debug: CFLAGS += -g -Wall -Werror
 
 .PHONY: libiglmosek
@@ -20,12 +20,14 @@ INC+=-I../../../include/
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 # Eigen dependency
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
+EIGEN3_INC=-I$(OPT)/local/include/eigen3 -I$(OPT)/local/include/eigen3/unsupported
 INC+=$(EIGEN3_INC)
 
 # mosek dependency
 # TODO: linux, 32 bit etc
-MOSEKPLATFORM=osx64x86
+ifndef MOSEKPLATFORM
+  MOSEKPLATFORM=osx64x86
+endif
 MOSEK=/usr/local/mosek
 MOSEK_INC=-I$(MOSEK)/6/tools/platform/$(MOSEKPLATFORM)/h
 MOSEK_LIB=-L$(MOSEK)/6/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64

+ 1 - 1
include/igl/mosek/mosek_quadprog.cpp

@@ -7,7 +7,7 @@
 #include "../matrix_to_list.h"
 #include "../list_to_matrix.h"
 #include "../harwell_boeing.h"
-#include "../eps.h"
+#include "../EPS.h"
 
 // Little function mosek needs in order to know how to print to std out
 static void MSKAPI printstr(void *handle, char str[])

+ 1 - 1
include/igl/mosek/mosek_quadprog.h

@@ -78,7 +78,7 @@ namespace igl
     const std::vector<Scalar> & c,
     const Scalar cf,
     const Index m,
-    /* mosek won't allow this to be const*/ std::vector<Scalar> & Ari,
+    /* mosek won't allow this to be const*/ std::vector<Scalar> & Av,
     /* mosek won't allow this to be const*/ std::vector<Index> & Ari,
     const std::vector<Index> & Acp,
     const std::vector<Scalar> & lc,

+ 1 - 0
include/igl/pathinfo.cpp

@@ -4,6 +4,7 @@
 #include "basename.h"
 // Verbose should be removed once everythings working correctly
 #include "verbose.h"
+#include <algorithm>
 
 IGL_INLINE void igl::pathinfo(
   const std::string & path,

+ 5 - 3
include/igl/print_program_info_log.h

@@ -4,14 +4,16 @@
 
 #ifdef __APPLE__
 #  include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
+#else
+#define GL_GLEXT_PROTOTYPES
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
+
 namespace igl
 {
   // Inputs:

+ 4 - 3
include/igl/print_shader_info_log.h

@@ -4,13 +4,14 @@
 
 #ifdef __APPLE__
 #  include <OpenGL/gl.h>
-#else
-#  ifdef _WIN32
+#elif defined(_WIN32)
 #    define NOMINMAX
 #    include <Windows.h>
 #    undef NOMINMAX
-#  endif
+#else
+#define GL_GLEXT_PROTOTYPES
 #  include <GL/gl.h>
+#  include <GL/glext.h>
 #endif
 
 namespace igl

+ 4 - 0
include/igl/read.cpp

@@ -2,6 +2,10 @@
 
 #include "readOBJ.h"
 #include "readOFF.h"
+
+#include <cstdio>
+
+
 template <typename DerivedV, typename DerivedF>
 IGL_INLINE bool igl::read(
                      const std::string str,

+ 1 - 0
include/igl/readOBJ.cpp

@@ -3,6 +3,7 @@
 #include "list_to_matrix.h"
 
 #include <iostream>
+#include <cstdio>
 #include <fstream>
 
 template <typename Scalar, typename Index>

+ 2 - 0
include/igl/readOFF.cpp

@@ -1,5 +1,7 @@
 #include "readOFF.h"
 #include "list_to_matrix.h"
+#include <cstdio>
+
 template <typename Scalar, typename Index>
 IGL_INLINE bool igl::readOFF(
                              const std::string off_file_name, 

+ 4 - 0
include/igl/repdiag.cpp

@@ -1,5 +1,9 @@
 #include "repdiag.h"
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <typename T>
 IGL_INLINE void igl::repdiag(
   const Eigen::SparseMatrix<T>& A,

+ 4 - 0
include/igl/slice.cpp

@@ -2,6 +2,10 @@
 
 #include <vector>
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <typename T>
 IGL_INLINE void igl::slice(
   const Eigen::SparseMatrix<T>& X,

+ 4 - 0
include/igl/slice_into.cpp

@@ -1,5 +1,9 @@
 #include "slice_into.h"
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <typename T>
 IGL_INLINE void igl::slice_into(
   const Eigen::SparseMatrix<T>& X,

+ 4 - 0
include/igl/sparse.cpp

@@ -1,5 +1,9 @@
 #include "sparse.h"
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <class IndexVector, class ValueVector, typename T>
 IGL_INLINE void igl::sparse(
   const IndexVector & I,

+ 2 - 2
include/igl/tetgen/Makefile

@@ -4,7 +4,7 @@ all: libigltetgen
 debug: libigltetgen
 
 include ../../../Makefile.conf
-all: CFLAGS += -O3 -DNDEBUG -j 
+all: CFLAGS += -O3 -DNDEBUG 
 debug: CFLAGS += -g -Wall -Werror
 
 .PHONY: libtetgen
@@ -19,7 +19,7 @@ INC+=-I../../../include/
 # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY 
 
 # Eigen dependency
-EIGEN3_INC=-I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
+EIGEN3_INC=-I$(OPT)/local/include/eigen3 -I$(OPT)/local/include/eigen3/unsupported
 INC+=$(EIGEN3_INC)
 
 # Tetgen dependency

+ 1 - 0
include/igl/texture_from_tga.cpp

@@ -2,6 +2,7 @@
 
 #include "tga.h"
 #include "report_gl_error.h"
+#include <cstring>
 
 IGL_INLINE bool igl::texture_from_tga(const std::string tga_file, GLuint & id)
 {

+ 4 - 0
include/igl/upsample.cpp

@@ -3,6 +3,10 @@
 #include "tt.h"
 #include <Eigen/Dense>
 
+// Bug in unsupported/Eigen/SparseExtra needs iostream first
+#include <iostream>
+#include <unsupported/Eigen/SparseExtra>
+
 template <typename MatV, typename MatF>
 IGL_INLINE void igl::upsample( const MatV & V, const MatF & F, MatV & NV, MatF & NF)
 {

+ 2 - 1
include/igl/writeOBJ.cpp

@@ -95,11 +95,12 @@ IGL_INLINE bool igl::writeOBJ(
       if(write_texture_coords)
         fprintf(obj_file,"/%u",FTC(i,j)+1);
       if(write_N)
+      {
         if (write_texture_coords)
           fprintf(obj_file,"/%u",FN(i,j)+1);
         else
           fprintf(obj_file,"//%u",FN(i,j)+1);
-      
+      }
     }
     fprintf(obj_file,"\n");
   }

+ 1 - 0
include/igl/writeOFF.cpp

@@ -1,4 +1,5 @@
 #include "writeOFF.h"
+#include <cstdio>
 
 // write mesh to an ascii off file
 template <typename DerivedV, typename DerivedF>