DPF OpenGL examples
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
1.7KB

  1. #!/usr/bin/make -f
  2. # Makefile for DPF examples #
  3. # ------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../dpf/dgl/Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_CXX_FLAGS += -I../dpf/dgl
  9. LINK_FLAGS += -L../dpf -ldgl $(DGL_LIBS)
  10. # --------------------------------------------------------------
  11. ifeq ($(WIN32),true)
  12. TARGETS = app.exe color.exe demo.exe images.exe rectangles.exe
  13. LINK_FLAGS += -mwindows
  14. else
  15. TARGETS = app color demo images rectangles
  16. endif
  17. # --------------------------------------------------------------
  18. all: ../libdgl.a $(TARGETS)
  19. build: $(TARGETS)
  20. clean:
  21. $(RM) $(TARGETS)
  22. debug:
  23. $(MAKE) DEBUG=true
  24. # --------------------------------------------------------------
  25. %.exe: %
  26. rm -f $*.exe
  27. mv $* $*.exe
  28. ln -sf $*.exe $*
  29. ../libdgl.a: .FORCE
  30. $(MAKE) -C ../dpf/dgl
  31. # --------------------------------------------------------------
  32. app: app.cpp ../dpf/dgl/*
  33. $(CXX) $< $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -o $@
  34. color: color.cpp ../dpf/dgl/*
  35. $(CXX) $< $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -o $@
  36. demo: demo.cpp ../dpf/dgl/*
  37. $(CXX) $< $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -o $@
  38. images: images.cpp images_src/* ../dpf/dgl/*
  39. $(CXX) $< $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -o $@
  40. rectangles: rectangles.cpp ../dpf/dgl/*
  41. $(CXX) $< $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -o $@
  42. # --------------------------------------------------------------
  43. cairo: cairo.cpp ../dgl/*
  44. $(CXX) $< $(BUILD_CXX_FLAGS) $(shell pkg-config --cflags --libs cairo) $(LINK_FLAGS) -o $@
  45. text: text.cpp ../dgl/*
  46. $(CXX) $< $(BUILD_CXX_FLAGS) $(LINK_FLAGS) -o $@
  47. # --------------------------------------------------------------
  48. .FORCE:
  49. .PHONY: .FORCE
  50. # --------------------------------------------------------------