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.

634 lines
20KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-bridges #
  3. # -------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # --------------------------------------------------------------
  8. # TODO: remove in favour of juce gui stuff
  9. # QT5_UI_FLAGS = $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  10. # QT5_UI_LIBS = $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
  11. # --------------------------------------------------------------
  12. BUILD_CXX_FLAGS += -DBUILD_BRIDGE
  13. BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules -isystem ../modules/theme
  14. BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo) $(QTCORE_FLAGS)
  15. LINK_FLAGS += $(shell pkg-config --libs liblo) $(QTCORE_LIBS)
  16. # --------------------------------------------------------------
  17. # Plugin bridges
  18. BUILD_PLUGIN_FLAGS = $(BUILD_CXX_FLAGS) $(QTXML_FLAGS) -DBUILD_BRIDGE_PLUGIN
  19. BUILD_PLUGIN_FLAGS += -I../backend/engine -I../backend/plugin
  20. LINK_PLUGIN_FLAGS = $(LINK_FLAGS) $(QTXML_LIBS) -lpthread
  21. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  22. BUILD_PLUGIN_FLAGS += -DWANT_LADSPA
  23. # -DWANT_DSSI -DWANT_LV2 -DWANT_VST
  24. # ifeq ($(CARLA_VESTIGE_HEADER),true)
  25. # BUILD_PLUGIN_FLAGS += -DVESTIGE_HEADER
  26. # endif
  27. endif
  28. LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  29. LINK_PLUGIN_FLAGS += $(JUCE_CORE_LIBS)
  30. LINK_PLUGIN_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  31. LINK_PLUGIN_FLAGS += $(JUCE_EVENTS_LIBS)
  32. LINK_PLUGIN_FLAGS += $(JUCE_GRAPHICS_LIBS)
  33. LINK_PLUGIN_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  34. # --------------------------------------------------------------
  35. # Plugin bridges (POSIX)
  36. POSIX_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS)
  37. POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  38. POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  39. POSIX_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -ldl
  40. # --------------------------------------------------------------
  41. # Plugin bridges (Windows)
  42. WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS) -DJACKBRIDGE_EXPORT
  43. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  44. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  45. WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -L../modules
  46. # --------------------------------------------------------------
  47. # Plugin bridges (Native)
  48. NATIVE_BUILD_FLAGS = $(POSIX_BUILD_FLAGS)
  49. # -DWANT_NATIVE
  50. NATIVE_LINK_FLAGS = $(POSIX_LINK_FLAGS)
  51. # ifeq ($(HAVE_FLUIDSYNTH),true)
  52. # NATIVE_BUILD_FLAGS += -DWANT_FLUIDSYNTH
  53. # NATIVE_BUILD_FLAGS += $(shell pkg-config --cflags fluidsynth)
  54. # NATIVE_LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
  55. # endif
  56. #
  57. # ifeq ($(HAVE_LINUXSAMPLER),true)
  58. # NATIVE_BUILD_FLAGS += -DWANT_LINUXSAMPLER
  59. # NATIVE_BUILD_FLAGS += $(shell pkg-config --cflags linuxsampler)
  60. # NATIVE_LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
  61. # endif
  62. # ifeq ($(HAVE_AF_DEPS),true)
  63. # NATIVE_BUILD_FLAGS += -DWANT_AUDIOFILE
  64. # NATIVE_LINK_FLAGS += $(shell pkg-config --libs sndfile)
  65. # ifeq ($(HAVE_FFMPEG),true)
  66. # NATIVE_BUILD_FLAGS += -DHAVE_FFMPEG
  67. # NATIVE_LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  68. # endif
  69. # endif
  70. #
  71. # ifeq ($(HAVE_MF_DEPS),true)
  72. # NATIVE_BUILD_FLAGS += -DWANT_MIDIFILE
  73. # NATIVE_LINK_FLAGS += $(shell pkg-config --libs smf)
  74. # endif
  75. #
  76. # ifeq ($(HAVE_OPENGL),true)
  77. # NATIVE_BUILD_FLAGS += -DWANT_OPENGL
  78. # NATIVE_LINK_FLAGS += $(DGL_LIBS)
  79. # endif
  80. # ifeq ($(HAVE_ZYN_DEPS),true)
  81. # NATIVE_BUILD_FLAGS += -DWANT_ZYNADDSUBFX
  82. # NATIVE_LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  83. # ifeq ($(HAVE_ZYN_UI_DEPS),true)
  84. # NATIVE_LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  85. # endif
  86. # endif
  87. # --------------------------------------------------------------
  88. # UI bridges
  89. BUILD_UI_FLAGS = $(BUILD_CXX_FLAGS) -DBUILD_BRIDGE_UI
  90. LINK_UI_FLAGS = $(LINK_FLAGS) -ldl
  91. LINK_UI_FLAGS += $(JUCE_CORE_LIBS)
  92. BUILD_UI_LV2_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_LV2
  93. BUILD_UI_VST_FLAGS = $(BUILD_UI_FLAGS) -DBRIDGE_VST
  94. ifeq ($(CARLA_VESTIGE_HEADER),true)
  95. BUILD_UI_VST_FLAGS += -DVESTIGE_HEADER
  96. endif
  97. BUILD_UI_LV2_GTK2_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0 Qt5Core)
  98. LINK_UI_LV2_GTK2_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-2.0 Qt5Core)
  99. BUILD_UI_LV2_GTK3_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0 Qt5Core)
  100. LINK_UI_LV2_GTK3_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs gtk+-3.0 Qt5Core)
  101. BUILD_UI_LV2_QT4_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui)
  102. LINK_UI_LV2_QT4_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs QtCore QtGui)
  103. BUILD_UI_LV2_QT5_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  104. LINK_UI_LV2_QT5_FLAGS = $(LINK_UI_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets)
  105. BUILD_UI_LV2_COCOA_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA $(QT5_UI_FLAGS)
  106. LINK_UI_LV2_COCOA_FLAGS = $(LINK_UI_FLAGS) $(QT5_UI_LIBS)
  107. BUILD_UI_LV2_WIN32_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_WIN32 $(QT5_UI_FLAGS)
  108. LINK_UI_LV2_WIN32_FLAGS = $(LINK_FLAGS) $(QT5_UI_LIBS) $(EXTRA_LIBS) -mwindows -lwinspool -lole32 -luuid -limm32 -lshell32 -lws2_32 -static
  109. BUILD_UI_LV2_X11_FLAGS = $(BUILD_UI_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11 $(QT5_UI_FLAGS)
  110. LINK_UI_LV2_X11_FLAGS = $(LINK_UI_FLAGS) $(QT5_UI_LIBS)
  111. BUILD_UI_VST_MAC_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_MAC -DBRIDGE_VST_MAC $(QT5_UI_FLAGS)
  112. LINK_UI_VST_MAC_FLAGS = $(LINK_UI_FLAGS) $(QT5_UI_LIBS)
  113. BUILD_UI_VST_HWND_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_HWND -DBRIDGE_VST_HWND $(QT5_UI_FLAGS)
  114. LINK_UI_VST_HWND_FLAGS = $(LINK_FLAGS) $(QT5_UI_LIBS) $(EXTRA_LIBS) -mwindows -lwinspool -lole32 -luuid -limm32 -lshell32 -lws2_32 -static
  115. BUILD_UI_VST_X11_FLAGS = $(BUILD_UI_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11 $(QT5_UI_FLAGS)
  116. LINK_UI_VST_X11_FLAGS = $(LINK_UI_FLAGS) $(QT5_UI_LIBS)
  117. # --------------------------------------------------------------
  118. TARGETS = native
  119. # ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  120. # ifeq ($(HAVE_GTK2),true)
  121. # TARGETS += ui_lv2-gtk2
  122. # endif
  123. # ifeq ($(HAVE_GTK3),true)
  124. # TARGETS += ui_lv2-gtk3
  125. # endif
  126. # ifeq ($(HAVE_QT4),true)
  127. # TARGETS += ui_lv2-qt4
  128. # else
  129. # ifeq ($(HAVE_QT5),true)
  130. # TARGETS += ui_lv2-qt5
  131. # endif
  132. # endif
  133. # TARGETS += ui_lv2-x11
  134. # TARGETS += ui_vst-x11
  135. # endif
  136. ifeq ($(WIN32),true)
  137. TARGETS = carla-bridge-win32.exe
  138. TARGETS += carla-bridge-win64.exe
  139. TARGETS += carla-bridge-lv2-windows.exe
  140. TARGETS += carla-bridge-vst-hwnd.exe
  141. endif
  142. # --------------------------------------------------------------
  143. all: $(TARGETS)
  144. ui_lv2-gtk2: carla-bridge-lv2-gtk2
  145. ui_lv2-gtk3: carla-bridge-lv2-gtk3
  146. ui_lv2-qt4: carla-bridge-lv2-qt4
  147. ui_lv2-qt5: carla-bridge-lv2-qt5
  148. ui_lv2-cocoa: carla-bridge-lv2-cocoa
  149. ui_lv2-win32: carla-bridge-lv2-windows.exe
  150. ui_lv2-x11: carla-bridge-lv2-x11
  151. ui_vst-mac: carla-bridge-vst-mac
  152. ui_vst-hwnd: carla-bridge-vst-hwnd.exe
  153. ui_vst-x11: carla-bridge-vst-x11
  154. # --------------------------------------------------------------
  155. native: carla-bridge-native
  156. posix32: carla-bridge-posix32
  157. posix64: carla-bridge-posix64
  158. win32: carla-bridge-win32.exe
  159. win64: carla-bridge-win64.exe
  160. # --------------------------------------------------------------
  161. # UI common
  162. OBJS_UI_LV2_LIBS = \
  163. ../modules/lilv.a \
  164. ../modules/juce_core.a
  165. OBJS_UI_VST_LIBS = \
  166. ../modules/juce_core.a
  167. %__lv2.o: %.cpp
  168. $(CXX) $< $(BUILD_UI_LV2_FLAGS) -c -o $@
  169. %__vst.o: %.cpp
  170. $(CXX) $< $(BUILD_UI_VST_FLAGS) -c -o $@
  171. resources.cpp: ../../resources/resources-theme.qrc
  172. $(RCC) $< -o $@
  173. resources.qt4.cpp: ../../resources/resources-theme.qrc
  174. $(RCC_QT4) $< -o $@
  175. CarlaBridgeToolkitQt.moc: CarlaBridgeToolkitQt.cpp
  176. $(MOC) $< -DMOC_PARSING -o $@
  177. CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp
  178. $(MOC_QT4) $< -DMOC_PARSING -o $@
  179. # --------------------------------------------------------------
  180. # ui_lv2-gtk2
  181. OBJS_UI_LV2_GTK2 = CarlaBridgeUI-LV2__lv2-gtk2.o \
  182. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  183. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk2.o
  184. carla-bridge-lv2-gtk2: $(OBJS_UI_LV2_GTK2) $(OBJS_UI_LV2_LIBS)
  185. $(CXX) $^ $(LINK_UI_LV2_GTK2_FLAGS) -o $@
  186. %__lv2-gtk2.o: %.cpp
  187. $(CXX) $< $(BUILD_UI_LV2_GTK2_FLAGS) -c -o $@
  188. # --------------------------------------------------------------
  189. # ui_lv2-gtk3
  190. OBJS_UI_LV2_GTK3 = CarlaBridgeUI-LV2__lv2-gtk3.o \
  191. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  192. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitGtk__lv2-gtk3.o
  193. carla-bridge-lv2-gtk3: $(OBJS_UI_LV2_GTK3) $(OBJS_UI_LV2_LIBS)
  194. $(CXX) $^ $(LINK_UI_LV2_GTK3_FLAGS) -o $@
  195. %__lv2-gtk3.o: %.cpp
  196. $(CXX) $< $(BUILD_UI_LV2_GTK3_FLAGS) -c -o $@
  197. # --------------------------------------------------------------
  198. # ui_lv2-qt4
  199. OBJS_UI_LV2_QT4 = CarlaBridgeUI-LV2__lv2-qt4.o \
  200. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  201. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt4.o
  202. carla-bridge-lv2-qt4: $(OBJS_UI_LV2_QT4) $(OBJS_UI_LV2_LIBS) ../modules/theme.qt4.a
  203. $(CXX) $^ $(LINK_UI_LV2_QT4_FLAGS) -o $@
  204. %__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt4.moc resources.qt4.cpp
  205. $(CXX) $< $(BUILD_UI_LV2_QT4_FLAGS) -c -o $@
  206. # --------------------------------------------------------------
  207. # ui_lv2-qt5
  208. OBJS_UI_LV2_QT5 = CarlaBridgeUI-LV2__lv2-qt5.o \
  209. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  210. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-qt5.o
  211. carla-bridge-lv2-qt5: $(OBJS_UI_LV2_QT5) $(OBJS_UI_LV2_LIBS) ../modules/theme.a
  212. $(CXX) $^ $(LINK_UI_LV2_QT5_FLAGS) -o $@
  213. %__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt.moc resources.cpp
  214. $(CXX) $< $(BUILD_UI_LV2_QT5_FLAGS) -c -o $@
  215. # --------------------------------------------------------------
  216. # ui_lv2-cocoa
  217. OBJS_UI_LV2_COCOA = CarlaBridgeUI-LV2__lv2-cocoa.o \
  218. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  219. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-cocoa.o
  220. carla-bridge-lv2-cocoa: $(OBJS_UI_LV2_COCOA) $(OBJS_UI_LV2_LIBS) ../modules/theme.a
  221. $(CXX) $^ $(LINK_UI_LV2_COCOA_FLAGS) -o $@
  222. %__lv2-cocoa.o: %.cpp CarlaBridgeToolkitQt.moc resources.cpp
  223. $(CXX) $< $(BUILD_UI_LV2_COCOA_FLAGS) -c -o $@
  224. # --------------------------------------------------------------
  225. # ui_lv2-windows
  226. OBJS_UI_LV2_WIN32 = CarlaBridgeUI-LV2__lv2-windows.o \
  227. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  228. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-windows.o
  229. carla-bridge-lv2-windows.exe: $(OBJS_UI_LV2_WIN32) $(OBJS_UI_LV2_LIBS) ../modules/theme.a
  230. $(CXX) $^ $(LINK_UI_LV2_WIN32_FLAGS) -o $@
  231. %__lv2-windows.o: %.cpp CarlaBridgeToolkitQt.moc resources.cpp
  232. $(CXX) $< $(BUILD_UI_LV2_WIN32_FLAGS) -c -o $@
  233. # --------------------------------------------------------------
  234. # ui_lv2-x11
  235. OBJS_UI_LV2_X11 = CarlaBridgeUI-LV2__lv2-x11.o \
  236. CarlaBridgeClient__lv2.o CarlaBridgeOsc__lv2.o \
  237. CarlaBridgeToolkit__lv2.o CarlaBridgeToolkitQt__lv2-x11.o
  238. carla-bridge-lv2-x11: $(OBJS_UI_LV2_X11) $(OBJS_UI_LV2_LIBS) ../modules/theme.a
  239. $(CXX) $^ $(LINK_UI_LV2_X11_FLAGS) -o $@
  240. %__lv2-x11.o: %.cpp CarlaBridgeToolkitQt.moc resources.cpp
  241. $(CXX) $< $(BUILD_UI_LV2_X11_FLAGS) -c -o $@
  242. # --------------------------------------------------------------
  243. # ui_vst-mac
  244. OBJS_UI_VST_MAC = CarlaBridgeUI-VST__vst-mac.o \
  245. CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \
  246. CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-mac.o
  247. carla-bridge-vst-mac: $(OBJS_UI_VST_MAC) $(OBJS_UI_VST_LIBS) ../modules/theme.a
  248. $(CXX) $^ $(LINK_UI_VST_MAC_FLAGS) -o $@
  249. %__vst-mac.o: %.cpp CarlaBridgeToolkitQt.moc resources.cpp
  250. $(CXX) $< $(BUILD_UI_VST_MAC_FLAGS) -c -o $@
  251. # --------------------------------------------------------------
  252. # ui_vst-hwnd
  253. OBJS_UI_VST_HWND = CarlaBridgeUI-VST__vst-hwnd.o \
  254. CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \
  255. CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-hwnd.o
  256. carla-bridge-vst-hwnd.exe: $(OBJS_UI_VST_HWND) $(OBJS_UI_VST_LIBS) ../modules/theme.a
  257. $(CXX) $^ $(LINK_UI_VST_HWND_FLAGS) -o $@
  258. %__vst-hwnd.o: %.cpp CarlaBridgeToolkitQt.moc resources.cpp
  259. $(CXX) $< $(BUILD_UI_VST_HWND_FLAGS) -c -o $@
  260. # --------------------------------------------------------------
  261. # ui_vst-x11
  262. OBJS_UI_VST_X11 = CarlaBridgeUI-VST__vst-x11.o \
  263. CarlaBridgeClient__vst.o CarlaBridgeOsc__vst.o \
  264. CarlaBridgeToolkit__vst.o CarlaBridgeToolkitQt__vst-x11.o
  265. carla-bridge-vst-x11: $(OBJS_UI_VST_X11) $(OBJS_UI_VST_LIBS) ../modules/theme.a
  266. $(CXX) $^ $(LINK_UI_VST_X11_FLAGS) -o $@
  267. %__vst-x11.o: %.cpp CarlaBridgeToolkitQt.moc resources.cpp
  268. $(CXX) $< $(BUILD_UI_VST_X11_FLAGS) -c -o $@
  269. # --------------------------------------------------------------
  270. # native
  271. OBJS_NATIVE = CarlaBridgePlugin__native.o \
  272. CarlaBridgeClient__native.o CarlaBridgeOsc__native.o
  273. # carla-engine
  274. OBJS_NATIVE += \
  275. ../backend/engine/CarlaEngine__native.o \
  276. ../backend/engine/CarlaEngineOsc__native.o \
  277. ../backend/engine/CarlaEngineThread__native.o \
  278. ../backend/engine/CarlaEngineJack__native.o \
  279. ../backend/engine/CarlaEngineBridge__native.o
  280. # carla-plugin
  281. OBJS_NATIVE += \
  282. ../backend/plugin/CarlaPlugin__native.o \
  283. ../backend/plugin/CarlaPluginThread__native.o \
  284. ../backend/plugin/NativePlugin__native.o \
  285. ../backend/plugin/LadspaPlugin__native.o \
  286. ../backend/plugin/DssiPlugin__native.o \
  287. ../backend/plugin/Lv2Plugin__native.o \
  288. ../backend/plugin/VstPlugin__native.o \
  289. ../backend/plugin/Vst3Plugin__native.o \
  290. ../backend/plugin/FluidSynthPlugin__native.o \
  291. ../backend/plugin/LinuxSamplerPlugin__native.o
  292. # carla-standalone
  293. OBJS_NATIVE += \
  294. ../backend/standalone/CarlaStandalone__native.o
  295. # libs
  296. OBJS_NATIVE += \
  297. ../modules/jackbridge.a \
  298. ../modules/juce_audio_basics.a \
  299. ../modules/juce_core.a \
  300. ../modules/juce_events.a \
  301. ../modules/rtmempool.a
  302. # ../modules/carla_native.a \
  303. # ../modules/juce_data_structures.a \
  304. # ../modules/juce_graphics.a \
  305. # ../modules/juce_gui_basics.a \
  306. # ifeq ($(HAVE_OPENGL),true)
  307. # OBJS_NATIVE += \
  308. # ../modules/dgl.a
  309. # endif
  310. # ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  311. # OBJS_NATIVE += \
  312. # ../modules/lilv.a
  313. # endif
  314. carla-bridge-native: $(FILES) $(OBJS_NATIVE)
  315. $(CXX) $(OBJS_NATIVE) $(NATIVE_LINK_FLAGS) -o $@
  316. %__native.o: %.cpp
  317. $(CXX) $< $(NATIVE_BUILD_FLAGS) -c -o $@
  318. # --------------------------------------------------------------
  319. # posix32
  320. OBJS_POSIX32 = CarlaBridgePlugin__posix32.o \
  321. CarlaBridgeClient__posix32.o CarlaBridgeOsc__posix32.o
  322. # carla-engine
  323. OBJS_POSIX32 += \
  324. ../backend/engine/CarlaEngine__posix32.o \
  325. ../backend/engine/CarlaEngineOsc__posix32.o \
  326. ../backend/engine/CarlaEngineThread__posix32.o \
  327. ../backend/engine/CarlaEngineJack__posix32.o \
  328. ../backend/engine/CarlaEngineBridge__posix32.o
  329. # carla-plugin
  330. OBJS_POSIX32 += \
  331. ../backend/plugin/CarlaPlugin__posix32.o \
  332. ../backend/plugin/CarlaPluginThread__posix32.o \
  333. ../backend/plugin/NativePlugin__posix32.o \
  334. ../backend/plugin/LadspaPlugin__posix32.o \
  335. ../backend/plugin/DssiPlugin__posix32.o \
  336. ../backend/plugin/Lv2Plugin__posix32.o \
  337. ../backend/plugin/VstPlugin__posix32.o \
  338. ../backend/plugin/Vst3Plugin__posix32.o \
  339. ../backend/plugin/FluidSynthPlugin__posix32.o \
  340. ../backend/plugin/LinuxSamplerPlugin__posix32.o
  341. # carla-standalone
  342. OBJS_POSIX32 += \
  343. ../backend/standalone/CarlaStandalone__posix32.o
  344. # libs
  345. OBJS_POSIX32 += \
  346. ../modules/lilv.posix32.a \
  347. ../modules/rtmempool.posix32.a
  348. carla-bridge-posix32: $(FILES) $(OBJS_POSIX32)
  349. $(CXX) $(OBJS_POSIX32) $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@
  350. %__posix32.o: %.cpp
  351. $(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) -c -o $@
  352. # --------------------------------------------------------------
  353. # posix64
  354. OBJS_POSIX64 = CarlaBridgePlugin__posix64.o \
  355. CarlaBridgeClient__posix64.o CarlaBridgeOsc__posix64.o
  356. # carla-engine
  357. OBJS_POSIX64 += \
  358. ../backend/engine/CarlaEngine__posix64.o \
  359. ../backend/engine/CarlaEngineOsc__posix64.o \
  360. ../backend/engine/CarlaEngineThread__posix64.o \
  361. ../backend/engine/CarlaEngineJack__posix64.o \
  362. ../backend/engine/CarlaEngineBridge__posix64.o
  363. # carla-plugin
  364. OBJS_POSIX64 += \
  365. ../backend/plugin/CarlaPlugin__posix64.o \
  366. ../backend/plugin/CarlaPluginThread__posix64.o \
  367. ../backend/plugin/NativePlugin__posix64.o \
  368. ../backend/plugin/LadspaPlugin__posix64.o \
  369. ../backend/plugin/DssiPlugin__posix64.o \
  370. ../backend/plugin/Lv2Plugin__posix64.o \
  371. ../backend/plugin/VstPlugin__posix64.o \
  372. ../backend/plugin/Vst3Plugin__posix64.o \
  373. ../backend/plugin/FluidSynthPlugin__posix64.o \
  374. ../backend/plugin/LinuxSamplerPlugin__posix64.o
  375. # carla-standalone
  376. OBJS_POSIX64 += \
  377. ../backend/standalone/CarlaStandalone__posix64.o
  378. # libs
  379. OBJS_POSIX64 += \
  380. ../modules/lilv.posix64.a \
  381. ../modules/rtmempool.posix64.a
  382. carla-bridge-posix64: $(FILES) $(OBJS_POSIX64)
  383. $(CXX) $(OBJS_POSIX64) $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@
  384. %__posix64.o: %.cpp
  385. $(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) -c -o $@
  386. # --------------------------------------------------------------
  387. # win32
  388. OBJS_WIN32 = CarlaBridgePlugin__win32.o \
  389. CarlaBridgeClient__win32.o CarlaBridgeOsc__win32.o
  390. # carla-engine
  391. OBJS_WIN32 += \
  392. ../backend/engine/CarlaEngine__win32.o \
  393. ../backend/engine/CarlaEngineOsc__win32.o \
  394. ../backend/engine/CarlaEngineThread__win32.o \
  395. ../backend/engine/CarlaEngineBridge__win32.o \
  396. ../backend/engine/CarlaEngineJack__win32.o
  397. # carla-plugin
  398. OBJS_WIN32 += \
  399. ../backend/plugin/CarlaPlugin__win32.o \
  400. ../backend/plugin/CarlaPluginThread__win32.o \
  401. ../backend/plugin/NativePlugin__win32.o \
  402. ../backend/plugin/LadspaPlugin__win32.o \
  403. ../backend/plugin/DssiPlugin__win32.o \
  404. ../backend/plugin/Lv2Plugin__win32.o \
  405. ../backend/plugin/VstPlugin__win32.o \
  406. ../backend/plugin/Vst3Plugin__win32.o \
  407. ../backend/plugin/FluidSynthPlugin__win32.o \
  408. ../backend/plugin/LinuxSamplerPlugin__win32.o
  409. # carla-standalone
  410. OBJS_WIN32 += \
  411. ../backend/standalone/CarlaStandalone__win32.o
  412. # libs
  413. OBJS_WIN32 += \
  414. ../modules/juce_core.win32.a \
  415. ../modules/lilv.win32.a \
  416. ../modules/rtmempool.win32.a
  417. carla-bridge-win32.exe: $(FILES) $(OBJS_WIN32) ../modules/jackbridge-win32.dll
  418. $(CXX) $(OBJS_WIN32) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win32 -o $@
  419. %__win32.o: %.cpp
  420. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -c -o $@
  421. # --------------------------------------------------------------
  422. # win64
  423. OBJS_WIN64 = CarlaBridgePlugin__win64.o \
  424. CarlaBridgeClient__win64.o CarlaBridgeOsc__win64.o
  425. # carla-engine
  426. OBJS_WIN64 += \
  427. ../backend/engine/CarlaEngine__win64.o \
  428. ../backend/engine/CarlaEngineOsc__win64.o \
  429. ../backend/engine/CarlaEngineThread__win64.o \
  430. ../backend/engine/CarlaEngineBridge__win64.o \
  431. ../backend/engine/CarlaEngineJack__win64.o
  432. # carla-plugin
  433. OBJS_WIN64 += \
  434. ../backend/plugin/CarlaPlugin__win64.o \
  435. ../backend/plugin/CarlaPluginThread__win64.o \
  436. ../backend/plugin/NativePlugin__win64.o \
  437. ../backend/plugin/LadspaPlugin__win64.o \
  438. ../backend/plugin/DssiPlugin__win64.o \
  439. ../backend/plugin/Lv2Plugin__win64.o \
  440. ../backend/plugin/VstPlugin__win64.o \
  441. ../backend/plugin/Vst3Plugin__win64.o \
  442. ../backend/plugin/FluidSynthPlugin__win64.o \
  443. ../backend/plugin/LinuxSamplerPlugin__win64.o
  444. # carla-standalone
  445. OBJS_WIN64 += \
  446. ../backend/standalone/CarlaStandalone__win64.o
  447. # libs
  448. OBJS_WIN64 += \
  449. ../modules/lilv.win64.a \
  450. ../modules/rtmempool.win64.a
  451. carla-bridge-win64.exe: $(FILES) $(OBJS_WIN64) ../modules/jackbridge-win64.dll
  452. $(CXX) $(OBJS_WIN64) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -ljackbridge-win64 -o $@
  453. %__win64.o: %.cpp
  454. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -c -o $@
  455. # --------------------------------------------------------------
  456. .FORCE:
  457. .PHONY: .FORCE
  458. ../modules/juce_core.%.a: .FORCE
  459. $(MAKE) -C ../modules juce_core_$*
  460. ../modules/lilv.%.a: .FORCE
  461. $(MAKE) -C ../modules lilv_$*
  462. ../modules/rtmempool.%.a: .FORCE
  463. $(MAKE) -C ../modules rtmempool_$*
  464. ../modules/%.a: .FORCE
  465. $(MAKE) -C ../modules $*
  466. ../modules/%.dll:
  467. $(MAKE) -C ../modules $*
  468. # --------------------------------------------------------------
  469. doxygen: carla_bridge.doxygen
  470. doxygen $<
  471. # --------------------------------------------------------------
  472. clean:
  473. rm -f *.moc *.o *.dll *.dylib *.so *.exe
  474. rm -f resources.cpp resources.qt4.cpp
  475. rm -f $(OBJS_NATIVE)
  476. rm -f $(OBJS_POSIX32)
  477. rm -f $(OBJS_POSIX64)
  478. rm -f $(OBJS_WIN32)
  479. rm -f $(OBJS_WIN64)
  480. 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
  481. rm -f carla-bridge-vst-mac carla-bridge-vst-x11
  482. rm -f carla-bridge-native carla-bridge-posix32 carla-bridge-posix64
  483. # --------------------------------------------------------------
  484. debug:
  485. $(MAKE) DEBUG=true