Makefile 475 B

1234567891011121314151617181920212223242526272829303132
  1. .PHONY: all
  2. all: obj libigl.a
  3. debug: obj libigl.a
  4. CPP_FILES=$(wildcard ./*.cpp)
  5. OBJ_FILES=$(addprefix obj/,$(notdir $(CPP_FILES:.cpp=.o)))
  6. # optimized default settings
  7. all: LFLAGS +=
  8. all: CFLAGS += -O3 -DNDEBUG
  9. debug: CFLAGS += -g
  10. #LIB+=-framework OpenGL
  11. #LIB+=-framework GLUT
  12. #LIB+=-framework AppKit
  13. obj:
  14. mkdir -p obj
  15. libigl.a: $(OBJ_FILES)
  16. rm -f $@
  17. ar cqs $@ $(OBJ_FILES)
  18. obj/%.o: %.cpp
  19. g++ $(CFLAGS) -c -o $@ $< $(INC)
  20. clean:
  21. rm -f obj/*.o
  22. rm -f libigl.a