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.

Makefile 23KB

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