Makefile_embree 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. include Makefile.conf
  2. .PHONY: all
  3. all: libiglembree
  4. debug: libiglembree
  5. CFLAGS += -DIGL_STATIC_LIBRARY
  6. include Makefile.conf
  7. all: CFLAGS += -O3 -DNDEBUG -std=c++11
  8. debug: CFLAGS += -g -Wall -std=c++11
  9. .PHONY: libiglembree
  10. libiglembree: obj ../lib/libiglembree.a
  11. SRC_DIR=../include/igl/embree/
  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. # embree dependency
  21. #EMBREE=../external/embree
  22. #EMBREE_INC=-I$(EMBREE)/common -I$(EMBREE)/rtcore/
  23. EMBREE=../external/embree/
  24. EMBREE_INC=-I$(EMBREE)/ -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