Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. include ../../../Makefile.conf
  2. all: CFLAGS += -O3 -DNDEBUG -fopenmp
  3. debug: CFLAGS += -g -Wall -Werror -fopenmp
  4. .PHONY: all
  5. all: libiglviewer
  6. debug: libiglviewer
  7. .PHONY: libviewer
  8. libiglviewer: obj ../../../lib/libiglviewer.a
  9. CPP_FILES=$(wildcard *.cpp)
  10. OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
  11. # include igl headers
  12. INC+=-I../../../include/
  13. # EXPECTS THAT CFLAGS IS ALREADY SET APPROPRIATELY
  14. # Eigen dependency
  15. EIGEN3_INC=-I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
  16. INC+=$(EIGEN3_INC)
  17. # GLFW dependency
  18. ifndef GLFW
  19. GLFW=../../../external/glfw/
  20. endif
  21. GLFW_INC=-I$(GLFW)/include
  22. INC+=$(GLFW_INC)
  23. ifndef ANTTWEAKBAR
  24. ANTTWEAKBAR=../../../external/AntTweakBar/
  25. endif
  26. # Viewer also uses source files from AntTweakBar for font rendering
  27. ANTTWEAKBAR_INC=-I$(ANTTWEAKBAR)/include -I$(ANTTWEAKBAR)/src
  28. INC+=$(ANTTWEAKBAR_INC)
  29. obj:
  30. mkdir -p obj
  31. ../../../lib/libiglviewer.a: $(OBJ_FILES)
  32. rm -f $@
  33. ar cqs $@ $(OBJ_FILES)
  34. obj/%.o: %.cpp %.h
  35. g++ $(AFLAGS) $(CFLAGS) -c -o $@ $< $(INC)
  36. clean:
  37. rm -f obj/*.o
  38. rm -f ../../../lib/libiglmatlab.a