Makefile 799 B

123456789101112131415161718192021222324252627282930
  1. .PHONY: all
  2. all: example_static example_header_only
  3. igl_lib=../../
  4. CFLAGS=-g
  5. inc=-I$(igl_lib)/include
  6. STATIC_LIB=-ligl -L../../lib
  7. HEADER_ONLY_DEF=-DIGL_HEADER_ONLY
  8. example_static: example_static.o
  9. #g++ $(CFLAGS) -o example_static example_static.o $(lib) $(STATIC_LIB) ../../obj/example_fun.o
  10. g++ $(CFLAGS) -o example_static example_static.o ../../obj/example_fun.o
  11. example_static.o: example.cpp
  12. g++ $(CFLAGS) -c example.cpp -o example_static.o $(inc)
  13. example_header_only: example_header_only.o
  14. g++ $(CFLAGS) -o example_header_only example_header_only.o $(lib)
  15. example_header_only.o: example.cpp
  16. g++ $(CFLAGS) -c example.cpp -o example_header_only.o $(inc) $(HEADER_ONLY_DEF)
  17. clean:
  18. rm -f example_static.o
  19. rm -f example_static
  20. rm -f example_header_only.o
  21. rm -f example_header_only