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.

90 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/Widget.cpp.o
  21. ifeq ($(MACOS),true)
  22. OBJS += src/Window.mm.o
  23. else
  24. OBJS += src/Window.cpp.o
  25. endif
  26. # freetype-gl
  27. # OBJS += \
  28. # src/freetype-gl/font-manager.c.o \
  29. # src/freetype-gl/mat4.c.o \
  30. # src/freetype-gl/shader.c.o \
  31. # src/freetype-gl/text-buffer.c.o \
  32. # src/freetype-gl/texture-atlas.c.o \
  33. # src/freetype-gl/texture-font.c.o \
  34. # src/freetype-gl/vector.c.o \
  35. # src/freetype-gl/vertex-attribute.c.o \
  36. # src/freetype-gl/vertex-buffer.c.o
  37. TARGET = ../libdgl.a
  38. # --------------------------------------------------------------
  39. all: $(TARGET)
  40. # --------------------------------------------------------------
  41. ../libdgl.a: $(OBJS)
  42. rm -f $@
  43. ar crs $@ $^
  44. ../libdgl.dll: $(OBJS)
  45. # -Wl,--output-def,$@.def,--out-implib,$@.a
  46. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  47. ../libdgl.dylib: $(OBJS)
  48. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  49. ../libdgl.so: $(OBJS)
  50. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  51. # --------------------------------------------------------------
  52. %.c.o: %.c
  53. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  54. %.cpp.o: %.cpp
  55. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  56. %.m.o: %.m
  57. $(CC) $< $(BUILD_C_FLAGS) -ObjC -c -o $@
  58. %.mm.o: %.mm
  59. $(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  60. # --------------------------------------------------------------
  61. clean:
  62. rm -f src/*.o src/pugl/*.o src/freetype-gl/*.o ../libdgl.*
  63. debug:
  64. $(MAKE) DEBUG=true
  65. # --------------------------------------------------------------