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.

838 lines
25KB

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