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.

421 lines
12KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-bridges #
  3. # -------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_CXX_FLAGS += -DBUILD_BRIDGE
  9. BUILD_CXX_FLAGS += -I. -I../backend -I../includes -I../utils -isystem ../modules
  10. BUILD_CXX_FLAGS += $(LIBLO_FLAGS)
  11. LINK_FLAGS += $(LIBLO_LIBS)
  12. # --------------------------------------------------------------
  13. # Plugin bridges
  14. BUILD_PLUGIN_FLAGS = $(BUILD_CXX_FLAGS)
  15. BUILD_PLUGIN_FLAGS += -I../backend/engine -I../backend/plugin
  16. LINK_PLUGIN_FLAGS = $(LINK_FLAGS)
  17. LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  18. LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_FORMATS_LIBS)
  19. LINK_PLUGIN_FLAGS += $(JUCE_CORE_LIBS)
  20. ifeq ($(CARLA_VESTIGE_HEADER),true)
  21. BUILD_PLUGIN_FLAGS += -DVESTIGE_HEADER
  22. endif
  23. ifeq ($(MACOS_OR_WIN32),true)
  24. LINK_PLUGIN_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  25. LINK_PLUGIN_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  26. LINK_PLUGIN_FLAGS += $(JUCE_EVENTS_LIBS)
  27. LINK_PLUGIN_FLAGS += $(JUCE_GRAPHICS_LIBS)
  28. LINK_PLUGIN_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  29. ifeq ($(MACOS),true)
  30. LINK_PLUGIN_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  31. endif
  32. endif
  33. ifeq ($(HAVE_X11),true)
  34. LINK_PLUGIN_FLAGS += $(X11_LIBS)
  35. endif
  36. # --------------------------------------------------------------
  37. # Plugin bridges (POSIX)
  38. POSIX_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS)
  39. POSIX_32BIT_FLAGS = $(32BIT_FLAGS)
  40. POSIX_64BIT_FLAGS = $(64BIT_FLAGS)
  41. POSIX_LINK_FLAGS = $(LINK_PLUGIN_FLAGS)
  42. ifneq ($(HAIKU),true)
  43. POSIX_LINK_FLAGS += -ldl -lpthread
  44. endif
  45. ifeq ($(LINUX),true)
  46. POSIX_32BIT_FLAGS += -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  47. POSIX_64BIT_FLAGS += -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  48. endif
  49. # --------------------------------------------------------------
  50. # Plugin bridges (Windows)
  51. WIN_BUILD_FLAGS = $(BUILD_PLUGIN_FLAGS)
  52. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  53. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  54. WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS)
  55. # --------------------------------------------------------------
  56. # Plugin bridges (Native)
  57. NATIVE_BUILD_FLAGS = $(POSIX_BUILD_FLAGS)
  58. NATIVE_LINK_FLAGS = $(POSIX_LINK_FLAGS)
  59. ifeq ($(HAVE_FLUIDSYNTH),true)
  60. NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
  61. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  62. endif
  63. ifeq ($(HAVE_LINUXSAMPLER),true)
  64. NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS)
  65. NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  66. endif
  67. ifeq ($(HAVE_ZYN_DEPS),true)
  68. NATIVE_BUILD_FLAGS += -DWANT_ZYNADDSUBFX
  69. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  70. NATIVE_LINK_FLAGS += -DWANT_ZYNADDSUBFX_UI
  71. endif
  72. endif
  73. NATIVE_LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  74. # --------------------------------------------------------------
  75. all: native
  76. # --------------------------------------------------------------
  77. native: ../../bin/carla-bridge-native$(APP_EXT)
  78. posix32: ../../bin/carla-bridge-posix32
  79. posix64: ../../bin/carla-bridge-posix64
  80. win32: ../../bin/carla-bridge-win32.exe
  81. win64: ../../bin/carla-bridge-win64.exe
  82. # --------------------------------------------------------------
  83. # native
  84. OBJS_NATIVE = CarlaBridgePlugin__native.o
  85. # carla-engine
  86. OBJS_NATIVE += \
  87. ../backend/engine/CarlaEngine__native.o \
  88. ../backend/engine/CarlaEngineClient__native.o \
  89. ../backend/engine/CarlaEngineData__native.o \
  90. ../backend/engine/CarlaEngineInternal__native.o \
  91. ../backend/engine/CarlaEngineOsc__native.o \
  92. ../backend/engine/CarlaEngineOscSend__native.o \
  93. ../backend/engine/CarlaEnginePorts__native.o \
  94. ../backend/engine/CarlaEngineThread__native.o \
  95. ../backend/engine/CarlaEngineJack__native.o \
  96. ../backend/engine/CarlaEngineBridge__native.o
  97. # carla-plugin
  98. OBJS_NATIVE += \
  99. ../backend/plugin/CarlaPlugin__native.o \
  100. ../backend/plugin/CarlaPluginInternal__native.o \
  101. ../backend/plugin/CarlaPluginThread__native.o \
  102. ../backend/plugin/NativePlugin__native.o \
  103. ../backend/plugin/LadspaPlugin__native.o \
  104. ../backend/plugin/DssiPlugin__native.o \
  105. ../backend/plugin/Lv2Plugin__native.o \
  106. ../backend/plugin/VstPlugin__native.o \
  107. ../backend/plugin/Vst3Plugin__native.o \
  108. ../backend/plugin/AuPlugin__native.o \
  109. ../backend/plugin/JucePlugin__native.o \
  110. ../backend/plugin/FluidSynthPlugin__native.o \
  111. ../backend/plugin/LinuxSamplerPlugin__native.o
  112. # carla-standalone
  113. OBJS_NATIVE += \
  114. ../backend/CarlaStandalone__native.o
  115. # libs
  116. LIBS_NATIVE = \
  117. ../modules/native-plugins.a \
  118. ../modules/jackbridge.a \
  119. ../modules/juce_audio_basics.a \
  120. ../modules/juce_audio_formats.a \
  121. ../modules/juce_core.a \
  122. ../modules/lilv.a \
  123. ../modules/rtmempool.a
  124. ifeq ($(MACOS_OR_WIN32),true)
  125. LIBS_NATIVE += \
  126. ../modules/juce_audio_processors.a \
  127. ../modules/juce_data_structures.a \
  128. ../modules/juce_events.a \
  129. ../modules/juce_graphics.a \
  130. ../modules/juce_gui_basics.a
  131. ifeq ($(MACOS),true)
  132. LIBS_NATIVE += \
  133. ../modules/juce_gui_extra.a
  134. endif
  135. endif
  136. ../../bin/carla-bridge-native: $(OBJS_NATIVE) $(LIBS_NATIVE)
  137. $(CXX) $(OBJS_NATIVE) $(LIBS_START) $(LIBS_NATIVE) $(LIBS_END) $(NATIVE_LINK_FLAGS) -o $@
  138. %__native.o: %.cpp
  139. $(CXX) $< $(NATIVE_BUILD_FLAGS) -c -o $@
  140. # --------------------------------------------------------------
  141. # posix32
  142. OBJS_POSIX32 = CarlaBridgePlugin__posix32.o
  143. # carla-engine
  144. OBJS_POSIX32 += \
  145. ../backend/engine/CarlaEngine__posix32.o \
  146. ../backend/engine/CarlaEngineClient__posix32.o \
  147. ../backend/engine/CarlaEngineData__posix32.o \
  148. ../backend/engine/CarlaEngineInternal__posix32.o \
  149. ../backend/engine/CarlaEngineOsc__posix32.o \
  150. ../backend/engine/CarlaEngineOscSend__posix32.o \
  151. ../backend/engine/CarlaEnginePorts__posix32.o \
  152. ../backend/engine/CarlaEngineThread__posix32.o \
  153. ../backend/engine/CarlaEngineJack__posix32.o \
  154. ../backend/engine/CarlaEngineBridge__posix32.o
  155. # carla-plugin
  156. OBJS_POSIX32 += \
  157. ../backend/plugin/CarlaPlugin__posix32.o \
  158. ../backend/plugin/CarlaPluginInternal__posix32.o \
  159. ../backend/plugin/CarlaPluginThread__posix32.o \
  160. ../backend/plugin/LadspaPlugin__posix32.o \
  161. ../backend/plugin/DssiPlugin__posix32.o \
  162. ../backend/plugin/Lv2Plugin__posix32.o \
  163. ../backend/plugin/VstPlugin__posix32.o \
  164. ../backend/plugin/Vst3Plugin__posix32.o \
  165. ../backend/plugin/AuPlugin__posix32.o \
  166. ../backend/plugin/JucePlugin__posix32.o
  167. # carla-standalone
  168. OBJS_POSIX32 += \
  169. ../backend/CarlaStandalone__posix32.o
  170. # libs
  171. LIBS_POSIX32 = \
  172. ../modules/jackbridge.posix32.a \
  173. ../modules/juce_audio_basics.posix32.a \
  174. ../modules/juce_core.posix32.a \
  175. ../modules/lilv.posix32.a \
  176. ../modules/rtmempool.posix32.a
  177. ifeq ($(MACOS),true)
  178. LIBS_POSIX32 += \
  179. ../modules/juce_audio_processors.posix32.a \
  180. ../modules/juce_data_structures.posix32.a \
  181. ../modules/juce_events.posix32.a \
  182. ../modules/juce_graphics.posix32.a \
  183. ../modules/juce_gui_basics.posix32.a \
  184. ../modules/juce_gui_extra.posix32.a
  185. endif
  186. ../../bin/carla-bridge-posix32: $(OBJS_POSIX32) $(LIBS_POSIX32)
  187. $(CXX) $(OBJS_POSIX32) $(LIBS_START) $(LIBS_POSIX32) $(LIBS_END) $(POSIX_LINK_FLAGS) $(POSIX_32BIT_FLAGS) -o $@
  188. %__posix32.o: %.cpp
  189. $(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@
  190. # --------------------------------------------------------------
  191. # posix64
  192. OBJS_POSIX64 = CarlaBridgePlugin__posix64.o
  193. # carla-engine
  194. OBJS_POSIX64 += \
  195. ../backend/engine/CarlaEngine__posix64.o \
  196. ../backend/engine/CarlaEngineClient__posix64.o \
  197. ../backend/engine/CarlaEngineData__posix64.o \
  198. ../backend/engine/CarlaEngineInternal__posix64.o \
  199. ../backend/engine/CarlaEngineOsc__posix64.o \
  200. ../backend/engine/CarlaEngineOscSend__posix64.o \
  201. ../backend/engine/CarlaEnginePorts__posix64.o \
  202. ../backend/engine/CarlaEngineThread__posix64.o \
  203. ../backend/engine/CarlaEngineJack__posix64.o \
  204. ../backend/engine/CarlaEngineBridge__posix64.o
  205. # carla-plugin
  206. OBJS_POSIX64 += \
  207. ../backend/plugin/CarlaPlugin__posix64.o \
  208. ../backend/plugin/CarlaPluginInternal__posix64.o \
  209. ../backend/plugin/CarlaPluginThread__posix64.o \
  210. ../backend/plugin/LadspaPlugin__posix64.o \
  211. ../backend/plugin/DssiPlugin__posix64.o \
  212. ../backend/plugin/Lv2Plugin__posix64.o \
  213. ../backend/plugin/VstPlugin__posix64.o \
  214. ../backend/plugin/Vst3Plugin__posix64.o \
  215. ../backend/plugin/AuPlugin__posix64.o \
  216. ../backend/plugin/JucePlugin__posix64.o
  217. # carla-standalone
  218. OBJS_POSIX64 += \
  219. ../backend/CarlaStandalone__posix64.o
  220. # libs
  221. LIBS_POSIX64 = \
  222. ../modules/jackbridge.posix64.a \
  223. ../modules/juce_audio_basics.posix64.a \
  224. ../modules/juce_core.posix64.a \
  225. ../modules/lilv.posix64.a \
  226. ../modules/rtmempool.posix64.a
  227. ifeq ($(MACOS),true)
  228. LIBS_POSIX64 += \
  229. ../modules/juce_audio_processors.posix64.a \
  230. ../modules/juce_data_structures.posix64.a \
  231. ../modules/juce_events.posix64.a \
  232. ../modules/juce_graphics.posix64.a \
  233. ../modules/juce_gui_basics.posix64.a \
  234. ../modules/juce_gui_extra.posix64.a
  235. endif
  236. ../../bin/carla-bridge-posix64: $(OBJS_POSIX64) $(LIBS_POSIX64)
  237. $(CXX) $(OBJS_POSIX64) $(LIBS_START) $(LIBS_POSIX64) $(LIBS_END) $(POSIX_LINK_FLAGS) $(POSIX_64BIT_FLAGS) -o $@
  238. %__posix64.o: %.cpp
  239. $(CXX) $< $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@
  240. # --------------------------------------------------------------
  241. # win32
  242. OBJS_WIN32 = CarlaBridgePlugin__win32.o
  243. # carla-engine
  244. OBJS_WIN32 += \
  245. ../backend/engine/CarlaEngine__win32.o \
  246. ../backend/engine/CarlaEngineClient__win32.o \
  247. ../backend/engine/CarlaEngineData__win32.o \
  248. ../backend/engine/CarlaEngineInternal__win32.o \
  249. ../backend/engine/CarlaEngineOsc__win32.o \
  250. ../backend/engine/CarlaEngineOscSend__win32.o \
  251. ../backend/engine/CarlaEnginePorts__win32.o \
  252. ../backend/engine/CarlaEngineThread__win32.o \
  253. ../backend/engine/CarlaEngineBridge__win32.o \
  254. ../backend/engine/CarlaEngineJack__win32.o
  255. # carla-plugin
  256. OBJS_WIN32 += \
  257. ../backend/plugin/CarlaPlugin__win32.o \
  258. ../backend/plugin/CarlaPluginInternal__win32.o \
  259. ../backend/plugin/CarlaPluginThread__win32.o \
  260. ../backend/plugin/LadspaPlugin__win32.o \
  261. ../backend/plugin/DssiPlugin__win32.o \
  262. ../backend/plugin/Lv2Plugin__win32.o \
  263. ../backend/plugin/VstPlugin__win32.o \
  264. ../backend/plugin/Vst3Plugin__win32.o \
  265. ../backend/plugin/AuPlugin__win32.o \
  266. ../backend/plugin/JucePlugin__win32.o
  267. # carla-standalone
  268. OBJS_WIN32 += \
  269. ../backend/CarlaStandalone__win32.o
  270. # libs
  271. LIBS_WIN32 = \
  272. ../modules/jackbridge.win32e.a \
  273. ../modules/lilv.win32.a \
  274. ../modules/rtmempool.win32.a
  275. LIBS_WIN32 += \
  276. ../modules/juce_audio_basics.win32.a \
  277. ../modules/juce_audio_processors.win32.a \
  278. ../modules/juce_core.win32.a \
  279. ../modules/juce_data_structures.win32.a \
  280. ../modules/juce_events.win32.a \
  281. ../modules/juce_graphics.win32.a \
  282. ../modules/juce_gui_basics.win32.a
  283. ../../bin/carla-bridge-win32.exe: $(OBJS_WIN32) $(LIBS_WIN32)
  284. $(CXX) $(OBJS_WIN32) $(LIBS_START) $(LIBS_WIN32) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_32BIT_FLAGS) -o $@
  285. %__win32.o: %.cpp
  286. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@
  287. # --------------------------------------------------------------
  288. # win64
  289. OBJS_WIN64 = CarlaBridgePlugin__win64.o
  290. # carla-engine
  291. OBJS_WIN64 += \
  292. ../backend/engine/CarlaEngine__win64.o \
  293. ../backend/engine/CarlaEngineClient__win64.o \
  294. ../backend/engine/CarlaEngineData__win64.o \
  295. ../backend/engine/CarlaEngineInternal__win64.o \
  296. ../backend/engine/CarlaEngineOsc__win64.o \
  297. ../backend/engine/CarlaEngineOscSend__win64.o \
  298. ../backend/engine/CarlaEnginePorts__win64.o \
  299. ../backend/engine/CarlaEngineThread__win64.o \
  300. ../backend/engine/CarlaEngineBridge__win64.o \
  301. ../backend/engine/CarlaEngineJack__win64.o
  302. # carla-plugin
  303. OBJS_WIN64 += \
  304. ../backend/plugin/CarlaPlugin__win64.o \
  305. ../backend/plugin/CarlaPluginInternal__win64.o \
  306. ../backend/plugin/CarlaPluginThread__win64.o \
  307. ../backend/plugin/LadspaPlugin__win64.o \
  308. ../backend/plugin/DssiPlugin__win64.o \
  309. ../backend/plugin/Lv2Plugin__win64.o \
  310. ../backend/plugin/VstPlugin__win64.o \
  311. ../backend/plugin/Vst3Plugin__win64.o \
  312. ../backend/plugin/AuPlugin__win64.o \
  313. ../backend/plugin/JucePlugin__win64.o
  314. # carla-standalone
  315. OBJS_WIN64 += \
  316. ../backend/CarlaStandalone__win64.o
  317. # libs
  318. LIBS_WIN64 = \
  319. ../modules/jackbridge.win64e.a \
  320. ../modules/lilv.win64.a \
  321. ../modules/rtmempool.win64.a
  322. LIBS_WIN64 += \
  323. ../modules/juce_audio_basics.win64.a \
  324. ../modules/juce_audio_processors.win64.a \
  325. ../modules/juce_core.win64.a \
  326. ../modules/juce_data_structures.win64.a \
  327. ../modules/juce_events.win64.a \
  328. ../modules/juce_graphics.win64.a \
  329. ../modules/juce_gui_basics.win64.a
  330. ../../bin/carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64)
  331. $(CXX) $(OBJS_WIN64) $(LIBS_START) $(LIBS_WIN64) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_64BIT_FLAGS) -o $@
  332. %__win64.o: %.cpp
  333. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@
  334. # --------------------------------------------------------------
  335. clean:
  336. $(RM) *.o
  337. $(RM) ../../bin/carla-bridge-*
  338. $(RM) $(OBJS_NATIVE)
  339. $(RM) $(OBJS_POSIX32)
  340. $(RM) $(OBJS_POSIX64)
  341. $(RM) $(OBJS_WIN32)
  342. $(RM) $(OBJS_WIN64)
  343. debug:
  344. $(MAKE) DEBUG=true
  345. # --------------------------------------------------------------