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.

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