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