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.

525 lines
19KB

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