Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. include ../../../Makefile.conf
  2. .PHONY: all
  3. all: libiglmosek
  4. debug: libiglmosek
  5. include ../../../Makefile.conf
  6. all: OPTFLAGS += -O3 -DNDEBUG $(OPENMP)
  7. debug: OPTFLAGS += -g -Wall
  8. CFLAGS += $(OPTFLAGS)
  9. .PHONY: libiglmosek
  10. libiglmosek: obj ../../../lib/libiglmosek.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. # mosek dependency
  20. # TODO: linux, 32 bit etc
  21. ifndef MOSEKPLATFORM
  22. MOSEKPLATFORM=osx64x86
  23. endif
  24. ifndef MOSEKVERSION
  25. MOSEKVERSION=6
  26. endif
  27. MOSEK=/usr/local/mosek
  28. MOSEK_INC=-I$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/h
  29. MOSEK_LIB=-L$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64
  30. INC+=$(MOSEK_INC)
  31. obj:
  32. mkdir -p obj
  33. ../../../lib/libiglmosek.a: $(OBJ_FILES)
  34. rm -f $@
  35. ar cqs $@ $(OBJ_FILES)
  36. obj/%.o: %.cpp %.h
  37. g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
  38. clean:
  39. rm -f obj/*.o
  40. rm -f ../../../lib/libiglmosek.a