Makefile 493 B

123456789101112131415161718192021222324252627282930
  1. .PHONY: all
  2. all: example
  3. .PHONY: example
  4. STATIC_ANTTWEAKBAR=""
  5. igl_lib=../../
  6. ifdef STATIC_ANTTWEAKBAR
  7. CFLAGS=-g -DSTATIC_ANTTWEAKBAR
  8. inc=-I$(igl_lib) -I./static
  9. lib=-Lstatic -lAntTweakBar -framework AppKit
  10. else
  11. CFLAGS=-g
  12. inc=-I$(igl_lib)
  13. lib=-lAntTweakBar
  14. endif
  15. example: example.o
  16. g++ $(CFLAGS) -o example example.o -framework OpenGL -framework GLUT $(lib)
  17. rm example.o
  18. example.o: example.cpp
  19. g++ $(CFLAGS) -c example.cpp -o example.o $(inc)
  20. clean:
  21. rm -f example.o
  22. rm -f example