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 19KB

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