Makefile 974 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. include ../../../Makefile.conf
  2. .PHONY: all
  3. all: libiglembree
  4. debug: libiglembree
  5. include ../../../Makefile.conf
  6. all: CFLAGS += -O3 -DNDEBUG -std=c++11
  7. debug: CFLAGS += -g -Wall -std=c++11
  8. .PHONY: libiglembree
  9. libiglembree: obj ../../../lib/libiglembree.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. # embree dependency
  19. EMBREE=../../../external/embree
  20. EMBREE_INC=-I$(EMBREE)/common -I$(EMBREE)/rtcore/
  21. #EMBREE_LIB=-L$(EMBREE)/bin -lrtcore -lsys
  22. INC+=$(EMBREE_INC)
  23. obj:
  24. mkdir -p obj
  25. ../../../lib/libiglembree.a: $(OBJ_FILES)
  26. rm -f $@
  27. ar cqs $@ $(OBJ_FILES)
  28. obj/%.o: %.cpp %.h
  29. g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
  30. clean:
  31. rm -f obj/*.o
  32. rm -f ../../../lib/libiglembree.a