Makefile 939 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. all: example1 example2
  2. STATIC_ANTTWEAKBAR=""
  3. igl_lib=../../
  4. eigen_lib=/opt/local/include/eigen3/
  5. ifdef STATIC_ANTTWEAKBAR
  6. CFLAGS=-g -DSTATIC_ANTTWEAKBAR
  7. inc=-I$(igl_lib) -I./static -I$(eigen_lib)
  8. lib= -lAntTweakBar -framework AppKit
  9. else
  10. CFLAGS=-g
  11. inc=-I$(igl_lib) -I$(eigen_lib)
  12. lib=-lAntTweakBar
  13. endif
  14. matlablibs=-I/Applications/MATLAB_R2010b.app/extern/include -L/Applications/MATLAB_R2010b.app/bin/maci64/ -leng -lmx
  15. example1: example1.o
  16. g++ $(CFLAGS) -o example1 example1.o -framework OpenGL -framework GLUT $(lib)
  17. rm example1.o
  18. example1.o: example1.cpp
  19. g++ $(CFLAGS) -c example1.cpp -o example1.o $(inc)
  20. example2: example2.o
  21. g++ $(CFLAGS) $(matlablibs) -o example2 example2.o -framework OpenGL -framework GLUT $(lib)
  22. rm example2.o
  23. example2.o: example2.cpp
  24. g++ $(CFLAGS) $(matlablibs) -c example2.cpp -o example2.o $(inc)
  25. clean:
  26. rm -f example1.o
  27. rm -f example1
  28. rm -f example2.o
  29. rm -f example2
  30. rm -f bunny_out.off