Makefile 1.0 KB

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