Makefile_mosek 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. SRC_DIR=../include/igl/mosek/
  12. CPP_FILES=$(wildcard $(SRC_DIR)*.cpp)
  13. OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
  14. # include igl headers
  15. INC+=-I../include/
  16. # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY
  17. # Eigen dependency
  18. EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
  19. INC+=$(EIGEN3_INC)
  20. # mosek dependency
  21. # TODO: linux, 32 bit etc
  22. ifndef MOSEKPLATFORM
  23. MOSEKPLATFORM=osx64x86
  24. endif
  25. ifndef MOSEKVERSION
  26. MOSEKVERSION=6
  27. endif
  28. MOSEK=/usr/local/mosek
  29. MOSEK_INC=-I$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/h
  30. MOSEK_LIB=-L$(MOSEK)/$(MOSEKVERSION)/tools/platform/$(MOSEKPLATFORM)/bin -lmosek64
  31. INC+=$(MOSEK_INC)
  32. obj:
  33. mkdir -p obj
  34. ../lib/libiglmosek.a: $(OBJ_FILES)
  35. rm -f $@
  36. ar cqs $@ $(OBJ_FILES)
  37. obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
  38. g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
  39. clean:
  40. rm -f $(OBJ_FILES)
  41. rm -f ../lib/libiglmosek.a