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.

575 lines
22KB

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