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.

840 lines
26KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-bridges #
  3. # -------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # --------------------------------------------------------------
  8. # Common
  9. BUILD_CXX_FLAGS += -DBUILD_BRIDGE
  10. BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules
  11. BUILD_CXX_FLAGS += $(LIBLO_FLAGS)
  12. LINK_FLAGS += $(LIBLO_LIBS)
  13. # --------------------------------------------------------------
  14. # Plugin bridges
  15. BUILD_PLUGIN_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_PLUGIN
  16. BUILD_PLUGIN_FLAGS += -I../backend/engine -I../backend/plugin
  17. BUILD_PLUGIN_FLAGS += $(QTCORE_FLAGS) $(QTXML_FLAGS)
  18. LINK_PLUGIN_FLAGS = $(LINK_FLAGS)
  19. LINK_PLUGIN_FLAGS += $(QTCORE_LIBS) $(QTXML_LIBS)
  20. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  21. BUILD_PLUGIN_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST -DWANT_VST3 -DWANT_REWIRE
  22. ifeq ($(MACOS),true)
  23. BUILD_CXX_FLAGS += -DWANT_AU
  24. endif
  25. ifeq ($(CARLA_VESTIGE_HEADER),true)
  26. BUILD_PLUGIN_FLAGS += -DVESTIGE_HEADER
  27. endif
  28. endif
  29. ifeq ($(HAVE_JUCE),true)
  30. LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  31. LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  32. LINK_PLUGIN_FLAGS += $(JUCE_CORE_LIBS)
  33. LINK_PLUGIN_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  34. LINK_PLUGIN_FLAGS += $(JUCE_EVENTS_LIBS)
  35. LINK_PLUGIN_FLAGS += $(JUCE_GRAPHICS_LIBS)
  36. LINK_PLUGIN_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  37. endif
  38. # --------------------------------------------------------------
  39. # Plugin bridges (POSIX)
  40. POSIX_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS)
  41. POSIX_32BIT_FLAGS = $(32BIT_FLAGS)
  42. POSIX_64BIT_FLAGS = $(64BIT_FLAGS)
  43. POSIX_LINK_FLAGS = $(LINK_PLUGIN_FLAGS)
  44. ifneq ($(HAIKU),true)
  45. POSIX_LINK_FLAGS += -ldl -lpthread
  46. endif
  47. ifeq ($(LINUX),true)
  48. POSIX_32BIT_FLAGS += -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  49. POSIX_64BIT_FLAGS += -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  50. endif
  51. # --------------------------------------------------------------
  52. # Plugin bridges (Windows)
  53. WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS) -DJACKBRIDGE_EXPORT
  54. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  55. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  56. WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -L../modules
  57. # --------------------------------------------------------------
  58. # Plugin bridges (Native)
  59. NATIVE_BUILD_FLAGS = $(POSIX_BUILD_FLAGS) -DWANT_NATIVE
  60. NATIVE_LINK_FLAGS = $(POSIX_LINK_FLAGS)
  61. ifeq ($(HAVE_DGL),true)
  62. NATIVE_LINK_FLAGS += $(DGL_LIBS)
  63. endif
  64. # ifeq ($(HAVE_CSOUND),true)
  65. # NATIVE_BUILD_FLAGS += -DWANT_CSOUND
  66. # NATIVE_BUILD_FLAGS += $(CSOUND_FLAGS)
  67. # NATIVE_LINK_FLAGS += $(CSOUND_LIBS)
  68. # endif
  69. ifeq ($(HAVE_FLUIDSYNTH),true)
  70. NATIVE_BUILD_FLAGS += -DWANT_FLUIDSYNTH
  71. NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
  72. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  73. endif
  74. ifeq ($(HAVE_LINUXSAMPLER),true)
  75. NATIVE_BUILD_FLAGS += -DWANT_LINUXSAMPLER
  76. NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS)
  77. NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  78. endif
  79. ifeq ($(HAVE_AF_DEPS),true)
  80. NATIVE_BUILD_FLAGS += -DWANT_AUDIOFILE
  81. endif
  82. ifeq ($(HAVE_MF_DEPS),true)
  83. NATIVE_BUILD_FLAGS += -DWANT_MIDIFILE
  84. endif
  85. ifeq ($(HAVE_ZYN_DEPS),true)
  86. NATIVE_BUILD_FLAGS += -DWANT_ZYNADDSUBFX
  87. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  88. NATIVE_LINK_FLAGS += -DWANT_ZYNADDSUBFX_UI
  89. endif
  90. endif
  91. NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  92. # --------------------------------------------------------------
  93. TARGETS = native
  94. # --------------------------------------------------------------
  95. # UI bridges
  96. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  97. BUILD_UI_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_UI
  98. LINK_UI_FLAGS = $(LINK_FLAGS)
  99. BUILD_UI_LV2_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_LV2
  100. BUILD_UI_VST_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_VST
  101. ifeq ($(CARLA_VESTIGE_HEADER),true)
  102. BUILD_UI_VST_FLAGS += -DVESTIGE_HEADER
  103. endif
  104. # --------------------------------------------------------------
  105. BUILD_UI_LV2_GTK2_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0) $(QTCORE_FLAGS)
  106. LINK_UI_LV2_GTK2_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-2.0) $(QTCORE_LIBS) -ldl
  107. BUILD_UI_LV2_GTK3_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0) $(QTCORE_FLAGS)
  108. LINK_UI_LV2_GTK3_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-3.0) $(QTCORE_LIBS) -ldl
  109. BUILD_UI_LV2_QT4_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui)
  110. LINK_UI_LV2_QT4_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl
  111. BUILD_UI_LV2_QT5_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  112. LINK_UI_LV2_QT5_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl
  113. BUILD_UI_LV2_COCOA_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA
  114. LINK_UI_LV2_COCOA_FLAGS = $(LINK_UI_FLAGS) -ldl
  115. BUILD_UI_LV2_HWND_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND
  116. LINK_UI_LV2_HWND_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS) -static -mwindows
  117. BUILD_UI_LV2_X11_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11
  118. LINK_UI_LV2_X11_FLAGS = $(LINK_UI_FLAGS) -ldl
  119. # --------------------------------------------------------------
  120. BUILD_UI_VST_CARBON_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_CARBON -DBRIDGE_VST_CARBON
  121. LINK_UI_VST_CARBON_FLAGS = $(LINK_UI_FLAGS) -ldl
  122. BUILD_UI_VST_COCOA_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_COCOA -DBRIDGE_VST_COCOA
  123. LINK_UI_VST_COCOA_FLAGS = $(LINK_UI_FLAGS) -ldl
  124. BUILD_UI_VST_HWND_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_HWND -DBRIDGE_VST_HWND
  125. LINK_UI_VST_HWND_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS) -static -mwindows
  126. BUILD_UI_VST_X11_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11
  127. LINK_UI_VST_X11_FLAGS = $(LINK_UI_FLAGS) -ldl
  128. # --------------------------------------------------------------
  129. ifeq ($(HAVE_GTK2),true)
  130. TARGETS += ui_lv2-gtk2
  131. endif
  132. ifeq ($(HAVE_GTK3),true)
  133. TARGETS += ui_lv2-gtk3
  134. endif
  135. ifeq ($(HAVE_QTGUI4),true)
  136. TARGETS += ui_lv2-qt4
  137. endif
  138. ifeq ($(HAVE_QTGUI5),true)
  139. TARGETS += ui_lv2-qt5
  140. endif
  141. ifeq ($(HAVE_X11),true)
  142. # TARGETS += ui_lv2-x11
  143. # TARGETS += ui_vst-x11
  144. endif
  145. ifeq ($(MACOS),true)
  146. # TARGETS += ui_lv2-cocoa
  147. # TARGETS += ui_vst-carbon
  148. # TARGETS += ui_vst-cocoa
  149. endif
  150. ifeq ($(WIN32),true)
  151. # TARGETS += ui_lv2-windows
  152. # TARGETS += ui_vst-hwnd
  153. endif
  154. endif # CARLA_PLUGIN_SUPPORT
  155. # --------------------------------------------------------------
  156. all: $(TARGETS)
  157. ui_lv2-gtk2: carla-bridge-lv2-gtk2
  158. ui_lv2-gtk3: carla-bridge-lv2-gtk3
  159. ui_lv2-qt4: carla-bridge-lv2-qt4
  160. ui_lv2-qt5: carla-bridge-lv2-qt5
  161. ui_lv2-cocoa: carla-bridge-lv2-cocoa
  162. ui_lv2-windows: carla-bridge-lv2-windows.exe
  163. ui_lv2-x11: carla-bridge-lv2-x11
  164. ui_vst-carbon: carla-bridge-vst-carbon
  165. ui_vst-cocoa: carla-bridge-vst-cocoa
  166. ui_vst-hwnd: carla-bridge-vst-hwnd.exe
  167. ui_vst-x11: carla-bridge-vst-x11
  168. # --------------------------------------------------------------
  169. jackplugin: jackplugin/libjack.so.0
  170. # --------------------------------------------------------------
  171. native: carla-bridge-native
  172. posix32: carla-bridge-posix32
  173. posix64: carla-bridge-posix64
  174. win32: carla-bridge-win32.exe
  175. win64: carla-bridge-win64.exe
  176. # --------------------------------------------------------------
  177. # UI common
  178. OBJS_UI_LV2_LIBS = \
  179. ../modules/lilv.a
  180. OBJS_UI_VST_LIBS =
  181. %__lv2.o: %.cpp
  182. $(CXX) $< $(BUILD_UI_LV2_FLAGS) -c -o $@
  183. %__vst.o: %.cpp
  184. $(CXX) $< $(BUILD_UI_VST_FLAGS) -c -o $@
  185. resources.qt4.cpp: ../../resources/resources-theme.qrc
  186. $(RCC_QT4) $< -o $@
  187. resources.qt5.cpp: ../../resources/resources-theme.qrc
  188. $(RCC_QT5) $< -o $@
  189. CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp
  190. $(MOC_QT4) $< -DMOC_PARSING -o $@
  191. CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp
  192. $(MOC_QT5) $< -DMOC_PARSING -o $@
  193. # --------------------------------------------------------------
  194. # ui_lv2-gtk2
  195. OBJS_UI_LV2_GTK2 = CarlaBridgeUI-LV2__lv2-gtk2.o \
  196. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  197. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk2.o
  198. carla-bridge-lv2-gtk2: $(OBJS_UI_LV2_GTK2) $(OBJS_UI_LV2_LIBS)
  199. $(CXX) $^ $(LINK_UI_LV2_GTK2_FLAGS) -o $@
  200. %__lv2-gtk2.o: %.cpp
  201. $(CXX) $< $(BUILD_UI_LV2_GTK2_FLAGS) -c -o $@
  202. # --------------------------------------------------------------
  203. # ui_lv2-gtk3
  204. OBJS_UI_LV2_GTK3 = CarlaBridgeUI-LV2__lv2-gtk3.o \
  205. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  206. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk3.o
  207. carla-bridge-lv2-gtk3: $(OBJS_UI_LV2_GTK3) $(OBJS_UI_LV2_LIBS)
  208. $(CXX) $^ $(LINK_UI_LV2_GTK3_FLAGS) -o $@
  209. %__lv2-gtk3.o: %.cpp
  210. $(CXX) $< $(BUILD_UI_LV2_GTK3_FLAGS) -c -o $@
  211. # --------------------------------------------------------------
  212. # ui_lv2-qt4
  213. OBJS_UI_LV2_QT4 = CarlaBridgeUI-LV2__lv2-qt4.o \
  214. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  215. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt4.o
  216. carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt4.a
  217. $(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@
  218. %__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt4.moc resources.qt4.cpp
  219. $(CXX) $< $(BUILD_UI_LV2_QT4_FLAGS) -I../modules/theme -c -o $@
  220. # --------------------------------------------------------------
  221. # ui_lv2-qt5
  222. OBJS_UI_LV2_QT5 = CarlaBridgeUI-LV2__lv2-qt5.o \
  223. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  224. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt5.o
  225. carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt5.a
  226. $(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@
  227. %__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt5.moc resources.qt5.cpp
  228. $(CXX) $< $(BUILD_UI_LV2_QT5_FLAGS) -I../modules/theme -c -o $@
  229. # --------------------------------------------------------------
  230. # ui_lv2-cocoa
  231. # OBJS_UI_LV2_COCOA = CarlaBridgeUI-LV2__lv2-cocoa.o \
  232. # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  233. # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-cocoa.o
  234. #
  235. # carla-bridge-lv2-cocoa: $(OBJS_UI_LV2_COCOA) $(OBJS_UI_LV2_LIBS)
  236. # $(CXX) $^ $(LINK_UI_LV2_COCOA_FLAGS) -o $@
  237. #
  238. # %__lv2-cocoa.o: %.cpp
  239. # $(CXX) $< $(BUILD_UI_LV2_COCOA_FLAGS) -c -o $@
  240. # --------------------------------------------------------------
  241. # ui_lv2-windows
  242. # OBJS_UI_LV2_WIN32 = CarlaBridgeUI-LV2__lv2-windows.o \
  243. # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  244. # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-windows.o
  245. #
  246. # carla-bridge-lv2-windows.exe: $(OBJS_UI_LV2_WIN32) $(OBJS_UI_LV2_LIBS)
  247. # $(CXX) $^ $(LINK_UI_LV2_WIN32_FLAGS) -o $@
  248. #
  249. # %__lv2-windows.o: %.cpp
  250. # $(CXX) $< $(BUILD_UI_LV2_WIN32_FLAGS) -c -o $@
  251. # --------------------------------------------------------------
  252. # ui_lv2-x11
  253. # OBJS_UI_LV2_X11 = CarlaBridgeUI-LV2__lv2-x11.o \
  254. # CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  255. # CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-x11.o
  256. #
  257. # carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS)
  258. # $(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@
  259. #
  260. # %__lv2-x11.o: %.cpp
  261. # $(CXX) $< $(BUILD_UI_LV2_X11_FLAGS) -c -o $@
  262. # --------------------------------------------------------------
  263. # ui_vst-mac
  264. # OBJS_UI_VST_MAC = CarlaBridgeUI-VST__vst-mac.o \
  265. # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \
  266. # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-mac.o
  267. #
  268. # carla-bridge-vst-mac: $(OBJS_UI_VST_MAC) $(OBJS_UI_VST_LIBS) ../modules/theme.a
  269. # $(CXX) $^ $(LINK_UI_VST_MAC_FLAGS) -o $@
  270. #
  271. # %__vst-mac.o: %.cpp
  272. # $(CXX) $< $(BUILD_UI_VST_MAC_FLAGS) -c -o $@
  273. # --------------------------------------------------------------
  274. # ui_vst-hwnd
  275. # OBJS_UI_VST_HWND = CarlaBridgeUI-VST__vst-hwnd.o \
  276. # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \
  277. # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-hwnd.o
  278. #
  279. # carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) $(OBJS_UI_VST_LIBS) ../modules/theme.a
  280. # $(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@
  281. #
  282. # %__vst-hwnd.o: %.cpp
  283. # $(CXX) $< $(BUILD_UI_VST_HWND_FLAGS) -c -o $@
  284. # --------------------------------------------------------------
  285. # ui_vst-x11
  286. # OBJS_UI_VST_X11 = CarlaBridgeUI-VST__vst-x11.o \
  287. # CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \
  288. # CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-x11.o
  289. #
  290. # carla-bridge-vst-x11: $(OBJS_UI_VST_X11) $(OBJS_UI_VST_LIBS) ../modules/theme.a
  291. # $(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@
  292. #
  293. # %__vst-x11.o: %.cpp
  294. # $(CXX) $< $(BUILD_UI_VST_X11_FLAGS) -c -o $@
  295. # --------------------------------------------------------------
  296. # native
  297. OBJS_PLUGIN = \
  298. jackplugin/CarlaJackPlugin__plugin.o \
  299. CarlaBridgeClient__plugin.o \
  300. CarlaBridgeOsc__plugin.o \
  301. ../backend/engine/CarlaEngine__native.o \
  302. ../backend/engine/CarlaEngineInternal__native.o \
  303. ../backend/engine/CarlaEngineOsc__native.o \
  304. ../backend/engine/CarlaEngineThread__native.o \
  305. ../backend/engine/CarlaEngineJack__native.o \
  306. ../backend/engine/CarlaEngineBridge__native.o \
  307. ../backend/plugin/CarlaPlugin__native.o \
  308. ../backend/plugin/CarlaPluginInternal__native.o \
  309. ../backend/plugin/CarlaPluginThread__native.o \
  310. ../backend/plugin/CarlaPluginUi__native.o \
  311. ../backend/plugin/NativePlugin__native.o \
  312. ../backend/plugin/LadspaPlugin__native.o \
  313. ../backend/plugin/DssiPlugin__native.o \
  314. ../backend/plugin/Lv2Plugin__native.o \
  315. ../backend/plugin/VstPlugin__native.o \
  316. ../backend/plugin/Vst3Plugin__native.o \
  317. ../backend/plugin/AuPlugin__native.o \
  318. ../backend/plugin/ReWirePlugin__native.o \
  319. ../backend/plugin/CsoundPlugin__native.o \
  320. ../backend/plugin/JucePlugin__native.o \
  321. ../backend/plugin/FluidSynthPlugin__native.o \
  322. ../backend/plugin/LinuxSamplerPlugin__native.o \
  323. ../backend/standalone/CarlaStandalone__native.o
  324. LIBS_PLUGIN = \
  325. ../modules/jackbridge.a \
  326. ../modules/rtmempool.a
  327. ifeq ($(HAVE_JUCE),true)
  328. LIBS_PLUGIN += \
  329. ../modules/juce_audio_basics.a \
  330. ../modules/juce_audio_processors.a \
  331. ../modules/juce_core.a \
  332. ../modules/juce_data_structures.a \
  333. ../modules/juce_events.a \
  334. ../modules/juce_data_structures.a \
  335. ../modules/juce_graphics.a \
  336. ../modules/juce_gui_basics.a \
  337. ../modules/juce_gui_extra.a
  338. endif
  339. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  340. LIBS_PLUGIN += \
  341. ../modules/lilv.a
  342. endif
  343. jackplugin/libjack.so.0: $(OBJS_PLUGIN) $(LIBS_PLUGIN)
  344. $(CXX) $(OBJS_PLUGIN) -Wl,--start-group $(LIBS_PLUGIN) -Wl,--end-group $(NATIVE_LINK_FLAGS) -shared -o $@
  345. %__plugin.o: %.cpp
  346. $(CXX) $< $(NATIVE_BUILD_FLAGS) -DBRIDGE_JACK -DJACKBRIDGE_EXPORT -c -o $@
  347. # $(NATIVE_LINK_FLAGS)
  348. # --------------------------------------------------------------
  349. # native
  350. OBJS_NATIVE = CarlaBridgePlugin__native.o \
  351. CarlaBridgeClient__native.o CarlaBridgeOsc__native.o
  352. # carla-engine
  353. OBJS_NATIVE += \
  354. ../backend/engine/CarlaEngine__native.o \
  355. ../backend/engine/CarlaEngineInternal__native.o \
  356. ../backend/engine/CarlaEngineOsc__native.o \
  357. ../backend/engine/CarlaEngineThread__native.o \
  358. ../backend/engine/CarlaEngineJack__native.o \
  359. ../backend/engine/CarlaEngineBridge__native.o
  360. # carla-plugin
  361. OBJS_NATIVE += \
  362. ../backend/plugin/CarlaPlugin__native.o \
  363. ../backend/plugin/CarlaPluginInternal__native.o \
  364. ../backend/plugin/CarlaPluginThread__native.o \
  365. ../backend/plugin/CarlaPluginUi__native.o \
  366. ../backend/plugin/NativePlugin__native.o \
  367. ../backend/plugin/LadspaPlugin__native.o \
  368. ../backend/plugin/DssiPlugin__native.o \
  369. ../backend/plugin/Lv2Plugin__native.o \
  370. ../backend/plugin/VstPlugin__native.o \
  371. ../backend/plugin/Vst3Plugin__native.o \
  372. ../backend/plugin/AuPlugin__native.o \
  373. ../backend/plugin/ReWirePlugin__native.o \
  374. ../backend/plugin/CsoundPlugin__native.o \
  375. ../backend/plugin/JucePlugin__native.o \
  376. ../backend/plugin/FluidSynthPlugin__native.o \
  377. ../backend/plugin/LinuxSamplerPlugin__native.o
  378. # carla-standalone
  379. OBJS_NATIVE += \
  380. ../backend/standalone/CarlaStandalone__native.o
  381. # libs
  382. LIBS_NATIVE = \
  383. ../modules/native-plugins.a \
  384. ../modules/jackbridge.a \
  385. ../modules/rtmempool.a
  386. ifeq ($(HAVE_DGL),true)
  387. LIBS_NATIVE += \
  388. ../modules/dgl.a
  389. endif
  390. ifeq ($(HAVE_JUCE),true)
  391. LIBS_NATIVE += \
  392. ../modules/juce_audio_basics.a \
  393. ../modules/juce_audio_processors.a \
  394. ../modules/juce_core.a \
  395. ../modules/juce_data_structures.a \
  396. ../modules/juce_events.a \
  397. ../modules/juce_data_structures.a \
  398. ../modules/juce_graphics.a \
  399. ../modules/juce_gui_basics.a \
  400. ../modules/juce_gui_extra.a
  401. endif
  402. ifeq ($(HAVE_AF_DEPS),true)
  403. LIBS_NATIVE += \
  404. ../modules/audio_decoder.a
  405. endif
  406. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  407. LIBS_NATIVE += \
  408. ../modules/lilv.a
  409. endif
  410. carla-bridge-native: $(OBJS_NATIVE) $(LIBS_NATIVE)
  411. ifeq ($(MACOS),true)
  412. $(CXX) $(OBJS_NATIVE) $(LIBS_NATIVE) $(NATIVE_LINK_FLAGS) -o $@
  413. else
  414. $(CXX) $(OBJS_NATIVE) -Wl,--start-group $(LIBS_NATIVE) -Wl,--end-group $(NATIVE_LINK_FLAGS) -o $@
  415. endif
  416. %__native.o: %.cpp
  417. $(CXX) $< $(NATIVE_BUILD_FLAGS) -c -o $@
  418. # --------------------------------------------------------------
  419. # posix32
  420. OBJS_POSIX32 = CarlaBridgePlugin__posix32.o \
  421. CarlaBridgeClient__posix32.o CarlaBridgeOsc__posix32.o
  422. # carla-engine
  423. OBJS_POSIX32 += \
  424. ../backend/engine/CarlaEngine__posix32.o \
  425. ../backend/engine/CarlaEngineInternal__posix32.o \
  426. ../backend/engine/CarlaEngineOsc__posix32.o \
  427. ../backend/engine/CarlaEngineThread__posix32.o \
  428. ../backend/engine/CarlaEngineJack__posix32.o \
  429. ../backend/engine/CarlaEngineBridge__posix32.o
  430. # carla-plugin
  431. OBJS_POSIX32 += \
  432. ../backend/plugin/CarlaPlugin__posix32.o \
  433. ../backend/plugin/CarlaPluginInternal__posix32.o \
  434. ../backend/plugin/CarlaPluginThread__posix32.o \
  435. ../backend/plugin/CarlaPluginUi__posix32.o \
  436. ../backend/plugin/NativePlugin__posix32.o \
  437. ../backend/plugin/LadspaPlugin__posix32.o \
  438. ../backend/plugin/DssiPlugin__posix32.o \
  439. ../backend/plugin/Lv2Plugin__posix32.o \
  440. ../backend/plugin/VstPlugin__posix32.o \
  441. ../backend/plugin/Vst3Plugin__posix32.o \
  442. ../backend/plugin/AuPlugin__posix32.o \
  443. ../backend/plugin/ReWirePlugin__posix32.o \
  444. ../backend/plugin/CsoundPlugin__posix32.o \
  445. ../backend/plugin/JucePlugin__posix32.o \
  446. ../backend/plugin/FluidSynthPlugin__posix32.o \
  447. ../backend/plugin/LinuxSamplerPlugin__posix32.o
  448. # carla-standalone
  449. OBJS_POSIX32 += \
  450. ../backend/standalone/CarlaStandalone__posix32.o
  451. # libs
  452. LIBS_POSIX32 = \
  453. ../modules/lilv.posix32.a \
  454. ../modules/rtmempool.posix32.a
  455. ifeq ($(HAVE_JUCE),true)
  456. LIBS_POSIX32 += \
  457. ../modules/juce_audio_basics.posix32.a \
  458. ../modules/juce_audio_processors.posix32.a \
  459. ../modules/juce_core.posix32.a \
  460. ../modules/juce_data_structures.posix32.a \
  461. ../modules/juce_events.posix32.a \
  462. ../modules/juce_graphics.posix32.a \
  463. ../modules/juce_gui_basics.posix32.a
  464. endif
  465. carla-bridge-posix32: $(OBJS_POSIX32) $(LIBS_POSIX32)
  466. $(CXX) $(OBJS_POSIX32) -Wl,--start-group $(LIBS_POSIX32) -Wl,--end-group $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@
  467. %__posix32.o: %.cpp
  468. $(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) -c -o $@
  469. # --------------------------------------------------------------
  470. # posix64
  471. OBJS_POSIX64 = CarlaBridgePlugin__posix64.o \
  472. CarlaBridgeClient__posix64.o CarlaBridgeOsc__posix64.o
  473. # carla-engine
  474. OBJS_POSIX64 += \
  475. ../backend/engine/CarlaEngine__posix64.o \
  476. ../backend/engine/CarlaEngineInternal__posix64.o \
  477. ../backend/engine/CarlaEngineOsc__posix64.o \
  478. ../backend/engine/CarlaEngineThread__posix64.o \
  479. ../backend/engine/CarlaEngineJack__posix64.o \
  480. ../backend/engine/CarlaEngineBridge__posix64.o
  481. # carla-plugin
  482. OBJS_POSIX64 += \
  483. ../backend/plugin/CarlaPlugin__posix64.o \
  484. ../backend/plugin/CarlaPluginInternal__posix64.o \
  485. ../backend/plugin/CarlaPluginThread__posix64.o \
  486. ../backend/plugin/CarlaPluginUi__posix64.o \
  487. ../backend/plugin/NativePlugin__posix64.o \
  488. ../backend/plugin/LadspaPlugin__posix64.o \
  489. ../backend/plugin/DssiPlugin__posix64.o \
  490. ../backend/plugin/Lv2Plugin__posix64.o \
  491. ../backend/plugin/VstPlugin__posix64.o \
  492. ../backend/plugin/Vst3Plugin__posix64.o \
  493. ../backend/plugin/AuPlugin__posix32.o \
  494. ../backend/plugin/ReWirePlugin__posix64.o \
  495. ../backend/plugin/CsoundPlugin__posix64.o \
  496. ../backend/plugin/JucePlugin__posix64.o \
  497. ../backend/plugin/FluidSynthPlugin__posix64.o \
  498. ../backend/plugin/LinuxSamplerPlugin__posix64.o
  499. # carla-standalone
  500. OBJS_POSIX64 += \
  501. ../backend/standalone/CarlaStandalone__posix64.o
  502. # libs
  503. LIBS_POSIX64 = \
  504. ../modules/lilv.posix64.a \
  505. ../modules/rtmempool.posix64.a
  506. ifeq ($(HAVE_JUCE),true)
  507. LIBS_POSIX64 += \
  508. ../modules/juce_audio_basics.posix64.a \
  509. ../modules/juce_audio_processors.posix64.a \
  510. ../modules/juce_core.posix64.a \
  511. ../modules/juce_data_structures.posix64.a \
  512. ../modules/juce_events.posix64.a \
  513. ../modules/juce_graphics.posix64.a \
  514. ../modules/juce_gui_basics.posix64.a
  515. endif
  516. carla-bridge-posix64: $(OBJS_POSIX64) $(LIBS_POSIX64)
  517. $(CXX) $(OBJS_POSIX64) -Wl,--start-group $(LIBS_POSIX64) -Wl,--end-group $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@
  518. %__posix64.o: %.cpp
  519. $(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) -c -o $@
  520. # --------------------------------------------------------------
  521. # win32
  522. OBJS_WIN32 = CarlaBridgePlugin__win32.o \
  523. CarlaBridgeClient__win32.o CarlaBridgeOsc__win32.o
  524. # carla-engine
  525. OBJS_WIN32 += \
  526. ../backend/engine/CarlaEngine__win32.o \
  527. ../backend/engine/CarlaEngineInternal__win32.o \
  528. ../backend/engine/CarlaEngineOsc__win32.o \
  529. ../backend/engine/CarlaEngineThread__win32.o \
  530. ../backend/engine/CarlaEngineBridge__win32.o \
  531. ../backend/engine/CarlaEngineJack__win32.o
  532. # carla-plugin
  533. OBJS_WIN32 += \
  534. ../backend/plugin/CarlaPlugin__win32.o \
  535. ../backend/plugin/CarlaPluginInternal__win32.o \
  536. ../backend/plugin/CarlaPluginThread__win32.o \
  537. ../backend/plugin/CarlaPluginUi__win32.o \
  538. ../backend/plugin/NativePlugin__win32.o \
  539. ../backend/plugin/LadspaPlugin__win32.o \
  540. ../backend/plugin/DssiPlugin__win32.o \
  541. ../backend/plugin/Lv2Plugin__win32.o \
  542. ../backend/plugin/VstPlugin__win32.o \
  543. ../backend/plugin/Vst3Plugin__win32.o \
  544. ../backend/plugin/AuPlugin__win32.o \
  545. ../backend/plugin/ReWirePlugin__win32.o \
  546. ../backend/plugin/CsoundPlugin__win32.o \
  547. ../backend/plugin/JucePlugin__win32.o \
  548. ../backend/plugin/FluidSynthPlugin__win32.o \
  549. ../backend/plugin/LinuxSamplerPlugin__win32.o
  550. # carla-standalone
  551. OBJS_WIN32 += \
  552. ../backend/standalone/CarlaStandalone__win32.o
  553. # libs
  554. LIBS_WIN32 = \
  555. ../modules/lilv.win32.a \
  556. ../modules/rtmempool.win32.a
  557. ifeq ($(HAVE_JUCE),true)
  558. LIBS_WIN32 += \
  559. ../modules/juce_audio_basics.win32.a \
  560. ../modules/juce_audio_processors.win32.a \
  561. ../modules/juce_core.win32.a \
  562. ../modules/juce_data_structures.win32.a \
  563. ../modules/juce_events.win32.a \
  564. ../modules/juce_graphics.win32.a \
  565. ../modules/juce_gui_basics.win32.a
  566. endif
  567. carla-bridge-win32.exe: $(OBJS_WIN32) $(LIBS_WIN32) ../modules/jackbridge-win32.dll
  568. $(CXX) $(OBJS_WIN32) -Wl,--start-group $(LIBS_WIN32) -Wl,--end-group $(WIN_LINK_FLAGS) $(WIN_32BIT_FLAGS) -ljackbridge-win32 -o $@
  569. %__win32.o: %.cpp
  570. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -c -o $@
  571. # --------------------------------------------------------------
  572. # win64
  573. OBJS_WIN64 = CarlaBridgePlugin__win64.o \
  574. CarlaBridgeClient__win64.o CarlaBridgeOsc__win64.o
  575. # carla-engine
  576. OBJS_WIN64 += \
  577. ../backend/engine/CarlaEngine__win64.o \
  578. ../backend/engine/CarlaEngineInternal__win64.o \
  579. ../backend/engine/CarlaEngineOsc__win64.o \
  580. ../backend/engine/CarlaEngineThread__win64.o \
  581. ../backend/engine/CarlaEngineBridge__win64.o \
  582. ../backend/engine/CarlaEngineJack__win64.o
  583. # carla-plugin
  584. OBJS_WIN64 += \
  585. ../backend/plugin/CarlaPlugin__win64.o \
  586. ../backend/plugin/CarlaPluginInternal__win64.o \
  587. ../backend/plugin/CarlaPluginThread__win64.o \
  588. ../backend/plugin/CarlaPluginUi__win64.o \
  589. ../backend/plugin/NativePlugin__win64.o \
  590. ../backend/plugin/LadspaPlugin__win64.o \
  591. ../backend/plugin/DssiPlugin__win64.o \
  592. ../backend/plugin/Lv2Plugin__win64.o \
  593. ../backend/plugin/VstPlugin__win64.o \
  594. ../backend/plugin/Vst3Plugin__win64.o \
  595. ../backend/plugin/AuPlugin__win64.o \
  596. ../backend/plugin/ReWirePlugin__win64.o \
  597. ../backend/plugin/CsoundPlugin__win64.o \
  598. ../backend/plugin/JucePlugin__win64.o \
  599. ../backend/plugin/FluidSynthPlugin__win64.o \
  600. ../backend/plugin/LinuxSamplerPlugin__win64.o
  601. # carla-standalone
  602. OBJS_WIN64 += \
  603. ../backend/standalone/CarlaStandalone__win64.o
  604. # libs
  605. LIBS_WIN64 = \
  606. ../modules/lilv.win64.a \
  607. ../modules/rtmempool.win64.a
  608. ifeq ($(HAVE_JUCE),true)
  609. LIBS_WIN64 += \
  610. ../modules/juce_audio_basics.win64.a \
  611. ../modules/juce_audio_processors.win64.a \
  612. ../modules/juce_core.win64.a \
  613. ../modules/juce_data_structures.win64.a \
  614. ../modules/juce_events.win64.a \
  615. ../modules/juce_graphics.win64.a \
  616. ../modules/juce_gui_basics.win64.a
  617. endif
  618. carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64) ../modules/jackbridge-win64.dll
  619. $(CXX) $(OBJS_WIN64) -Wl,--start-group $(LIBS_WIN64) -Wl,--end-group $(WIN_LINK_FLAGS) $(WIN_64BIT_FLAGS) -ljackbridge-win64 -o $@
  620. %__win64.o: %.cpp
  621. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -c -o $@
  622. # --------------------------------------------------------------
  623. clean:
  624. rm -f *.moc *.o *.dll *.dylib *.so *.exe
  625. rm -f resources.*.cpp
  626. rm -f carla-bridge-lv2-gtk2 carla-bridge-lv2-gtk3 carla-bridge-lv2-qt4 carla-bridge-lv2-qt5 carla-bridge-lv2-cocoa carla-bridge-lv2-x11
  627. rm -f carla-bridge-vst-carbon carla-bridge-vst-cocoa carla-bridge-vst-x11
  628. rm -f carla-bridge-native carla-bridge-posix32 carla-bridge-posix64
  629. rm -f $(OBJS_NATIVE)
  630. rm -f $(OBJS_POSIX32)
  631. rm -f $(OBJS_POSIX64)
  632. rm -f $(OBJS_WIN32)
  633. rm -f $(OBJS_WIN64)
  634. debug:
  635. $(MAKE) DEBUG=true
  636. doxygen: carla_bridge.doxygen
  637. doxygen $<
  638. # --------------------------------------------------------------
  639. .FORCE:
  640. .PHONY: .FORCE
  641. ../modules/jackbridge-%.dll: .FORCE
  642. $(MAKE) -C ../modules jackbridge-$*e
  643. ../modules/juce_audio_basics.%.a: .FORCE
  644. $(MAKE) -C ../modules juce_audio_basics_$*
  645. ../modules/juce_audio_processors.%.a: .FORCE
  646. $(MAKE) -C ../modules juce_audio_processors_$*
  647. ../modules/juce_core.%.a: .FORCE
  648. $(MAKE) -C ../modules juce_core_$*
  649. ../modules/juce_data_structures.%.a: .FORCE
  650. $(MAKE) -C ../modules juce_data_structures_$*
  651. ../modules/juce_events.%.a: .FORCE
  652. $(MAKE) -C ../modules juce_events_$*
  653. ../modules/juce_graphics.%.a: .FORCE
  654. $(MAKE) -C ../modules juce_graphics_$*
  655. ../modules/juce_gui_basics.%.a: .FORCE
  656. $(MAKE) -C ../modules juce_gui_basics_$*
  657. ../modules/lilv.%.a: .FORCE
  658. $(MAKE) -C ../modules lilv_$*
  659. ../modules/rtmempool.%.a: .FORCE
  660. $(MAKE) -C ../modules rtmempool_$*
  661. ../modules/%.a: .FORCE
  662. $(MAKE) -C ../modules $*
  663. ../modules/%.dll:
  664. $(MAKE) -C ../modules $*
  665. # --------------------------------------------------------------