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.

517 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. ifeq ($(HAVE_X11),true)
  37. BUILD_CXX_FLAGS += $(X11_FLAGS)
  38. endif
  39. # ---------------------------------------------------------------------------------------------------------------------
  40. # Libs
  41. LIBS = $(MODULEDIR)/carla_engine_plugin.a
  42. LIBS += $(MODULEDIR)/carla_plugin.a
  43. LIBS += $(MODULEDIR)/jackbridge.a
  44. LIBS += $(MODULEDIR)/lilv.a
  45. LIBS += $(MODULEDIR)/rtmempool.a
  46. LIBS += $(MODULEDIR)/water.a
  47. LIBS += $(MODULEDIR)/audio_decoder.a
  48. LIBS += $(MODULEDIR)/native-plugins.a
  49. LIBS += $(MODULEDIR)/sfzero.a
  50. LIBS += $(MODULEDIR)/zita-resampler.a
  51. ifeq ($(HAVE_DGL),true)
  52. LIBS += $(MODULEDIR)/dgl.a
  53. endif
  54. ifeq ($(HAVE_HYLIA),true)
  55. LIBS += $(MODULEDIR)/hylia.a
  56. endif
  57. ifeq ($(USING_JUCE),true)
  58. LIBS += $(MODULEDIR)/juce_audio_basics.a
  59. LIBS += $(MODULEDIR)/juce_audio_processors.a
  60. LIBS += $(MODULEDIR)/juce_core.a
  61. LIBS += $(MODULEDIR)/juce_data_structures.a
  62. LIBS += $(MODULEDIR)/juce_events.a
  63. LIBS += $(MODULEDIR)/juce_graphics.a
  64. LIBS += $(MODULEDIR)/juce_gui_basics.a
  65. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  66. LIBS += $(MODULEDIR)/juce_gui_extra.a
  67. endif
  68. endif
  69. # ---------------------------------------------------------------------------------------------------------------------
  70. # Link flags
  71. NATIVE_LINK_FLAGS = $(HYLIA_LIBS)
  72. NATIVE_LINK_FLAGS += $(LINK_FLAGS)
  73. NATIVE_LINK_FLAGS += $(JACKBRIDGE_LIBS)
  74. NATIVE_LINK_FLAGS += $(LILV_LIBS)
  75. NATIVE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  76. NATIVE_LINK_FLAGS += $(WATER_LIBS)
  77. NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  78. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  79. NATIVE_LINK_FLAGS += $(LIBLO_LIBS)
  80. NATIVE_LINK_FLAGS += $(MAGIC_LIBS)
  81. NATIVE_LINK_FLAGS += $(X11_LIBS)
  82. ifeq ($(USING_JUCE),true)
  83. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  84. LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  85. LINK_FLAGS += $(JUCE_CORE_LIBS)
  86. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  87. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  88. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  89. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  90. ifeq ($(USING_JUCE_GUI_EXTRA),true)
  91. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  92. endif
  93. endif
  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. # ---------------------------------------------------------------------------------------------------------------------
  179. BUNDLES = audiogain files miditools
  180. bundles: \
  181. $(BINDIR)/carla-audiogain.lv2/manifest.ttl \
  182. $(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT) \
  183. $(BINDIR)/carla-files.lv2/manifest.ttl \
  184. $(BINDIR)/carla-files.lv2/carla$(LIB_EXT) \
  185. $(BINDIR)/carla-miditools.lv2/manifest.ttl \
  186. $(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT)
  187. BUNDLE_LIBS += $(MODULEDIR)/water.files.a
  188. BUNDLE_LIBS += $(WATER_LIBS)
  189. BUNDLE_FILES_LIBS += $(MODULEDIR)/audio_decoder.a
  190. BUNDLE_FILES_LIBS += $(MODULEDIR)/water.a
  191. BUNDLE_FILES_LIBS += $(MODULEDIR)/zita-resampler.a
  192. BUNDLE_FILES_LIBS += $(AUDIO_DECODER_LIBS)
  193. BUNDLE_FILES_LIBS += $(WATER_LIBS)
  194. # ---------------------------------------------------------------------------------------------------------------------
  195. clean:
  196. rm -f $(OBJDIR)/*.o $(TARGETS)
  197. rm -f $(BINDIR)/carla.lv2/*.*
  198. rm -f $(BINDIR)/carla-lv2-export$(APP_EXT)
  199. rm -rf $(BINDIR)/carla-*.lv2
  200. debug:
  201. $(MAKE) DEBUG=true
  202. # ---------------------------------------------------------------------------------------------------------------------
  203. $(BINDIR)/libcarla_host-plugin$(LIB_EXT): $(OBJDIR)/carla-host-plugin.cpp.o $(LIBS)
  204. -@mkdir -p $(BINDIR)
  205. @echo "Linking libcarla-host-plugin$(LIB_EXT)"
  206. @$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(NATIVE_LINK_FLAGS) -o $@
  207. # ---------------------------------------------------------------------------------------------------------------------
  208. $(BINDIR)/carla-native-plugin$(APP_EXT): $(OBJDIR)/carla-native-plugin.cpp.o $(LIBS)
  209. -@mkdir -p $(BINDIR)
  210. @echo "Linking carla-native-plugin$(APP_EXT)"
  211. @$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $@
  212. $(BINDIR)/libcarla_native-plugin$(LIB_EXT): $(OBJDIR)/carla-native-plugin.cpp.o $(LIBS)
  213. -@mkdir -p $(BINDIR)
  214. @echo "Linking libcarla-native-plugin$(LIB_EXT)"
  215. @$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_NATIVE) $(NATIVE_LINK_FLAGS) -o $@
  216. # ---------------------------------------------------------------------------------------------------------------------
  217. $(BINDIR)/carla.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2.cpp.o $(LIBS)
  218. -@mkdir -p $(BINDIR)/carla.lv2
  219. @echo "Linking carla.lv2/carla$(LIB_EXT)"
  220. @$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_LV2) $(NATIVE_LINK_FLAGS) -o $@
  221. $(BINDIR)/carla.lv2/carla-ui$(LIB_EXT): $(OBJDIR)/carla-lv2-ui.cpp.o $(LIBS_ui)
  222. -@mkdir -p $(BINDIR)/carla.lv2
  223. @echo "Linking carla.lv2/carla-ui$(LIB_EXT)"
  224. @$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS_ui) $(LIBS_END) $(SHARED) $(SYMBOLS_LV2_UI) $(NATIVE_LINK_FLAGS) -o $@
  225. # ---------------------------------------------------------------------------------------------------------------------
  226. $(BINDIR)/carla-%.lv2/manifest.ttl: $(DATADIR)/lv2-bundles/%/*.ttl
  227. -@mkdir -p $(shell dirname $@)
  228. @cp -v $^ $(shell dirname $@)
  229. $(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.o $(MODULEDIR)/native-plugins_audiogain.a
  230. -@mkdir -p $(BINDIR)/carla-audiogain.lv2
  231. @echo "Linking carla-audiogain.lv2/carla$(LIB_EXT)"
  232. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_LIBS) $(LINK_FLAGS) -ldl -o $@
  233. $(BINDIR)/carla-files.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.files.o $(MODULEDIR)/native-plugins_files.a
  234. -@mkdir -p $(BINDIR)/carla-files.lv2
  235. @echo "Linking carla-files.lv2/carla$(LIB_EXT)"
  236. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_FILES_LIBS) $(LINK_FLAGS) -o $@
  237. $(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT): $(OBJDIR)/carla-lv2-bundles.cpp.miditools.o $(MODULEDIR)/native-plugins_miditools.a
  238. -@mkdir -p $(BINDIR)/carla-miditools.lv2
  239. @echo "Linking carla-miditools.lv2/carla$(LIB_EXT)"
  240. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_LV2) $(BUNDLE_LIBS) $(LINK_FLAGS) -o $@
  241. # ---------------------------------------------------------------------------------------------------------------------
  242. $(BINDIR)/CarlaRack$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.rack-syn.o $(OBJDIR)/carla-vst-export.cpp.o
  243. -@mkdir -p $(BINDIR)
  244. @echo "Linking CarlaRack$(LIB_EXT)"
  245. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  246. $(BINDIR)/CarlaRackFX$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.rack-fx.o $(OBJDIR)/carla-vst-export.cpp.o
  247. -@mkdir -p $(BINDIR)
  248. @echo "Linking CarlaRackFX$(LIB_EXT)"
  249. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  250. $(BINDIR)/CarlaPatchbay$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn.o $(OBJDIR)/carla-vst-export.cpp.o
  251. -@mkdir -p $(BINDIR)
  252. @echo "Linking CarlaPatchbay$(LIB_EXT)"
  253. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  254. $(BINDIR)/CarlaPatchbay16$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn16.o $(OBJDIR)/carla-vst-export.cpp.o
  255. -@mkdir -p $(BINDIR)
  256. @echo "Linking CarlaPatchbay16$(LIB_EXT)"
  257. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  258. $(BINDIR)/CarlaPatchbay32$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn32.o $(OBJDIR)/carla-vst-export.cpp.o
  259. -@mkdir -p $(BINDIR)
  260. @echo "Linking CarlaPatchbay32$(LIB_EXT)"
  261. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  262. $(BINDIR)/CarlaPatchbay64$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-syn64.o $(OBJDIR)/carla-vst-export.cpp.o
  263. -@mkdir -p $(BINDIR)
  264. @echo "Linking CarlaPatchbay64$(LIB_EXT)"
  265. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  266. $(BINDIR)/CarlaPatchbayFX$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.patchbay-fx.o $(OBJDIR)/carla-vst-export.cpp.o
  267. -@mkdir -p $(BINDIR)
  268. @echo "Linking CarlaPatchbayFX$(LIB_EXT)"
  269. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  270. # ---------------------------------------------------------------------------------------------------------------------
  271. $(BINDIR)/CarlaVstShell$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.shell.o $(OBJDIR)/carla-vst-export.cpp.o
  272. -@mkdir -p $(BINDIR)
  273. @echo "Linking CarlaVstShell$(LIB_EXT)"
  274. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  275. $(BINDIR)/CarlaVstFxShell$(LIB_EXT): $(OBJDIR)/carla-vst.cpp.shellfx.o $(OBJDIR)/carla-vst-export.cpp.o
  276. -@mkdir -p $(BINDIR)
  277. @echo "Linking CarlaVstFxShell$(LIB_EXT)"
  278. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(SHARED) $(SYMBOLS_VST) $(NATIVE_LINK_FLAGS) -o $@
  279. ifeq ($(WIN32),true)
  280. $(BINDIR)/CarlaVstShellBridged.dll: $(OBJDIR)/carla-vst-export-bridged.cpp.synth.o
  281. -@mkdir -p $(BINDIR)
  282. @echo "Linking CarlaVstShellBridged.dll"
  283. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_VST) $(LINK_FLAGS) -o $@
  284. $(BINDIR)/CarlaVstFxShellBridged.dll: $(OBJDIR)/carla-vst-export-bridged.cpp.fx.o
  285. -@mkdir -p $(BINDIR)
  286. @echo "Linking CarlaVstFxShellBridged.dll"
  287. @$(CXX) $^ $(BUILD_CXX_FLAGS) $(SHARED) $(SYMBOLS_VST) $(LINK_FLAGS) -o $@
  288. else
  289. # wine things
  290. $(BINDIR)/CarlaVstShellBridged.dll.so: $(OBJDIR)/carla-vst.cpp.shell.o $(OBJDIR)/carla-vst-export.cpp.dll.o
  291. -@mkdir -p $(BINDIR)
  292. @echo "Linking CarlaVstShellBridged.dll.so"
  293. @$(WINECC) $^ $(LIBS_START) $(LIBS_wine) $(LIBS_END) $(SHARED) symbols/carla-vst.def $(WINE_LINK_FLAGS) -o $@
  294. $(BINDIR)/CarlaVstFxShellBridged.dll.so: $(OBJDIR)/carla-vst.cpp.shellfx.o $(OBJDIR)/carla-vst-export.cpp.dll.o
  295. -@mkdir -p $(BINDIR)
  296. @echo "Linking CarlaVstFxShellBridged.dll.so"
  297. @$(WINECC) $^ $(LIBS_START) $(LIBS_wine) $(LIBS_END) $(SHARED) symbols/carla-vst.def $(WINE_LINK_FLAGS) -o $@
  298. endif
  299. # ---------------------------------------------------------------------------------------------------------------------
  300. $(OBJDIR)/carla-%-plugin.cpp.o: carla-%-plugin.cpp
  301. -@mkdir -p $(OBJDIR)
  302. @echo "Compiling $<"
  303. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  304. # ---------------------------------------------------------------------------------------------------------------------
  305. $(OBJDIR)/carla-lv2.cpp.o: carla-lv2.cpp
  306. -@mkdir -p $(OBJDIR)
  307. @echo "Compiling $<"
  308. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  309. $(OBJDIR)/carla-lv2-ui.cpp.o: carla-lv2-ui.cpp
  310. -@mkdir -p $(OBJDIR)
  311. @echo "Compiling $<"
  312. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  313. # ---------------------------------------------------------------------------------------------------------------------
  314. $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.o: carla-lv2-bundles.cpp
  315. -@mkdir -p $(OBJDIR)
  316. @echo "Compiling $< (audiogain)"
  317. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_BUNDLE_TYPE=1 -c -o $@
  318. $(OBJDIR)/carla-lv2-bundles.cpp.files.o: carla-lv2-bundles.cpp
  319. -@mkdir -p $(OBJDIR)
  320. @echo "Compiling $< (files)"
  321. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_BUNDLE_TYPE=2 -c -o $@
  322. $(OBJDIR)/carla-lv2-bundles.cpp.miditools.o: carla-lv2-bundles.cpp
  323. -@mkdir -p $(OBJDIR)
  324. @echo "Compiling $< (miditools)"
  325. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_BUNDLE_TYPE=3 -c -o $@
  326. # ---------------------------------------------------------------------------------------------------------------------
  327. $(OBJDIR)/carla-vst.cpp.rack-fx.o: carla-vst.cpp
  328. -@mkdir -p $(OBJDIR)
  329. @echo "Compiling $< (RackFX)"
  330. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=0 -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  331. $(OBJDIR)/carla-vst.cpp.rack-syn.o: carla-vst.cpp
  332. -@mkdir -p $(OBJDIR)
  333. @echo "Compiling $< (RackSynth)"
  334. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=0 -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  335. $(OBJDIR)/carla-vst.cpp.patchbay-fx.o: carla-vst.cpp
  336. -@mkdir -p $(OBJDIR)
  337. @echo "Compiling $< (PatchbayFX)"
  338. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  339. $(OBJDIR)/carla-vst.cpp.patchbay-syn.o: carla-vst.cpp
  340. -@mkdir -p $(OBJDIR)
  341. @echo "Compiling $< (PatchbaySynth)"
  342. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  343. $(OBJDIR)/carla-vst.cpp.patchbay-syn16.o: carla-vst.cpp
  344. -@mkdir -p $(OBJDIR)
  345. @echo "Compiling $< (PatchbaySynth 16ch)"
  346. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -DCARLA_PLUGIN_16CH -c -o $@
  347. $(OBJDIR)/carla-vst.cpp.patchbay-syn32.o: carla-vst.cpp
  348. -@mkdir -p $(OBJDIR)
  349. @echo "Compiling $< (PatchbaySynth 32ch)"
  350. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -DCARLA_PLUGIN_32CH -c -o $@
  351. $(OBJDIR)/carla-vst.cpp.patchbay-syn64.o: carla-vst.cpp
  352. -@mkdir -p $(OBJDIR)
  353. @echo "Compiling $< (PatchbaySynth 64ch)"
  354. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_PATCHBAY=1 -DCARLA_PLUGIN_SYNTH=1 -DCARLA_PLUGIN_64CH -c -o $@
  355. $(OBJDIR)/carla-vst.cpp.shell.o: carla-vst.cpp
  356. -@mkdir -p $(OBJDIR)
  357. @echo "Compiling $< (VstShell)"
  358. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_VST_SHELL -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  359. $(OBJDIR)/carla-vst.cpp.shellfx.o: carla-vst.cpp
  360. -@mkdir -p $(OBJDIR)
  361. @echo "Compiling $< (VstShell)"
  362. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_VST_SHELL -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  363. $(OBJDIR)/carla-vst-export-bridged.cpp.fx.o: carla-vst-export-bridged.cpp $(LIBS)
  364. -@mkdir -p $(OBJDIR)
  365. @echo "Compiling $<"
  366. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_SYNTH=0 -c -o $@
  367. $(OBJDIR)/carla-vst-export-bridged.cpp.synth.o: carla-vst-export-bridged.cpp $(LIBS)
  368. -@mkdir -p $(OBJDIR)
  369. @echo "Compiling $<"
  370. @$(CXX) $< $(BUILD_CXX_FLAGS) -DCARLA_PLUGIN_SYNTH=1 -c -o $@
  371. $(OBJDIR)/carla-vst-export.cpp.o: carla-vst-export.cpp $(LIBS)
  372. -@mkdir -p $(OBJDIR)
  373. @echo "Compiling $<"
  374. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  375. $(OBJDIR)/carla-vst-export.cpp.dll.o: carla-vst-export.cpp $(LIBS)
  376. -@mkdir -p $(OBJDIR)
  377. @echo "Compiling $< (Wine)"
  378. @$(WINECC) $< $(BUILD_CXX_FLAGS) -c -o $@
  379. # ---------------------------------------------------------------------------------------------------------------------
  380. $(BINDIR)/carla.lv2/manifest.ttl: $(OBJDIR)/carla-lv2-export.cpp.o $(BINDIR)/carla.lv2/carla$(LIB_EXT)
  381. -@mkdir -p $(BINDIR)/carla.lv2
  382. @echo "Linking carla-lv2-export$(APP_EXT)"
  383. @$(CXX) $< $(LIBS_START) $(LIBS) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $(BINDIR)/carla-lv2-export$(APP_EXT)
  384. @echo "Generating LV2 ttl data"
  385. @cd $(BINDIR) && $(EXE_WRAPPER) ./carla-lv2-export$(APP_EXT)
  386. @cd $(BINDIR)/carla.lv2 && ln -sf ../*bridge-* ../carla-discovery-* .
  387. $(BINDIR)/carla-lv2-export$(APP_EXT): $(OBJDIR)/carla-lv2-export.cpp.o
  388. -@mkdir -p $(BINDIR)
  389. @echo "Linking carla-lv2-export$(APP_EXT)"
  390. @$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $@
  391. $(OBJDIR)/carla-lv2-export.cpp.o: carla-lv2-export.cpp
  392. -@mkdir -p $(OBJDIR)
  393. @echo "Compiling $<"
  394. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  395. # ---------------------------------------------------------------------------------------------------------------------
  396. -include $(OBJDIR)/carla-host-plugin.cpp.d
  397. -include $(OBJDIR)/carla-native-plugin.cpp.d
  398. -include $(OBJDIR)/carla-lv2.cpp.d
  399. -include $(OBJDIR)/carla-lv2-bundles.cpp.audiogain.d
  400. -include $(OBJDIR)/carla-lv2-bundles.cpp.files.d
  401. -include $(OBJDIR)/carla-lv2-bundles.cpp.miditools.d
  402. -include $(OBJDIR)/carla-lv2-export.cpp.d
  403. -include $(OBJDIR)/carla-vst.cpp.patchbay-fx.d
  404. -include $(OBJDIR)/carla-vst.cpp.patchbay-syn.d
  405. -include $(OBJDIR)/carla-vst.cpp.patchbay-syn16.d
  406. -include $(OBJDIR)/carla-vst.cpp.rack-fx.d
  407. -include $(OBJDIR)/carla-vst.cpp.rack-syn.d
  408. -include $(OBJDIR)/carla-vst.cpp.shell.d
  409. -include $(OBJDIR)/carla-vst-export.cpp.d
  410. -include $(OBJDIR)/carla-vst-export.cpp.dll.d
  411. -include $(OBJDIR)/carla-vst-export-bridged.cpp.fx.d
  412. -include $(OBJDIR)/carla-vst-export-bridged.cpp.synth.d
  413. # ---------------------------------------------------------------------------------------------------------------------