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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  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. BUILD_CXX_FLAGS += $(YSFX_FLAGS)
  42. ifeq ($(HAVE_X11),true)
  43. BUILD_CXX_FLAGS += $(X11_FLAGS)
  44. endif
  45. # ---------------------------------------------------------------------------------------------------------------------
  46. # Libs
  47. LIBS = $(MODULEDIR)/carla_engine_plugin.a
  48. LIBS += $(MODULEDIR)/carla_plugin.a
  49. ifeq ($(STATIC_PLUGIN_TARGET),true)
  50. LIBS += $(MODULEDIR)/jackbridge.min.a
  51. else
  52. LIBS += $(MODULEDIR)/jackbridge.a
  53. endif
  54. LIBS += $(MODULEDIR)/lilv.a
  55. LIBS += $(MODULEDIR)/rtmempool.a
  56. LIBS += $(MODULEDIR)/water.a
  57. LIBS += $(MODULEDIR)/audio_decoder.a
  58. LIBS += $(MODULEDIR)/native-plugins.a
  59. LIBS += $(MODULEDIR)/sfzero.a
  60. LIBS += $(MODULEDIR)/zita-resampler.a
  61. ifeq ($(HAVE_DGL),true)
  62. ifeq ($(STATIC_PLUGIN_TARGET)$(USING_CUSTOM_DPF),truetrue)
  63. # nothing
  64. else ifeq ($(USING_CUSTOM_DPF),true)
  65. LIBS += $(CUSTOM_DPF_PATH)/build/libdgl-opengl.a
  66. else
  67. LIBS += $(MODULEDIR)/dgl.a
  68. endif
  69. endif
  70. ifeq ($(HAVE_HYLIA),true)
  71. LIBS += $(MODULEDIR)/hylia.a
  72. endif
  73. ifeq ($(USING_JUCE),true)
  74. LIBS_juce = $(MODULEDIR)/carla_juce.a
  75. LIBS_juce += $(MODULEDIR)/juce_audio_basics.a
  76. LIBS_juce += $(MODULEDIR)/juce_audio_processors.a
  77. LIBS_juce += $(MODULEDIR)/juce_core.a
  78. LIBS_juce += $(MODULEDIR)/juce_data_structures.a
  79. LIBS_juce += $(MODULEDIR)/juce_events.a
  80. LIBS_juce += $(MODULEDIR)/juce_graphics.a
  81. LIBS_juce += $(MODULEDIR)/juce_gui_basics.a
  82. LIBS_juce += $(MODULEDIR)/juce_gui_extra.a
  83. endif
  84. LIBS += $(MODULEDIR)/ysfx.a
  85. # ---------------------------------------------------------------------------------------------------------------------
  86. # Link flags
  87. NATIVE_LINK_FLAGS = $(HYLIA_LIBS)
  88. NATIVE_LINK_FLAGS += $(LINK_FLAGS)
  89. NATIVE_LINK_FLAGS += $(JACKBRIDGE_LIBS)
  90. NATIVE_LINK_FLAGS += $(LILV_LIBS)
  91. NATIVE_LINK_FLAGS += $(RTMEMPOOL_LIBS)
  92. NATIVE_LINK_FLAGS += $(WATER_LIBS)
  93. NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  94. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  95. NATIVE_LINK_FLAGS += $(LIBLO_LIBS)
  96. NATIVE_LINK_FLAGS += $(MAGIC_LIBS)
  97. NATIVE_LINK_FLAGS += $(X11_LIBS)
  98. ifeq ($(USING_JUCE),true)
  99. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  100. LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  101. LINK_FLAGS += $(JUCE_CORE_LIBS)
  102. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  103. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  104. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  105. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  106. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  107. endif
  108. LINK_FLAGS += $(YSFX_GRAPHICS_LIBS)
  109. ifeq ($(MACOS),true)
  110. SYMBOLS_NATIVE = -Wl,-exported_symbol,_carla_get_native_rack_plugin
  111. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay_plugin
  112. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay16_plugin
  113. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay32_plugin
  114. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay64_plugin
  115. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_patchbay_cv_plugin
  116. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_create_native_plugin_host_handle
  117. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_host_handle_free
  118. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_native_plugin_engine
  119. SYMBOLS_NATIVE += -Wl,-exported_symbol,_carla_get_library_folder
  120. SYMBOLS_LV2 = -Wl,-exported_symbol,_lv2_descriptor
  121. ifeq ($(HAVE_PYQT),true)
  122. SYMBOLS_LV2 += -Wl,-exported_symbol,_lv2ui_descriptor
  123. SYMBOLS_LV2_UI = -Wl,-exported_symbol,_lv2ui_descriptor
  124. endif
  125. SYMBOLS_VST = -Wl,-exported_symbol,_VSTPluginMain
  126. else ifeq ($(WASM),true)
  127. SYMBOLS_NATIVE = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="[
  128. SYMBOLS_NATIVE += 'carla_get_native_rack_plugin',
  129. SYMBOLS_NATIVE += 'carla_get_native_patchbay_plugin',
  130. SYMBOLS_NATIVE += 'carla_get_native_patchbay16_plugin',
  131. SYMBOLS_NATIVE += 'carla_get_native_patchbay32_plugin',
  132. SYMBOLS_NATIVE += 'carla_get_native_patchbay64_plugin',
  133. SYMBOLS_NATIVE += 'carla_get_native_patchbay_cv_plugin',
  134. SYMBOLS_NATIVE += 'carla_create_native_plugin_host_handle',
  135. SYMBOLS_NATIVE += 'carla_host_handle_free',
  136. SYMBOLS_NATIVE += 'carla_get_native_plugin_engine'
  137. SYMBOLS_NATIVE += ]"
  138. ifeq ($(HAVE_PYQT),true)
  139. SYMBOLS_LV2 = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['lv2_descriptor','lv2ui_descriptor']"
  140. SYMBOLS_LV2_UI = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['lv2ui_descriptor']"
  141. else
  142. SYMBOLS_LV2 = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['lv2_descriptor']"
  143. endif
  144. SYMBOLS_VST = -sSIDE_MODULE=2 -sEXPORTED_FUNCTIONS="['VSTPluginMain']"
  145. else ifeq ($(WINDOWS),true)
  146. SYMBOLS_NATIVE = symbols/carla-native-plugin.def
  147. SYMBOLS_VST = symbols/carla-vst.def
  148. ifeq ($(HAVE_PYQT),true)
  149. SYMBOLS_LV2 = symbols/carla-lv2_dsp+ui.def
  150. SYMBOLS_LV2_UI = symbols/carla-lv2_ui.def
  151. else
  152. SYMBOLS_LV2 = symbols/carla-lv2_dsp.def
  153. endif
  154. else
  155. SYMBOLS_NATIVE = -Wl,--version-script=symbols/carla-native-plugin.version
  156. SYMBOLS_VST = -Wl,--version-script=symbols/carla-vst.version
  157. ifeq ($(HAVE_PYQT),true)
  158. SYMBOLS_LV2 = -Wl,--version-script=symbols/carla-lv2_dsp+ui.version
  159. SYMBOLS_LV2_UI = -Wl,--version-script=symbols/carla-lv2_ui.version
  160. else
  161. SYMBOLS_LV2 = -Wl,--version-script=symbols/carla-lv2_dsp.version
  162. endif
  163. endif
  164. # ---------------------------------------------------------------------------------------------------------------------
  165. # Other libs
  166. LIBS_ui = $(MODULEDIR)/water.a
  167. LIBS_wine = $(MODULEDIR)/dgl.wine.a
  168. LIBS_wine += $(MODULEDIR)/water.files.a
  169. WINE_LINK_FLAGS = $(LINK_FLAGS)
  170. WINE_LINK_FLAGS += -L$(BINDIR) -lcarla_native-plugin
  171. WINE_LINK_FLAGS += -lstdc++ -lopengl32 -lgdi32 -ldl
  172. WINE_LINK_FLAGS += -Wl,-rpath,/usr/local/lib/carla
  173. WINE_LINK_FLAGS += -Wl,-rpath,/usr/lib/carla
  174. # ---------------------------------------------------------------------------------------------------------------------
  175. TARGETS = \
  176. $(BINDIR)/libcarla_host-plugin$(LIB_EXT) \
  177. $(BINDIR)/libcarla_native-plugin$(LIB_EXT)
  178. # sometimes needed for testing:
  179. # $(BINDIR)/carla-native-plugin$(APP_EXT)
  180. # ---------------------------------------------------------------------------------------------------------------------
  181. ifneq ($(STATIC_PLUGIN_TARGET),true)
  182. TARGETS += \
  183. $(BINDIR)/carla.lv2/carla$(LIB_EXT)
  184. ifeq ($(HAVE_PYQT),true)
  185. TARGETS += \
  186. $(BINDIR)/carla.lv2/carla-ui$(LIB_EXT)
  187. endif
  188. ifeq ($(CAN_GENERATE_LV2_TTL),true)
  189. TARGETS += \
  190. $(BINDIR)/carla.lv2/manifest.ttl
  191. endif
  192. ifneq ($(HAIKU),true)
  193. ifeq ($(HAVE_DGL),true)
  194. ifeq ($(HAVE_PYQT),true)
  195. TARGETS += \
  196. $(BINDIR)/CarlaRack$(LIB_EXT) \
  197. $(BINDIR)/CarlaRackFX$(LIB_EXT) \
  198. $(BINDIR)/CarlaPatchbay$(LIB_EXT) \
  199. $(BINDIR)/CarlaPatchbay16$(LIB_EXT) \
  200. $(BINDIR)/CarlaPatchbay32$(LIB_EXT) \
  201. $(BINDIR)/CarlaPatchbay64$(LIB_EXT) \
  202. $(BINDIR)/CarlaPatchbayFX$(LIB_EXT) \
  203. $(BINDIR)/CarlaVstShell$(LIB_EXT) \
  204. $(BINDIR)/CarlaVstFxShell$(LIB_EXT)
  205. endif
  206. endif
  207. endif
  208. endif # !STATIC_PLUGIN_TARGET
  209. # ---------------------------------------------------------------------------------------------------------------------
  210. all: $(TARGETS)
  211. ifeq ($(WINDOWS),true)
  212. wine: $(BINDIR)/CarlaVstShellBridged.dll $(BINDIR)/CarlaVstFxShellBridged.dll
  213. else
  214. wine: $(BINDIR)/CarlaVstShellBridged.dll.so $(BINDIR)/CarlaVstFxShellBridged.dll.so
  215. endif
  216. static: $(BINDIR)/libcarla_host-plugin.a
  217. # ---------------------------------------------------------------------------------------------------------------------
  218. BUNDLES = audiogain files miditools
  219. bundles: \
  220. $(BINDIR)/carla-audiogain.lv2/manifest.ttl \
  221. $(BINDIR)/carla-audiogain.lv2/carla$(LIB_EXT) \
  222. $(BINDIR)/carla-files.lv2/manifest.ttl \
  223. $(BINDIR)/carla-files.lv2/carla$(LIB_EXT) \
  224. $(BINDIR)/carla-miditools.lv2/manifest.ttl \
  225. $(BINDIR)/carla-miditools.lv2/carla$(LIB_EXT)
  226. BUNDLE_LIBS += $(MODULEDIR)/water.files.a
  227. BUNDLE_LIBS += $(WATER_LIBS)
  228. BUNDLE_FILES_LIBS += $(MODULEDIR)/audio_decoder.a
  229. BUNDLE_FILES_LIBS += $(MODULEDIR)/water.a
  230. BUNDLE_FILES_LIBS += $(MODULEDIR)/zita-resampler.a
  231. BUNDLE_FILES_LIBS += $(AUDIO_DECODER_LIBS)
  232. BUNDLE_FILES_LIBS += $(WATER_LIBS)
  233. # ---------------------------------------------------------------------------------------------------------------------
  234. clean:
  235. rm -f $(OBJDIR)/*.o $(TARGETS)
  236. rm -f $(BINDIR)/carla.lv2/*.*
  237. rm -f $(BINDIR)/carla-lv2-export$(APP_EXT)
  238. rm -rf $(BINDIR)/carla-*.lv2
  239. debug:
  240. $(MAKE) DEBUG=true
  241. # ---------------------------------------------------------------------------------------------------------------------
  242. $(BINDIR)/libcarla_host-plugin$(LIB_EXT): $(OBJDIR)/carla-host-plugin.cpp.o $(LIBS) $(LIBS_juce)
  243. -@mkdir -p $(BINDIR)
  244. @echo "Linking libcarla-host-plugin$(LIB_EXT)"
  245. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(SHARED) $(NATIVE_LINK_FLAGS) -o $@
  246. # ---------------------------------------------------------------------------------------------------------------------
  247. $(BINDIR)/libcarla_host-plugin.a: $(OBJDIR)/libcarla_host-plugin.o
  248. -@mkdir -p $(BINDIR)
  249. @echo "Creating libcarla_host-plugin.a"
  250. $(SILENT)rm -f $@
  251. $(SILENT)$(AR) crs $@ $^
  252. $(OBJDIR)/libcarla_host-plugin.o: $(OBJDIR)/carla-host-plugin.cpp.o $(LIBS) $(LIBS_juce)
  253. -@mkdir -p $(BINDIR)
  254. @echo "Linking libcarla-host-plugin.o"
  255. $(SILENT)$(CXX) $< $(BUILD_CXX_FLAGS) $(LIBS_START) $(LIBS) $(LIBS_juce) $(LIBS_END) $(COMBINE) -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. # ---------------------------------------------------------------------------------------------------------------------