Makefile 687 B

12345678910111213141516171819202122232425262728293031323334
  1. .PHONY: all
  2. # Shared flags etc.
  3. include ../../build/Makefile.conf
  4. IGL=../../
  5. IGL_LIB=-L$(IGL)/lib -ligl
  6. IGL_INC=-I$(IGL)/include
  7. EIGEN3_INC=-I/usr/local/include/eigen3 -I/usr/local/include/eigen3/unsupported -I$(DEFAULT_PREFIX)/include/eigen3 -I$(DEFAULT_PREFIX)/include/eigen3/unsupported
  8. MATLAB_INC=-I$(MATLAB)/extern/include/
  9. MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat
  10. LIB+=$(IGL_LIB) $(MATLAB_LIB)
  11. INC+=$(IGL_INC) $(EIGEN3_INC) $(MATLAB_INC)
  12. CFLAGS += -g
  13. ifeq ($(IGL_WITH_MATLAB),1)
  14. EXAMPLE=example
  15. endif
  16. all: $(EXAMPLE)
  17. example: example.o
  18. g++ -o example example.o $(LIB)
  19. example.o: example.cpp
  20. g++ $(CFLAGS) -o $@ -c $< $(INC)
  21. clean:
  22. rm -f example.o
  23. rm -f example