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