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.

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