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.

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