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.

Makefile 13KB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418
  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) -DJACKBRIDGE_EXPORT
  52. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  53. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  54. WIN_LINK_FLAGS = $(LINK_PLUGIN_FLAGS) -L../modules
  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/lilv.win32.a \
  273. ../modules/rtmempool.win32.a
  274. LIBS_WIN32 += \
  275. ../modules/juce_audio_basics.win32.a \
  276. ../modules/juce_audio_processors.win32.a \
  277. ../modules/juce_core.win32.a \
  278. ../modules/juce_data_structures.win32.a \
  279. ../modules/juce_events.win32.a \
  280. ../modules/juce_graphics.win32.a \
  281. ../modules/juce_gui_basics.win32.a
  282. ../../bin/carla-bridge-win32.exe: $(OBJS_WIN32) $(LIBS_WIN32) ../modules/jackbridge-win32.dll
  283. $(CXX) $(OBJS_WIN32) $(LIBS_START) $(LIBS_WIN32) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_32BIT_FLAGS) -ljackbridge-win32 -o $@
  284. %__win32.o: %.cpp
  285. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@
  286. # --------------------------------------------------------------
  287. # win64
  288. OBJS_WIN64 = CarlaBridgePlugin__win64.o
  289. # carla-engine
  290. OBJS_WIN64 += \
  291. ../backend/engine/CarlaEngine__win64.o \
  292. ../backend/engine/CarlaEngineClient__win64.o \
  293. ../backend/engine/CarlaEngineData__win64.o \
  294. ../backend/engine/CarlaEngineInternal__win64.o \
  295. ../backend/engine/CarlaEngineOsc__win64.o \
  296. ../backend/engine/CarlaEngineOscSend__win64.o \
  297. ../backend/engine/CarlaEnginePorts__win64.o \
  298. ../backend/engine/CarlaEngineThread__win64.o \
  299. ../backend/engine/CarlaEngineBridge__win64.o \
  300. ../backend/engine/CarlaEngineJack__win64.o
  301. # carla-plugin
  302. OBJS_WIN64 += \
  303. ../backend/plugin/CarlaPlugin__win64.o \
  304. ../backend/plugin/CarlaPluginInternal__win64.o \
  305. ../backend/plugin/CarlaPluginThread__win64.o \
  306. ../backend/plugin/LadspaPlugin__win64.o \
  307. ../backend/plugin/DssiPlugin__win64.o \
  308. ../backend/plugin/Lv2Plugin__win64.o \
  309. ../backend/plugin/VstPlugin__win64.o \
  310. ../backend/plugin/Vst3Plugin__win64.o \
  311. ../backend/plugin/AuPlugin__win64.o \
  312. ../backend/plugin/JucePlugin__win64.o
  313. # carla-standalone
  314. OBJS_WIN64 += \
  315. ../backend/CarlaStandalone__win64.o
  316. # libs
  317. LIBS_WIN64 = \
  318. ../modules/lilv.win64.a \
  319. ../modules/rtmempool.win64.a
  320. LIBS_WIN64 += \
  321. ../modules/juce_audio_basics.win64.a \
  322. ../modules/juce_audio_processors.win64.a \
  323. ../modules/juce_core.win64.a \
  324. ../modules/juce_data_structures.win64.a \
  325. ../modules/juce_events.win64.a \
  326. ../modules/juce_graphics.win64.a \
  327. ../modules/juce_gui_basics.win64.a
  328. ../../bin/carla-bridge-win64.exe: $(OBJS_WIN64) $(LIBS_WIN64) ../modules/jackbridge-win64.dll
  329. $(CXX) $(OBJS_WIN64) $(LIBS_START) $(LIBS_WIN64) $(LIBS_END) $(WIN_LINK_FLAGS) $(WIN_64BIT_FLAGS) -ljackbridge-win64 -o $@
  330. %__win64.o: %.cpp
  331. $(CXX) $< $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) -DBRIDGE_PLUGIN -c -o $@
  332. # --------------------------------------------------------------
  333. clean:
  334. $(RM) *.o
  335. $(RM) ../../bin/carla-bridge-*
  336. $(RM) $(OBJS_NATIVE)
  337. $(RM) $(OBJS_POSIX32)
  338. $(RM) $(OBJS_POSIX64)
  339. $(RM) $(OBJS_WIN32)
  340. $(RM) $(OBJS_WIN64)
  341. debug:
  342. $(MAKE) DEBUG=true
  343. # --------------------------------------------------------------