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.

185 lines
5.6KB

  1. #!/usr/bin/make -f
  2. # Makefile for DISTRHO Plugins #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. # NOTE This file MUST be imported after setting `NAME`
  7. ifneq ($(CARLA_BACKEND_NAMESPACE),Ildaeil)
  8. $(error wrong build setup)
  9. endif
  10. ifneq ($(DGL_NAMESPACE),IldaeilDGL)
  11. $(error wrong build setup)
  12. endif
  13. ifneq ($(STATIC_PLUGIN_TARGET),true)
  14. $(error wrong build setup)
  15. endif
  16. ifneq ($(USING_CUSTOM_DPF),true)
  17. $(error wrong build setup)
  18. endif
  19. # ---------------------------------------------------------------------------------------------------------------------
  20. # Files to build
  21. FILES_DSP = \
  22. IldaeilPlugin.cpp
  23. FILES_UI = \
  24. IldaeilUI.cpp \
  25. ../Common/PluginHostWindow.cpp \
  26. ../../dpf-widgets/opengl/DearImGui.cpp
  27. # ---------------------------------------------------------------------------------------------------------------------
  28. # Carla stuff
  29. ifneq ($(DEBUG),true)
  30. EXTERNAL_PLUGINS = true
  31. endif
  32. include ../../carla/source/Makefile.deps.mk
  33. # FIXME
  34. ifeq ($(WASM),true)
  35. ifneq ($(OLD_PATH),)
  36. STATIC_CARLA_PLUGIN_LIBS = -lsndfile -lopus -lFLAC -lvorbisenc -lvorbis -logg -lm
  37. endif
  38. endif
  39. CARLA_BUILD_DIR = ../../carla/build
  40. ifeq ($(DEBUG),true)
  41. CARLA_BUILD_TYPE = Debug
  42. else
  43. CARLA_BUILD_TYPE = Release
  44. endif
  45. CARLA_EXTRA_LIBS = $(CARLA_BUILD_DIR)/plugin/$(CARLA_BUILD_TYPE)/carla-host-plugin.cpp.o
  46. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_engine_plugin.a
  47. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/carla_plugin.a
  48. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/native-plugins.a
  49. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/audio_decoder.a
  50. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/jackbridge.min.a
  51. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/lilv.a
  52. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/rtmempool.a
  53. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/water.a
  54. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/ysfx.a
  55. CARLA_EXTRA_LIBS += $(CARLA_BUILD_DIR)/modules/$(CARLA_BUILD_TYPE)/zita-resampler.a
  56. EXTRA_DEPENDENCIES = $(CARLA_EXTRA_LIBS)
  57. EXTRA_LIBS = $(CARLA_EXTRA_LIBS) $(STATIC_CARLA_PLUGIN_LIBS)
  58. # ---------------------------------------------------------------------------------------------------------------------
  59. # Do some more magic
  60. USE_CLAP_BUNDLE = true
  61. USE_VST2_BUNDLE = true
  62. include ../../dpf/Makefile.plugins.mk
  63. ifeq ($(WASM),true)
  64. LINK_FLAGS += -sALLOW_MEMORY_GROWTH
  65. LINK_FLAGS += -sLZ4=1
  66. LINK_FLAGS += --preload-file=./jsfx
  67. LINK_FLAGS += --preload-file=./lv2
  68. LINK_FLAGS += --shell-file=./emscripten/shell.html
  69. # LINK_FLAGS += --use-preload-cache
  70. LINK_FLAGS += --use-preload-plugins
  71. else ifneq ($(HAIKU),true)
  72. BUILD_CXX_FLAGS += -pthread
  73. endif
  74. BUILD_CXX_FLAGS += -I../Common
  75. BUILD_CXX_FLAGS += -I../../dpf-widgets/generic
  76. BUILD_CXX_FLAGS += -I../../dpf-widgets/opengl
  77. BUILD_CXX_FLAGS += -DCARLA_BACKEND_NAMESPACE=$(CARLA_BACKEND_NAMESPACE)
  78. BUILD_CXX_FLAGS += -DSTATIC_PLUGIN_TARGET
  79. BUILD_CXX_FLAGS += -I../../carla/source/backend
  80. BUILD_CXX_FLAGS += -I../../carla/source/includes
  81. BUILD_CXX_FLAGS += -I../../carla/source/modules
  82. BUILD_CXX_FLAGS += -I../../carla/source/utils
  83. ifeq ($(MACOS),true)
  84. $(BUILD_DIR)/../Common/PluginHostWindow.cpp.o: BUILD_CXX_FLAGS += -ObjC++
  85. $(BUILD_DIR)/../Common/SizeUtils.cpp.o: BUILD_CXX_FLAGS += -ObjC++
  86. endif
  87. # ---------------------------------------------------------------------------------------------------------------------
  88. # Enable all possible plugin types
  89. ifeq ($(STANDALONE),true)
  90. TARGETS_BASE =
  91. TARGETS_EXTRA = jack
  92. ifeq ($(MACOS),true)
  93. TARGETS_EXTRA += carlabins
  94. endif
  95. else
  96. TARGETS_BASE = lv2 vst2 clap
  97. TARGETS_EXTRA = jack carlabins
  98. # VST3 does not do MIDI filter plugins, by design
  99. ifneq ($(NAME),Ildaeil-MIDI)
  100. TARGETS_BASE += vst3
  101. endif
  102. endif
  103. all: $(TARGETS_BASE) $(TARGETS_EXTRA)
  104. # ---------------------------------------------------------------------------------------------------------------------
  105. # special step for carla binaries
  106. ifneq ($(USE_SYSTEM_CARLA_BINS),true)
  107. CARLA_BINARIES = $(CURDIR)/../../carla/bin/carla-bridge-native$(APP_EXT)
  108. CARLA_BINARIES += $(CURDIR)/../../carla/bin/carla-bridge-lv2-gtk2$(APP_EXT)
  109. CARLA_BINARIES += $(CURDIR)/../../carla/bin/carla-bridge-lv2-gtk3$(APP_EXT)
  110. CARLA_BINARIES += $(CURDIR)/../../carla/bin/carla-discovery-native$(APP_EXT)
  111. ifeq ($(CARLA_EXTRA_TARGETS),true)
  112. # 32bit bridge
  113. ifeq ($(WINDOWS)$(CPU_X86_64),truetrue)
  114. CARLA_BINARIES += $(CURDIR)/../../carla/bin/carla-bridge-win32$(APP_EXT)
  115. else ifneq ($(MACOS)$(WINDOWS),true)
  116. CARLA_BINARIES += $(CURDIR)/../../carla/bin/carla-bridge-posix32$(APP_EXT)
  117. endif
  118. # Windows bridges
  119. ifeq ($(CPU_I386_OR_X86_64)$(LINUX),truetrue)
  120. CARLA_BINARIES += $(CURDIR)/../../carla/bin/carla-bridge-win32.exe
  121. CARLA_BINARIES += $(CURDIR)/../../carla/bin/jackbridge-wine32.dll
  122. endif
  123. ifeq ($(CPU_X86_64)$(LINUX),truetrue)
  124. CARLA_BINARIES += $(CURDIR)/../../carla/bin/carla-bridge-win64.exe
  125. CARLA_BINARIES += $(CURDIR)/../../carla/bin/jackbridge-wine64.dll
  126. endif
  127. endif # CARLA_EXTRA_TARGETS
  128. carlabins: $(TARGETS_BASE)
  129. ifeq ($(STANDALONE),true)
  130. mkdir -p $(shell dirname $(jack))
  131. install -m 755 $(CARLA_BINARIES) $(shell dirname $(jack))
  132. else
  133. install -m 755 $(CARLA_BINARIES) $(shell dirname $(lv2))
  134. install -m 755 $(CARLA_BINARIES) $(shell dirname $(vst2))
  135. install -m 755 $(CARLA_BINARIES) $(shell dirname $(clap))
  136. ifneq ($(NAME),Ildaeil-MIDI)
  137. install -m 755 $(CARLA_BINARIES) $(shell dirname $(vst3))
  138. endif
  139. endif
  140. else # USE_SYSTEM_CARLA_BINS
  141. carlabins:
  142. endif # USE_SYSTEM_CARLA_BINS
  143. # ---------------------------------------------------------------------------------------------------------------------