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.

584 lines
23KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-plugin #
  3. # ------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. include $(CWD)/Makefile.mk
  8. # Workaround GCC bug
  9. ifeq ($(TESTBUILD),true)
  10. ifeq ($(USING_JUCE),true)
  11. BUILD_CXX_FLAGS += -Wno-undef
  12. endif
  13. endif
  14. ifneq ($(HAIKU),true)
  15. ifneq ($(WASM),true)
  16. BUILD_CXX_FLAGS += -pthread
  17. endif
  18. endif
  19. # ---------------------------------------------------------------------------------------------------------------------
  20. BINDIR := $(CWD)/../bin
  21. DATADIR := $(CWD)/../data
  22. ifeq ($(DEBUG),true)
  23. OBJDIR := $(CWD)/../build/plugin/Debug
  24. MODULEDIR := $(CWD)/../build/modules/Debug
  25. else
  26. OBJDIR := $(CWD)/../build/plugin/Release
  27. MODULEDIR := $(CWD)/../build/modules/Release
  28. endif
  29. ifeq ($(NEEDS_WINE),true)
  30. EXE_WRAPPER ?= wine
  31. endif
  32. # ---------------------------------------------------------------------------------------------------------------------
  33. BUILD_CXX_FLAGS += -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/modules -I$(CWD)/utils
  34. BUILD_CXX_FLAGS += $(NATIVE_PLUGINS_FLAGS)
  35. ifeq ($(HAVE_LIBLO),true)
  36. BUILD_CXX_FLAGS += $(LIBLO_FLAGS)
  37. endif
  38. ifeq ($(HAVE_FLUIDSYNTH),true)
  39. BUILD_CXX_FLAGS += $(FLUIDSYNTH_FLAGS)
  40. endif
  41. BUILD_CXX_FLAGS += $(YSFX_FLAGS)
  42. ifeq ($(HAVE_X11),true)
  43. BUILD_CXX_FLAGS += $(X11_FLAGS)
  44. endif
  45. # ---------------------------------------------------------------------------------------------------------------------
  46. # Libs
  47. LIBS = $(MODULEDIR)/carla_engine_plugin.a
  48. LIBS += $(MODULEDIR)/carla_plugin.a
  49. LIBS += $(MODULEDIR)/jackbridge.a
  50. LIBS += $(MODULEDIR)/lilv.a
  51. LIBS += $(MODULEDIR)/rtmempool.a
  52. LIBS += $(MODULEDIR)/water.a
  53. LIBS += $(MODULEDIR)/audio_decoder.a
  54. LIBS += $(MODULEDIR)/native-plugins.a
  55. LIBS += $(MODULEDIR)/sfzero.a
  56. LIBS += $(MODULEDIR)/zita-resampler.a
  57. ifeq ($(HAVE_DGL),true)
  58. ifneq ($(USING_CUSTOM_DPF),true)
  59. LIBS += $(MODULEDIR)/dgl.a
  60. else
  61. LIBS += $(CUSTOM_DPF_PATH)/build/libdgl-opengl.a
  62. endif
  63. endif
  64. ifeq ($(HAVE_HYLIA),true)
  65. LIBS += $(MODULEDIR)/hylia.a
  66. endif
  67. ifeq ($(USING_JUCE),true)
  68. LIBS_juce = $(MODULEDIR)/carla_juce.a
  69. LIBS_juce += $(MODULEDIR)/juce_audio_basics.a
  70. LIBS_juce += $(MODULEDIR)/juce_audio_processors.a
  71. LIBS_juce += $(MODULEDIR)/juce_core.a
  72. LIBS_juce += $(MODULEDIR)/juce_data_structures.a
  73. LIBS_juce += $(MODULEDIR)/juce_events.a
  74. LIBS_juce += $(MODULEDIR)/juce_graphics.a
  75. LIBS_juce += $(MODULEDIR)/juce_gui_basics.a
  76. LIBS_juce += $(MODULEDIR)/juce_gui_extra.a
  77. endif
  78. LIBS += $(MODULEDIR)/ysfx.a
  79. # ---------------------------------------------------------------------------------------------------------------------
  80. # Link flags
  81. NATIVE_LINK_FLAGS = $(HYLIA_LIBS)
  82. NATIVE_LINK_FLAGS += $(LINK_FLAGS)
  83. NATIVE_LINK_FLAGS += $(JACKBRIDGE_LIBS)
  84. NATIVE_LINK_FLAGS += $(LILV_LIBS)
  85. NATIVE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  86. NATIVE_LINK_FLAGS += $(WATER_LIBS)
  87. NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  88. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  89. NATIVE_LINK_FLAGS += $(LIBLO_LIBS)
  90. NATIVE_LINK_FLAGS += $(MAGIC_LIBS)
  91. NATIVE_LINK_FLAGS += $(X11_LIBS)
  92. ifeq ($(USING_JUCE),true)
  93. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  94. LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  95. LINK_FLAGS += $(JUCE_CORE_LIBS)
  96. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  97. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  98. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  99. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  100. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  101. endif
  102. LINK_FLAGS += $(YSFX_GRAPHICS_LIBS)
  103. ifeq ($(MACOS),true)
  104. SYMBOLS_NATIVE = -Wl,-exported_symbol,_carla_get_native_rack_plugin
  105. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay_plugin
  106. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay16_plugin
  107. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay32_plugin
  108. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay64_plugin
  109. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay_cv_plugin
  110. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay_cv8_plugin
  111. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay_cv32_plugin
  112. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay_obs_plugin
  113. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_create_native_plugin_host_handle
  114. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_host_handle_free
  115. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_plugin_engine
  116. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_complete_license_text
  117. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_juce_version
  118. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_supported_file_extensions
  119. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_supported_features
  120. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_library_filename
  121. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_library_folder
  122. SYMBOLS_LV2 = -Wl,-exported_symbol,_lv2_descriptor
  123. ifeq ($(HAVE_PYQT),true)
  124. SYMBOLS_LV2 += -Wl,-exported_symbol,_lv2ui_descriptor
  125. SYMBOLS_LV2_UI = -Wl,-exported_symbol,_lv2ui_descriptor
  126. endif
  127. SYMBOLS_VST = -Wl,-exported_symbol,_VSTPluginMain
  128. else ifeq ($(WASM),true)
  129. SYMBOLS_NATIVE = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="[
  130. SYMBOLS_NATIVE += 'carla_get_native_rack_plugin',
  131. SYMBOLS_NATIVE += 'carla_get_native_patchbay_plugin',
  132. SYMBOLS_NATIVE += 'carla_get_native_patchbay16_plugin',
  133. SYMBOLS_NATIVE += 'carla_get_native_patchbay32_plugin',
  134. SYMBOLS_NATIVE += 'carla_get_native_patchbay64_plugin',
  135. SYMBOLS_NATIVE += 'carla_get_native_patchbay_cv_plugin',
  136. SYMBOLS_NATIVE += 'carla_get_native_patchbay_cv8_plugin',
  137. SYMBOLS_NATIVE += 'carla_get_native_patchbay_cv32_plugin',
  138. SYMBOLS_NATIVE += 'carla_get_native_patchbay_obs_plugin',
  139. SYMBOLS_NATIVE += 'carla_create_native_plugin_host_handle',
  140. SYMBOLS_NATIVE += 'carla_host_handle_free',
  141. SYMBOLS_NATIVE += 'carla_get_native_plugin_engine',
  142. SYMBOLS_NATIVE += 'carla_get_complete_license_text',
  143. SYMBOLS_NATIVE += 'carla_get_juce_version',
  144. SYMBOLS_NATIVE += 'carla_get_supported_file_extensions',
  145. SYMBOLS_NATIVE += 'carla_get_supported_features',
  146. SYMBOLS_NATIVE += 'carla_get_library_filename',
  147. SYMBOLS_NATIVE += 'carla_get_library_folder'
  148. SYMBOLS_NATIVE += ]"
  149. ifeq ($(HAVE_PYQT),true)
  150. SYMBOLS_LV2 = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2ui_descriptor']"
  151. SYMBOLS_LV2_UI = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['lv2ui_descriptor']"
  152. else
  153. SYMBOLS_LV2 = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['lv2_descriptor']"
  154. endif
  155. SYMBOLS_VST = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['VSTPluginMain']"
  156. else ifeq ($(WINDOWS),true)
  157. SYMBOLS_NATIVE = symbols/carla-native-plugin.def
  158. SYMBOLS_VST = symbols/carla-vst.def
  159. ifeq ($(HAVE_PYQT),true)
  160. SYMBOLS_LV2 = symbols/carla-lv2_dsp+ui.def
  161. SYMBOLS_LV2_UI = symbols/carla-lv2_ui.def
  162. else
  163. SYMBOLS_LV2 = symbols/carla-lv2_dsp.def
  164. endif
  165. else
  166. SYMBOLS_NATIVE = -Wl,--version-script=symbols/carla-native-plugin.version
  167. SYMBOLS_VST = -Wl,--version-script=symbols/carla-vst.version
  168. ifeq ($(HAVE_PYQT),true)
  169. SYMBOLS_LV2 = -Wl,--version-script=symbols/carla-lv2_dsp+ui.version
  170. SYMBOLS_LV2_UI = -Wl,--version-script=symbols/carla-lv2_ui.version
  171. else
  172. SYMBOLS_LV2 = -Wl,--version-script=symbols/carla-lv2_dsp.version
  173. endif
  174. endif
  175. # ---------------------------------------------------------------------------------------------------------------------
  176. # Other libs
  177. LIBS_ui = $(MODULEDIR)/water.a
  178. LIBS_wine = $(MODULEDIR)/dgl.wine.a
  179. LIBS_wine += $(MODULEDIR)/water.files.a
  180. WINE_LINK_FLAGS = $(LINK_FLAGS)
  181. WINE_LINK_FLAGS += -L$(BINDIR) -lcarla_native-plugin
  182. WINE_LINK_FLAGS += -lstdc++ -lopengl32 -lgdi32 -ldl
  183. WINE_LINK_FLAGS += -Wl,-rpath,/usr/local/lib/carla
  184. WINE_LINK_FLAGS += -Wl,-rpath,/usr/lib/carla
  185. # ---------------------------------------------------------------------------------------------------------------------
  186. TARGETS = \
  187. $(BINDIR)/libcarla_host-plugin$(LIB_EXT) \
  188. $(BINDIR)/libcarla_native-plugin$(LIB_EXT)
  189. # sometimes needed for testing:
  190. # $(BINDIR)/carla-native-plugin$(APP_EXT)
  191. # ---------------------------------------------------------------------------------------------------------------------
  192. ifneq ($(STATIC_PLUGIN_TARGET),true)
  193. TARGETS += \
  194. $(BINDIR)/carla.lv2/carla$(LIB_EXT)
  195. ifeq ($(HAVE_PYQT),true)
  196. TARGETS += \
  197. $(BINDIR)/carla.lv2/carla-ui$(LIB_EXT)
  198. endif
  199. ifeq ($(CAN_GENERATE_LV2_TTL),true)
  200. TARGETS += \
  201. $(BINDIR)/carla.lv2/manifest.ttl
  202. endif
  203. ifneq ($(HAIKU),true)
  204. ifeq ($(HAVE_DGL),true)
  205. ifeq ($(HAVE_PYQT),true)
  206. TARGETS += \
  207. $(BINDIR)/CarlaRack$(LIB_EXT) \
  208. $(BINDIR)/CarlaRackFX$(LIB_EXT) \
  209. $(BINDIR)/CarlaPatchbay$(LIB_EXT) \
  210. $(BINDIR)/CarlaPatchbay16$(LIB_EXT) \
  211. $(BINDIR)/CarlaPatchbay32$(LIB_EXT) \
  212. $(BINDIR)/CarlaPatchbay64$(LIB_EXT) \
  213. $(BINDIR)/CarlaPatchbayFX$(LIB_EXT) \
  214. $(BINDIR)/CarlaVstShell$(LIB_EXT) \
  215. $(BINDIR)/CarlaVstFxShell$(LIB_EXT)
  216. endif
  217. endif
  218. endif
  219. endif # !STATIC_PLUGIN_TARGET
  220. # ---------------------------------------------------------------------------------------------------------------------
  221. all: $(TARGETS)
  222. ifeq ($(WINDOWS),true)
  223. wine: $(BINDIR)/CarlaVstShellBridged.dll $(BINDIR)/CarlaVstFxShellBridged.dll
  224. else
  225. wine: $(BINDIR)/CarlaVstShellBridged.dll.so $(BINDIR)/CarlaVstFxShellBridged.dll.so
  226. endif
  227. static: $(OBJDIR)/carla-host-plugin.cpp.o
  228. # ---------------------------------------------------------------------------------------------------------------------
  229. BUNDLES = audiogain files miditools
  230. bundles: \
  231. $(BINDIR)/carla-audiogain.lv2/manifest.ttl \
  232. $(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT) \
  233. $(BINDIR)/carla-files.lv2/manifest.ttl \
  234. $(BINDIR)/carla-files.lv2/carla$(LIB_EXT) \
  235. $(BINDIR)/carla-miditools.lv2/manifest.ttl \
  236. $(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT)
  237. BUNDLE_LIBS += $(MODULEDIR)/water.files.a
  238. BUNDLE_LIBS += $(WATER_LIBS)
  239. BUNDLE_FILES_LIBS += $(MODULEDIR)/audio_decoder.a
  240. BUNDLE_FILES_LIBS += $(MODULEDIR)/water.a
  241. BUNDLE_FILES_LIBS += $(MODULEDIR)/zita-resampler.a
  242. BUNDLE_FILES_LIBS += $(AUDIO_DECODER_LIBS)
  243. BUNDLE_FILES_LIBS += $(WATER_LIBS)
  244. # ---------------------------------------------------------------------------------------------------------------------
  245. clean:
  246. rm -f $(OBJDIR)/*.o $(TARGETS)
  247. rm -f $(BINDIR)/carla.lv2/*.*
  248. rm -f $(BINDIR)/carla-lv2-export$(APP_EXT)
  249. rm -rf $(BINDIR)/carla-*.lv2
  250. debug:
  251. $(MAKE) DEBUG=true
  252. # ---------------------------------------------------------------------------------------------------------------------
  253. $(BINDIR)/libcarla_host-plugin$(LIB_EXT): $(OBJDIR)/carla-host-plugin.cpp.o $(LIBS) $(LIBS_juce)
  254. -@mkdir -p $(BINDIR)
  255. @echo "Linking libcarla-host-plugin$(LIB_EXT)"
  256. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(NATIVE_LINK_FLAGS) -o $@
  257. # ---------------------------------------------------------------------------------------------------------------------
  258. $(BINDIR)/carla-native-plugin$(APP_EXT): $(OBJDIR)/carla-native-plugin.cpp.o $(LIBS) $(LIBS_juce)
  259. -@mkdir -p $(BINDIR)
  260. @echo "Linking carla-native-plugin$(APP_EXT)"
  261. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $@
  262. $(BINDIR)/libcarla_native-plugin$(LIB_EXT): $(OBJDIR)/carla-native-plugin.cpp.o $(LIBS) $(LIBS_juce)
  263. -@mkdir -p $(BINDIR)
  264. @echo "Linking libcarla-native-plugin$(LIB_EXT)"
  265. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_NATIVE) $(NATIVE_LINK_FLAGS) -o $@
  266. # ---------------------------------------------------------------------------------------------------------------------
  267. $(BINDIR)/carla.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2.cpp.o $(LIBS) $(LIBS_juce)
  268. -@mkdir -p $(BINDIR)/carla.lv2
  269. @echo "Linking carla.lv2/carla$(LIB_EXT)"
  270. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_LV2) $(NATIVE_LINK_FLAGS) -o $@
  271. $(BINDIR)/carla.lv2/carla-ui$(LIB_EXT): $(OBJDIR)/carla-lv2-ui.cpp.o $(LIBS_ui)
  272. -@mkdir -p $(BINDIR)/carla.lv2
  273. @echo "Linking carla.lv2/carla-ui$(LIB_EXT)"
  274. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS_ui) $(LIBS_END) $(SHARED) $(SYMBOLS_LV2_UI) $(NATIVE_LINK_FLAGS) -o $@
  275. # ---------------------------------------------------------------------------------------------------------------------
  276. $(BINDIR)/carla-%.lv2/manifest.ttl: $(DATADIR)/lv2-bundles/%/*.ttl
  277. -@mkdir -p $(shell dirname $@)
  278. $(SILENT)cp -v $^ $(shell dirname $@)
  279. $(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.o $(MODULEDIR)/native-plugins_audiogain.a
  280. -@mkdir -p $(BINDIR)/carla-audiogain.lv2
  281. @echo "Linking carla-audiogain.lv2/carla$(LIB_EXT)"
  282. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_LIBS) $(LINK_FLAGS) -ldl -o $@
  283. $(BINDIR)/carla-files.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.files.o $(MODULEDIR)/native-plugins_files.a
  284. -@mkdir -p $(BINDIR)/carla-files.lv2
  285. @echo "Linking carla-files.lv2/carla$(LIB_EXT)"
  286. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_FILES_LIBS) $(LINK_FLAGS) -o $@
  287. $(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.miditools.o $(MODULEDIR)/native-plugins_miditools.a
  288. -@mkdir -p $(BINDIR)/carla-miditools.lv2
  289. @echo "Linking carla-miditools.lv2/carla$(LIB_EXT)"
  290. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_LIBS) $(LINK_FLAGS) -o $@
  291. # ---------------------------------------------------------------------------------------------------------------------
  292. $(BINDIR)/CarlaRack$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.rack-syn.o $(OBJDIR)/carla-vst-export.cpp.o
  293. -@mkdir -p $(BINDIR)
  294. @echo "Linking CarlaRack$(LIB_EXT)"
  295. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  296. $(BINDIR)/CarlaRackFX$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.rack-fx.o $(OBJDIR)/carla-vst-export.cpp.o
  297. -@mkdir -p $(BINDIR)
  298. @echo "Linking CarlaRackFX$(LIB_EXT)"
  299. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  300. $(BINDIR)/CarlaPatchbay$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn.o $(OBJDIR)/carla-vst-export.cpp.o
  301. -@mkdir -p $(BINDIR)
  302. @echo "Linking CarlaPatchbay$(LIB_EXT)"
  303. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  304. $(BINDIR)/CarlaPatchbay16$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn16.o $(OBJDIR)/carla-vst-export.cpp.o
  305. -@mkdir -p $(BINDIR)
  306. @echo "Linking CarlaPatchbay16$(LIB_EXT)"
  307. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  308. $(BINDIR)/CarlaPatchbay32$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn32.o $(OBJDIR)/carla-vst-export.cpp.o
  309. -@mkdir -p $(BINDIR)
  310. @echo "Linking CarlaPatchbay32$(LIB_EXT)"
  311. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  312. $(BINDIR)/CarlaPatchbay64$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn64.o $(OBJDIR)/carla-vst-export.cpp.o
  313. -@mkdir -p $(BINDIR)
  314. @echo "Linking CarlaPatchbay64$(LIB_EXT)"
  315. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  316. $(BINDIR)/CarlaPatchbayFX$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-fx.o $(OBJDIR)/carla-vst-export.cpp.o
  317. -@mkdir -p $(BINDIR)
  318. @echo "Linking CarlaPatchbayFX$(LIB_EXT)"
  319. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  320. # ---------------------------------------------------------------------------------------------------------------------
  321. $(BINDIR)/CarlaVstShell$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.shell.o $(OBJDIR)/carla-vst-export.cpp.o
  322. -@mkdir -p $(BINDIR)
  323. @echo "Linking CarlaVstShell$(LIB_EXT)"
  324. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  325. $(BINDIR)/CarlaVstFxShell$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.shellfx.o $(OBJDIR)/carla-vst-export.cpp.o
  326. -@mkdir -p $(BINDIR)
  327. @echo "Linking CarlaVstFxShell$(LIB_EXT)"
  328. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  329. ifeq ($(WINDOWS),true)
  330. $(BINDIR)/CarlaVstShellBridged.dll: $(OBJDIR)/carla-vst-export-bridged.cpp.synth.o
  331. -@mkdir -p $(BINDIR)
  332. @echo "Linking CarlaVstShellBridged.dll"
  333. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_VST) $(LINK_FLAGS) -o $@
  334. $(BINDIR)/CarlaVstFxShellBridged.dll: $(OBJDIR)/carla-vst-export-bridged.cpp.fx.o
  335. -@mkdir -p $(BINDIR)
  336. @echo "Linking CarlaVstFxShellBridged.dll"
  337. $(SILENT)$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_VST) $(LINK_FLAGS) -o $@
  338. else
  339. # wine things
  340. $(BINDIR)/CarlaVstShellBridged.dll.so: $(OBJDIR)/carla-vst.cpp.shell.o $(OBJDIR)/carla-vst-export.cpp.dll.o
  341. -@mkdir -p $(BINDIR)
  342. @echo "Linking CarlaVstShellBridged.dll.so"
  343. $(SILENT)$(WINECC) $^ $(LIBS_START) $(LIBS_wine) $(LIBS_END) $(SHARED) symbols/carla-vst.def $(WINE_LINK_FLAGS) -o $@
  344. $(BINDIR)/CarlaVstFxShellBridged.dll.so: $(OBJDIR)/carla-vst.cpp.shellfx.o $(OBJDIR)/carla-vst-export.cpp.dll.o
  345. -@mkdir -p $(BINDIR)
  346. @echo "Linking CarlaVstFxShellBridged.dll.so"
  347. $(SILENT)$(WINECC) $^ $(LIBS_START) $(LIBS_wine) $(LIBS_END) $(SHARED) symbols/carla-vst.def $(WINE_LINK_FLAGS) -o $@
  348. endif
  349. # ---------------------------------------------------------------------------------------------------------------------
  350. ifeq ($(MACOS),true)
  351. ifeq ($(USING_JUCE),true)
  352. $(OBJDIR)/carla-host-plugin.cpp.o: carla-host-plugin.cpp
  353. -@mkdir -p $(OBJDIR)
  354. @echo "Compiling $<"
  355. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -std=gnu++14 -c -o $@
  356. endif
  357. endif
  358. $(OBJDIR)/carla-%-plugin.cpp.o: carla-%-plugin.cpp
  359. -@mkdir -p $(OBJDIR)
  360. @echo "Compiling $<"
  361. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  362. # ---------------------------------------------------------------------------------------------------------------------
  363. $(OBJDIR)/carla-lv2.cpp.o: carla-lv2.cpp
  364. -@mkdir -p $(OBJDIR)
  365. @echo "Compiling $<"
  366. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  367. $(OBJDIR)/carla-lv2-ui.cpp.o: carla-lv2-ui.cpp
  368. -@mkdir -p $(OBJDIR)
  369. @echo "Compiling $<"
  370. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  371. # ---------------------------------------------------------------------------------------------------------------------
  372. $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.o: carla-lv2-bundles.cpp
  373. -@mkdir -p $(OBJDIR)
  374. @echo "Compiling $< (audiogain)"
  375. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_BUNDLE_TYPE=1 -c -o $@
  376. $(OBJDIR)/carla-lv2-bundles.cpp.files.o: carla-lv2-bundles.cpp
  377. -@mkdir -p $(OBJDIR)
  378. @echo "Compiling $< (files)"
  379. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_BUNDLE_TYPE=2 -c -o $@
  380. $(OBJDIR)/carla-lv2-bundles.cpp.miditools.o: carla-lv2-bundles.cpp
  381. -@mkdir -p $(OBJDIR)
  382. @echo "Compiling $< (miditools)"
  383. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_BUNDLE_TYPE=3 -c -o $@
  384. # ---------------------------------------------------------------------------------------------------------------------
  385. $(OBJDIR)/carla-vst.cpp.rack-fx.o: carla-vst.cpp
  386. -@mkdir -p $(OBJDIR)
  387. @echo "Compiling $< (RackFX)"
  388. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=0 -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  389. $(OBJDIR)/carla-vst.cpp.rack-syn.o: carla-vst.cpp
  390. -@mkdir -p $(OBJDIR)
  391. @echo "Compiling $< (RackSynth)"
  392. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=0 -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  393. $(OBJDIR)/carla-vst.cpp.patchbay-fx.o: carla-vst.cpp
  394. -@mkdir -p $(OBJDIR)
  395. @echo "Compiling $< (PatchbayFX)"
  396. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  397. $(OBJDIR)/carla-vst.cpp.patchbay-syn.o: carla-vst.cpp
  398. -@mkdir -p $(OBJDIR)
  399. @echo "Compiling $< (PatchbaySynth)"
  400. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  401. $(OBJDIR)/carla-vst.cpp.patchbay-syn16.o: carla-vst.cpp
  402. -@mkdir -p $(OBJDIR)
  403. @echo "Compiling $< (PatchbaySynth 16ch)"
  404. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -DCARLA_PLUGIN_16CH -c -o $@
  405. $(OBJDIR)/carla-vst.cpp.patchbay-syn32.o: carla-vst.cpp
  406. -@mkdir -p $(OBJDIR)
  407. @echo "Compiling $< (PatchbaySynth 32ch)"
  408. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -DCARLA_PLUGIN_32CH -c -o $@
  409. $(OBJDIR)/carla-vst.cpp.patchbay-syn64.o: carla-vst.cpp
  410. -@mkdir -p $(OBJDIR)
  411. @echo "Compiling $< (PatchbaySynth 64ch)"
  412. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -DCARLA_PLUGIN_64CH -c -o $@
  413. $(OBJDIR)/carla-vst.cpp.shell.o: carla-vst.cpp
  414. -@mkdir -p $(OBJDIR)
  415. @echo "Compiling $< (VstShell)"
  416. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_VST_SHELL -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  417. $(OBJDIR)/carla-vst.cpp.shellfx.o: carla-vst.cpp
  418. -@mkdir -p $(OBJDIR)
  419. @echo "Compiling $< (VstShell)"
  420. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_VST_SHELL -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  421. $(OBJDIR)/carla-vst-export-bridged.cpp.fx.o: carla-vst-export-bridged.cpp
  422. -@mkdir -p $(OBJDIR)
  423. @echo "Compiling $<"
  424. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  425. $(OBJDIR)/carla-vst-export-bridged.cpp.synth.o: carla-vst-export-bridged.cpp
  426. -@mkdir -p $(OBJDIR)
  427. @echo "Compiling $<"
  428. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  429. $(OBJDIR)/carla-vst-export.cpp.o: carla-vst-export.cpp
  430. -@mkdir -p $(OBJDIR)
  431. @echo "Compiling $<"
  432. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  433. $(OBJDIR)/carla-vst-export.cpp.dll.o: carla-vst-export.cpp
  434. -@mkdir -p $(OBJDIR)
  435. @echo "Compiling $< (Wine)"
  436. $(SILENT)$(WINECC) $< $(BUILD_CXX_FLAGS) -c -o $@
  437. # ---------------------------------------------------------------------------------------------------------------------
  438. $(BINDIR)/carla.lv2/manifest.ttl: $(OBJDIR)/carla-lv2-export.cpp.o $(BINDIR)/carla.lv2/carla$(LIB_EXT)
  439. -@mkdir -p $(BINDIR)/carla.lv2
  440. @echo "Linking carla-lv2-export$(APP_EXT)"
  441. $(SILENT)$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $(BINDIR)/carla-lv2-export$(APP_EXT)
  442. @echo "Generating LV2 ttl data"
  443. $(SILENT)cd $(BINDIR) && $(EXE_WRAPPER) ./carla-lv2-export$(APP_EXT)
  444. $(SILENT)cd $(BINDIR)/carla.lv2 && ln -sf ../*bridge-* ../carla-discovery-* .
  445. $(BINDIR)/carla-lv2-export$(APP_EXT): $(OBJDIR)/carla-lv2-export.cpp.o
  446. -@mkdir -p $(BINDIR)
  447. @echo "Linking carla-lv2-export$(APP_EXT)"
  448. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $@
  449. $(OBJDIR)/carla-lv2-export.cpp.o: carla-lv2-export.cpp
  450. -@mkdir -p $(OBJDIR)
  451. @echo "Compiling $<"
  452. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  453. # ---------------------------------------------------------------------------------------------------------------------
  454. -include $(OBJDIR)/carla-host-plugin.cpp.d
  455. -include $(OBJDIR)/carla-native-plugin.cpp.d
  456. -include $(OBJDIR)/carla-lv2.cpp.d
  457. -include $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.d
  458. -include $(OBJDIR)/carla-lv2-bundles.cpp.files.d
  459. -include $(OBJDIR)/carla-lv2-bundles.cpp.miditools.d
  460. -include $(OBJDIR)/carla-lv2-export.cpp.d
  461. -include $(OBJDIR)/carla-vst.cpp.patchbay-fx.d
  462. -include $(OBJDIR)/carla-vst.cpp.patchbay-syn.d
  463. -include $(OBJDIR)/carla-vst.cpp.patchbay-syn16.d
  464. -include $(OBJDIR)/carla-vst.cpp.rack-fx.d
  465. -include $(OBJDIR)/carla-vst.cpp.rack-syn.d
  466. -include $(OBJDIR)/carla-vst.cpp.shell.d
  467. -include $(OBJDIR)/carla-vst-export.cpp.d
  468. -include $(OBJDIR)/carla-vst-export.cpp.dll.d
  469. -include $(OBJDIR)/carla-vst-export-bridged.cpp.fx.d
  470. -include $(OBJDIR)/carla-vst-export-bridged.cpp.synth.d
  471. # ---------------------------------------------------------------------------------------------------------------------