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.

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