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.

531 lines
20KB

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