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.

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