Makefile_embree 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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. SRC_DIR=../include/igl/embree/
  11. CPP_FILES=$(wildcard $(SRC_DIR)*.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. # embree dependency
  20. #EMBREE=../external/embree
  21. #EMBREE_INC=-I$(EMBREE)/common -I$(EMBREE)/rtcore/
  22. EMBREE=../external/embree/
  23. #EMBREE_INC=-I$(EMBREE)/ -I$(EMBREE)/embree
  24. EMBREE_INC=-I$(EMBREE)/include
  25. #EMBREE_LIB=-L$(EMBREE)/bin -lrtcore -lsys
  26. INC+=$(EMBREE_INC)
  27. obj:
  28. mkdir -p obj
  29. ../lib/libiglembree.a: $(OBJ_FILES)
  30. rm -f $@
  31. ar cqs $@ $(OBJ_FILES)
  32. obj/%.o: $(SRC_DIR)/%.cpp $(SRC_DIR)/%.h
  33. g++ $(AFLAGS) $(OPENMP) $(CFLAGS) -c -o $@ $< $(INC)
  34. clean:
  35. rm -f $(OBJ_FILES)
  36. rm -f ../lib/libiglembree.a