Audio plugin host https://kx.studio/carla
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.

113 lines
3.4KB

  1. #!/usr/bin/make -f
  2. # Makefile for dgl #
  3. # ---------------- #
  4. # Created by falkTX
  5. #
  6. CWD=../..
  7. MODULENAME=dgl
  8. include ../Makefile.mk
  9. # ---------------------------------------------------------------------------------------------------------------------
  10. BUILD_CXX_FLAGS += $(DGL_FLAGS) -Isrc
  11. BUILD_CXX_FLAGS += -Isrc/pugl-upstream/include
  12. ifneq ($(MACOS),true)
  13. WINE_FLAGS = -I/usr/include/wine/wine/windows
  14. WINE_FLAGS += -I/usr/include/wine-development/windows
  15. WINE_FLAGS += -I/opt/wine-devel/include/wine/windows
  16. endif
  17. # ---------------------------------------------------------------------------------------------------------------------
  18. OBJS = \
  19. $(OBJDIR)/pugl.cpp.o \
  20. $(OBJDIR)/Application.cpp.o \
  21. $(OBJDIR)/ApplicationPrivateData.cpp.o \
  22. $(OBJDIR)/Color.cpp.o \
  23. $(OBJDIR)/EventHandlers.cpp.o \
  24. $(OBJDIR)/Geometry.cpp.o \
  25. $(OBJDIR)/ImageBase.cpp.o \
  26. $(OBJDIR)/ImageBaseWidgets.cpp.o \
  27. $(OBJDIR)/NanoVG.cpp.o \
  28. $(OBJDIR)/OpenGL.cpp.o \
  29. $(OBJDIR)/SubWidget.cpp.o \
  30. $(OBJDIR)/SubWidgetPrivateData.cpp.o \
  31. $(OBJDIR)/TopLevelWidget.cpp.o \
  32. $(OBJDIR)/TopLevelWidgetPrivateData.cpp.o \
  33. $(OBJDIR)/Widget.cpp.o \
  34. $(OBJDIR)/WidgetPrivateData.cpp.o \
  35. $(OBJDIR)/Window.cpp.o \
  36. $(OBJDIR)/WindowPrivateData.cpp.o
  37. OBJS_wine = \
  38. $(OBJDIR)/pugl.cpp-wine.o \
  39. $(OBJDIR)/Application.cpp-wine.o \
  40. $(OBJDIR)/ApplicationPrivateData.cpp-wine.o \
  41. $(OBJDIR)/Color.cpp-wine.o \
  42. $(OBJDIR)/EventHandlers.cpp-wine.o \
  43. $(OBJDIR)/Geometry.cpp-wine.o \
  44. $(OBJDIR)/ImageBase.cpp-wine.o \
  45. $(OBJDIR)/ImageBaseWidgets.cpp-wine.o \
  46. $(OBJDIR)/OpenGL.cpp-wine.o \
  47. $(OBJDIR)/SubWidget.cpp-wine.o \
  48. $(OBJDIR)/SubWidgetPrivateData.cpp-wine.o \
  49. $(OBJDIR)/TopLevelWidget.cpp-wine.o \
  50. $(OBJDIR)/TopLevelWidgetPrivateData.cpp-wine.o \
  51. $(OBJDIR)/Widget.cpp-wine.o \
  52. $(OBJDIR)/WidgetPrivateData.cpp-wine.o \
  53. $(OBJDIR)/Window.cpp-wine.o \
  54. $(OBJDIR)/WindowPrivateData.cpp-wine.o
  55. # ---------------------------------------------------------------------------------------------------------------------
  56. all: $(MODULEDIR)/$(MODULENAME).a
  57. wine: $(MODULEDIR)/$(MODULENAME).wine.a
  58. # ---------------------------------------------------------------------------------------------------------------------
  59. clean:
  60. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(MODULEDIR)/$(MODULENAME).wine.a
  61. debug:
  62. $(MAKE) DEBUG=true
  63. # ---------------------------------------------------------------------------------------------------------------------
  64. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  65. -@mkdir -p $(MODULEDIR)
  66. @echo "Creating $(MODULENAME).a"
  67. $(SILENT)rm -f $@
  68. $(SILENT)$(AR) crs $@ $^
  69. $(MODULEDIR)/$(MODULENAME).wine.a: $(OBJS_wine)
  70. -@mkdir -p $(MODULEDIR)
  71. @echo "Creating $(MODULENAME).wine.a"
  72. $(SILENT)rm -f $@
  73. $(SILENT)$(AR) crs $@ $^
  74. # ---------------------------------------------------------------------------------------------------------------------
  75. ifeq ($(MACOS),true)
  76. $(OBJDIR)/pugl.cpp.o: src/pugl.cpp
  77. -@mkdir -p $(OBJDIR)
  78. @echo "Compiling $<"
  79. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -ObjC++ -c -o $@
  80. endif
  81. $(OBJDIR)/%.cpp.o: src/%.cpp
  82. -@mkdir -p $(OBJDIR)
  83. @echo "Compiling $<"
  84. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  85. $(OBJDIR)/%.cpp-wine.o: src/%.cpp
  86. -@mkdir -p $(OBJDIR)
  87. @echo "Compiling $< (Wine)"
  88. $(SILENT)$(WINECC) $< $(BUILD_CXX_FLAGS) $(WINE_FLAGS) -c -o $@
  89. -include $(OBJS:%.o=%.d)
  90. -include $(OBJS_wine:%.o=%.d)
  91. # ---------------------------------------------------------------------------------------------------------------------