Makefile 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. .PHONY: all
  2. # Shared flags etc.
  3. include ../Makefile.conf
  4. LIBIGL_LIB+=-liglbbw -liglmosek
  5. all: obj example
  6. .PHONY: example
  7. ifdef IGL_NO_MOSEK
  8. CFLAGS+=-DIGL_NO_MOSEK
  9. else
  10. # Adjust your mosek paths etc. accordingly
  11. ifndef MOSEKPLATFORM
  12. MOSEKPLATFORM=osx64x86
  13. endif
  14. ifndef MOSEKVERSION
  15. MOSEKVERSION=7
  16. endif
  17. IGLMOSEK=../mosek/
  18. IGLMOSEK_INC=-I$(IGLMOSEK)/
  19. MOSEK=/usr/local/mosek
  20. MOSEK_INC=-I$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/h
  21. MOSEK_LIB=-L$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64
  22. endif
  23. INC=$(LIBIGL_INC) $(ANTTWEAKBAR_INC) $(EIGEN3_INC) $(GLUT_INC) ${TETGEN_INC} $(MOSEK_INC)
  24. LIB=$(OPENGL_LIB) $(GLUT_LIB) $(ANTTWEAKBAR_LIB) $(LIBIGL_LIB) $(TETGEN_LIB) $(MOSEK_LIB)
  25. CPP_FILES=$(wildcard ./*.cpp)
  26. OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
  27. CFLAGS+=-std=c++11 -g
  28. example: obj $(OBJ_FILES)
  29. g++ $(OPENMP) $(AFLAGS) $(CFLAGS) -o example $(OBJ_FILES) $(LIB)
  30. obj:
  31. mkdir -p obj
  32. obj/%.o: %.cpp
  33. g++ $(OPENMP) $(AFLAGS) $(CFLAGS) -c $< -o $@ $(INC)
  34. obj/%.o: %.cpp %.h
  35. g++ $(OPENMP) $(AFLAGS) $(CFLAGS) -c $< -o $@ $(INC)
  36. clean:
  37. rm -f $(OBJ_FILES)
  38. rm -f example