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.

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