Makefile 638 B

123456789101112131415161718192021222324252627282930
  1. .PHONY: all
  2. # Shared flags etc.
  3. include ../../Makefile.conf
  4. # YIMG dependency
  5. YIMG=../../external/yimg
  6. YIMG_LIB=-L$(YIMG) -lyimg -lz -L/usr/X11/lib -lpng -bind_at_load
  7. YIMG_INC=-I/usr/X11/include -I$(YIMG)
  8. # LIBPNG dependency
  9. all: example
  10. .PHONY: example
  11. IGL=../../
  12. inc=-DIGL_HEADER_ONLY -I$(IGL)/include -I$(DEFAULT_PREFIX)/include $(YIMG_INC)
  13. lib=-L$(IGL)/lib -ligl -liglpng -L$(DEFAULT_PREFIX)/lib $(OPENGL_LIB) $(GLUT_LIB) $(YIMG_LIB) $(LIBPNG_LIB)
  14. example: example.o
  15. g++ $(CFLAGS) -o example example.o $(lib)
  16. example.o: example.cpp
  17. g++ $(CFLAGS) -c example.cpp -o example.o $(inc)
  18. clean:
  19. rm -f example.o
  20. rm -f example