Makefile 855 B

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