Makefile 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. include ../../../Makefile.conf
  2. .PHONY: all
  3. all: libiglbbw
  4. debug: libiglbbw
  5. include ../../../Makefile.conf
  6. all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
  7. debug: OPTFLAGS += -g -Wall
  8. CFLAGS += $(OPTFLAGS)
  9. .PHONY: libiglbbw
  10. libiglbbw: obj ../../../lib/libiglbbw.a
  11. CPP_FILES=$(wildcard *.cpp)
  12. OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
  13. # include igl headers
  14. INC+=-I../../../include/
  15. # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY
  16. # Eigen dependency
  17. EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
  18. INC+=$(EIGEN3_INC)
  19. ifdef IGL_NO_MOSEK
  20. CFLAGS+=-DIGL_NO_MOSEK
  21. else
  22. # mosek dependency
  23. # TODO: linux, 32 bit etc
  24. ifndef MOSEKPLATFORM
  25. MOSEKPLATFORM=osx64x86
  26. endif
  27. ifndef MOSEKVERSION
  28. MOSEKVERSION=6
  29. endif
  30. IGLMOSEK=../mosek/
  31. IGLMOSEK_INC=-I$(IGLMOSEK)/
  32. INC+=${IGLMOSEK_INC}
  33. MOSEK=/usr/local/mosek
  34. MOSEK_INC=-I$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/h
  35. MOSEK_LIB=-L$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64
  36. INC+=$(MOSEK_INC)
  37. endif
  38. obj:
  39. mkdir -p obj
  40. ../../../lib/libiglbbw.a: $(OBJ_FILES)
  41. rm -f $@
  42. ar cqs $@ $(OBJ_FILES)
  43. obj/%.o: %.cpp %.h
  44. g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
  45. clean:
  46. rm -f obj/*.o
  47. rm -f ../../../lib/libiglbbw.a