DISTRHO Plugin Framework
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.

91 lines
1.9KB

  1. #!/usr/bin/make -f
  2. # Makefile for dgl #
  3. # ---------------- #
  4. # Created by falkTX
  5. #
  6. include Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_C_FLAGS += $(DGL_FLAGS) -I.
  9. BUILD_CXX_FLAGS += $(DGL_FLAGS) -I.
  10. LINK_FLAGS += $(DGL_LIBS)
  11. # --------------------------------------------------------------
  12. OBJS = \
  13. src/App.cpp.o \
  14. src/Geometry.cpp.o \
  15. src/Image.cpp.o \
  16. src/ImageAboutWindow.cpp.o \
  17. src/ImageButton.cpp.o \
  18. src/ImageKnob.cpp.o \
  19. src/ImageSlider.cpp.o \
  20. src/ImageSwitch.cpp.o \
  21. src/Widget.cpp.o
  22. ifeq ($(MACOS),true)
  23. OBJS += src/Window.mm.o
  24. else
  25. OBJS += src/Window.cpp.o
  26. endif
  27. # freetype-gl
  28. # OBJS += \
  29. # src/freetype-gl/font-manager.c.o \
  30. # src/freetype-gl/mat4.c.o \
  31. # src/freetype-gl/shader.c.o \
  32. # src/freetype-gl/text-buffer.c.o \
  33. # src/freetype-gl/texture-atlas.c.o \
  34. # src/freetype-gl/texture-font.c.o \
  35. # src/freetype-gl/vector.c.o \
  36. # src/freetype-gl/vertex-attribute.c.o \
  37. # src/freetype-gl/vertex-buffer.c.o
  38. TARGET = ../libdgl.a
  39. # --------------------------------------------------------------
  40. all: $(TARGET)
  41. # --------------------------------------------------------------
  42. ../libdgl.a: $(OBJS)
  43. rm -f $@
  44. ar crs $@ $^
  45. ../libdgl.dll: $(OBJS)
  46. # -Wl,--output-def,$@.def,--out-implib,$@.a
  47. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  48. ../libdgl.dylib: $(OBJS)
  49. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  50. ../libdgl.so: $(OBJS)
  51. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  52. # --------------------------------------------------------------
  53. %.c.o: %.c
  54. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  55. %.cpp.o: %.cpp
  56. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  57. %.m.o: %.m
  58. $(CC) $< $(BUILD_C_FLAGS) -ObjC -c -o $@
  59. %.mm.o: %.mm
  60. $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  61. # --------------------------------------------------------------
  62. clean:
  63. rm -f src/*.o src/pugl/*.o src/freetype-gl/*.o ../libdgl.*
  64. debug:
  65. $(MAKE) DEBUG=true
  66. # --------------------------------------------------------------