Makefile 564 B

123456789101112131415161718192021222324252627
  1. .PHONY: all
  2. IGL=../../
  3. IGL_LIB=-L$(IGL)/lib -ligl
  4. IGL_INC=-I$(IGL)/include
  5. EIGEN3_INC=-I/usr/local/include/eigen3 -I/usr/local/include/eigen3/unsupported -I/opt/local/include/eigen3 -I/opt/local/include/eigen3/unsupported
  6. MATLAB_INC=-I$(MATLAB)/extern/include/
  7. MATLAB_LIB=-L$(MATLAB)/bin/maci64 -lmx -lmat
  8. LIB+=$(IGL_LIB) $(MATLAB_LIB)
  9. INC+=$(IGL_INC) $(EIGEN3_INC) $(MATLAB_INC)
  10. all: example
  11. CFLAGS += -g
  12. example: example.o
  13. g++ -o example example.o $(LIB)
  14. example.o: example.cpp
  15. g++ $(CFLAGS) -o $@ -c $< $(INC)
  16. clean:
  17. rm -f example.o
  18. rm -f example