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 12KB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 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
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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334
  1. #!/usr/bin/make -f
  2. # Makefile for carla-bridges-plugin #
  3. # --------------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. MODULENAME=carla-bridge
  8. include $(CWD)/Makefile.mk
  9. # ----------------------------------------------------------------------------------------------------------------------
  10. BINDIR := $(CWD)/../bin
  11. ifeq ($(DEBUG),true)
  12. OBJDIR := $(CWD)/../build/bridges-plugin/Debug
  13. MODULEDIR := $(CWD)/../build/modules/Debug
  14. else
  15. OBJDIR := $(CWD)/../build/bridges-plugin/Release
  16. MODULEDIR := $(CWD)/../build/modules/Release
  17. endif
  18. # ----------------------------------------------------------------------------------------------------------------------
  19. BUILD_CXX_FLAGS += -DBUILD_BRIDGE -I. -I$(CWD) -I$(CWD)/backend -I$(CWD)/includes -I$(CWD)/utils -isystem $(CWD)/modules
  20. BUILD_CXX_FLAGS += -I$(CWD)/backend/engine -I$(CWD)/backend/plugin
  21. BUILD_CXX_FLAGS += $(LIBLO_FLAGS)
  22. 32BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
  23. 64BIT_FLAGS += -DBUILD_BRIDGE_ALTERNATIVE_ARCH
  24. # ----------------------------------------------------------------------------------------------------------------------
  25. LIBS_native = $(MODULEDIR)/jackbridge.a
  26. LIBS_posix32 = $(MODULEDIR)/jackbridge.posix32.a
  27. LIBS_posix64 = $(MODULEDIR)/jackbridge.posix64.a
  28. ifeq ($(BUILDING_FOR_WINDOWS),true)
  29. LIBS_win32 = $(MODULEDIR)/jackbridge.win32.a
  30. LIBS_win64 = $(MODULEDIR)/jackbridge.win64.a
  31. else
  32. LIBS_win32 = $(MODULEDIR)/jackbridge.win32e.a
  33. LIBS_win64 = $(MODULEDIR)/jackbridge.win64e.a
  34. endif
  35. LINK_FLAGS += $(JACKBRIDGE_LIBS)
  36. LIBS_native += $(MODULEDIR)/lilv.a
  37. LIBS_posix32 += $(MODULEDIR)/lilv.posix32.a
  38. LIBS_posix64 += $(MODULEDIR)/lilv.posix64.a
  39. LIBS_win32 += $(MODULEDIR)/lilv.win32.a
  40. LIBS_win64 += $(MODULEDIR)/lilv.win64.a
  41. LINK_FLAGS += $(LILV_LIBS)
  42. LIBS_native += $(MODULEDIR)/rtmempool.a
  43. LIBS_posix32 += $(MODULEDIR)/rtmempool.posix32.a
  44. LIBS_posix64 += $(MODULEDIR)/rtmempool.posix64.a
  45. LIBS_win32 += $(MODULEDIR)/rtmempool.win32.a
  46. LIBS_win64 += $(MODULEDIR)/rtmempool.win64.a
  47. LINK_FLAGS += $(RTMEMPOOL_LIBS)
  48. LIBS_native += $(MODULEDIR)/water.a
  49. LIBS_posix32 += $(MODULEDIR)/water.posix32.a
  50. LIBS_posix64 += $(MODULEDIR)/water.posix64.a
  51. LIBS_win32 += $(MODULEDIR)/water.win32.a
  52. LIBS_win64 += $(MODULEDIR)/water.win64.a
  53. LINK_FLAGS += $(WATER_LIBS)
  54. LINK_FLAGS += $(LIBLO_LIBS)
  55. LINK_FLAGS += $(MAGIC_LIBS)
  56. LINK_FLAGS += $(X11_LIBS)
  57. # ----------------------------------------------------------------------------------------------------------------------
  58. NATIVE_BUILD_FLAGS = $(NATIVE_PLUGINS_FLAGS)
  59. NATIVE_LINK_FLAGS =
  60. NATIVE_BUILD_FLAGS += $(FLUIDSYNTH_FLAGS)
  61. NATIVE_LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  62. NATIVE_BUILD_FLAGS += $(LINUXSAMPLER_FLAGS)
  63. NATIVE_LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  64. NATIVE_LINK_FLAGS += $(FFMPEG_LIBS)
  65. NATIVE_LINK_FLAGS += $(SNDFILE_LIBS)
  66. LIBS_native += $(MODULEDIR)/audio_decoder.a
  67. LIBS_native += $(MODULEDIR)/native-plugins.base.a
  68. ifeq ($(HAVE_DGL),true)
  69. LIBS_native += $(MODULEDIR)/dgl.a
  70. endif
  71. # ----------------------------------------------------------------------------------------------------------------------
  72. OBJS_native = \
  73. $(OBJDIR)/CarlaBridgePlugin.cpp.o \
  74. $(OBJDIR)/CarlaEngine.cpp.o \
  75. $(OBJDIR)/CarlaEngineClient.cpp.o \
  76. $(OBJDIR)/CarlaEngineData.cpp.o \
  77. $(OBJDIR)/CarlaEngineInternal.cpp.o \
  78. $(OBJDIR)/CarlaEngineOsc.cpp.o \
  79. $(OBJDIR)/CarlaEngineOscSend.cpp.o \
  80. $(OBJDIR)/CarlaEnginePorts.cpp.o \
  81. $(OBJDIR)/CarlaEngineThread.cpp.o \
  82. $(OBJDIR)/CarlaEngineJack.cpp.o \
  83. $(OBJDIR)/CarlaEngineBridge.cpp.o \
  84. $(OBJDIR)/CarlaPlugin.cpp.o \
  85. $(OBJDIR)/CarlaPluginBridge.cpp.o \
  86. $(OBJDIR)/CarlaPluginInternal.cpp.o \
  87. $(OBJDIR)/CarlaPluginJack.cpp.o \
  88. $(OBJDIR)/CarlaPluginNative.cpp.o \
  89. $(OBJDIR)/CarlaPluginLADSPA.cpp.o \
  90. $(OBJDIR)/CarlaPluginDSSI.cpp.o \
  91. $(OBJDIR)/CarlaPluginLV2.cpp.o \
  92. $(OBJDIR)/CarlaPluginVST2.cpp.o \
  93. $(OBJDIR)/CarlaPluginFluidSynth.cpp.o \
  94. $(OBJDIR)/CarlaPluginLinuxSampler.cpp.o \
  95. $(OBJDIR)/CarlaStandalone.cpp.o
  96. OBJS_lv2 = $(OBJS_native) \
  97. $(OBJDIR)/CarlaBridgeLV2.cpp.o
  98. OBJS_arch = \
  99. $(OBJDIR)/CarlaBridgePlugin.cpp.arch.o \
  100. $(OBJDIR)/CarlaEngine.cpp.arch.o \
  101. $(OBJDIR)/CarlaEngineClient.cpp.arch.o \
  102. $(OBJDIR)/CarlaEngineData.cpp.arch.o \
  103. $(OBJDIR)/CarlaEngineInternal.cpp.arch.o \
  104. $(OBJDIR)/CarlaEngineOsc.cpp.arch.o \
  105. $(OBJDIR)/CarlaEngineOscSend.cpp.arch.o \
  106. $(OBJDIR)/CarlaEnginePorts.cpp.arch.o \
  107. $(OBJDIR)/CarlaEngineThread.cpp.arch.o \
  108. $(OBJDIR)/CarlaEngineJack.cpp.arch.o \
  109. $(OBJDIR)/CarlaEngineBridge.cpp.arch.o \
  110. $(OBJDIR)/CarlaPlugin.cpp.arch.o \
  111. $(OBJDIR)/CarlaPluginBridge.cpp.arch.o \
  112. $(OBJDIR)/CarlaPluginInternal.cpp.arch.o \
  113. $(OBJDIR)/CarlaPluginJack.cpp.arch.o \
  114. $(OBJDIR)/CarlaPluginLADSPA.cpp.arch.o \
  115. $(OBJDIR)/CarlaPluginDSSI.cpp.arch.o \
  116. $(OBJDIR)/CarlaPluginLV2.cpp.arch.o \
  117. $(OBJDIR)/CarlaPluginVST2.cpp.arch.o \
  118. $(OBJDIR)/CarlaStandalone.cpp.arch.o
  119. OBJS_posix32 = $(OBJS_arch:%.arch.o=%.posix32.o)
  120. OBJS_posix64 = $(OBJS_arch:%.arch.o=%.posix64.o)
  121. OBJS_win32 = $(OBJS_arch:%.arch.o=%.win32.o)
  122. OBJS_win64 = $(OBJS_arch:%.arch.o=%.win64.o)
  123. # ----------------------------------------------------------------------------------------------------------------------
  124. all: native
  125. # ----------------------------------------------------------------------------------------------------------------------
  126. clean:
  127. rm -f $(OBJDIR)/*.o
  128. rm -f $(BINDIR)/$(MODULENAME)-native
  129. rm -f $(BINDIR)/$(MODULENAME)-posix32
  130. rm -f $(BINDIR)/$(MODULENAME)-posix64
  131. rm -f $(BINDIR)/$(MODULENAME)-win*.exe
  132. debug:
  133. $(MAKE) DEBUG=true
  134. # ----------------------------------------------------------------------------------------------------------------------
  135. native: $(BINDIR)/$(MODULENAME)-native$(APP_EXT) $(BINDIR)/$(MODULENAME)-lv2$(LIB_EXT)
  136. posix32: $(BINDIR)/$(MODULENAME)-posix32
  137. posix64: $(BINDIR)/$(MODULENAME)-posix64
  138. win32: $(BINDIR)/$(MODULENAME)-win32.exe
  139. win64: $(BINDIR)/$(MODULENAME)-win64.exe
  140. # ----------------------------------------------------------------------------------------------------------------------
  141. # linking
  142. $(BINDIR)/$(MODULENAME)-native$(APP_EXT): $(OBJS_native) $(LIBS_native)
  143. -@mkdir -p $(BINDIR)
  144. @echo "Linking $(MODULENAME)-native$(APP_EXT)"
  145. @$(CXX) $(OBJS_native) $(LIBS_START) $(LIBS_native) $(LIBS_END) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
  146. $(BINDIR)/$(MODULENAME)-lv2$(LIB_EXT): $(OBJS_lv2) $(LIBS_native)
  147. -@mkdir -p $(BINDIR)
  148. @echo "Linking $(MODULENAME)-lv2$(LIB_EXT)"
  149. @$(CXX) $(OBJS_lv2) $(LIBS_START) $(LIBS_native) $(LIBS_END) $(SHARED) $(LINK_FLAGS) $(NATIVE_LINK_FLAGS) -o $@
  150. $(BINDIR)/$(MODULENAME)-posix32: $(OBJS_posix32) $(LIBS_posix32)
  151. -@mkdir -p $(BINDIR)
  152. @echo "Linking $(MODULENAME)-posix32"
  153. @$(CXX) $(OBJS_posix32) $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
  154. $(BINDIR)/$(MODULENAME)-posix64: $(OBJS_posix64) $(LIBS_posix64)
  155. -@mkdir -p $(BINDIR)
  156. @echo "Linking $(MODULENAME)-posix64"
  157. @$(CXX) $(OBJS_posix64) $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
  158. $(BINDIR)/$(MODULENAME)-win32.exe: $(OBJS_win32) $(LIBS_win32)
  159. -@mkdir -p $(BINDIR)
  160. @echo "Linking $(MODULENAME)-win32.exe"
  161. @$(CXX) $(OBJS_win32) $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(LINK_FLAGS) $(32BIT_FLAGS) -o $@
  162. $(BINDIR)/$(MODULENAME)-win64.exe: $(OBJS_win64) $(LIBS_win64)
  163. -@mkdir -p $(BINDIR)
  164. @echo "Linking $(MODULENAME)-win64.exe"
  165. @$(CXX) $(OBJS_win64) $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(LINK_FLAGS) $(64BIT_FLAGS) -o $@
  166. # ----------------------------------------------------------------------------------------------------------------------
  167. # native
  168. $(OBJDIR)/CarlaBridgeLV2.cpp.o: CarlaBridgeLV2.cpp
  169. -@mkdir -p $(OBJDIR)
  170. @echo "Compiling $<"
  171. @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  172. $(OBJDIR)/CarlaBridgePlugin.cpp.o: CarlaBridgePlugin.cpp
  173. -@mkdir -p $(OBJDIR)
  174. @echo "Compiling $<"
  175. @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  176. $(OBJDIR)/CarlaEng%.cpp.o: $(CWD)/backend/engine/CarlaEng%.cpp
  177. -@mkdir -p $(OBJDIR)
  178. @echo "Compiling CarlaEng$*.cpp (bridge)"
  179. @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  180. $(OBJDIR)/CarlaPlug%.cpp.o: $(CWD)/backend/plugin/CarlaPlug%.cpp
  181. -@mkdir -p $(OBJDIR)
  182. @echo "Compiling CarlaPlug$*.cpp (bridge)"
  183. @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  184. $(OBJDIR)/CarlaStandalone.cpp.o: $(CWD)/backend/CarlaStandalone.cpp
  185. -@mkdir -p $(OBJDIR)
  186. @echo "Compiling CarlaStandalone.cpp (bridge)"
  187. @$(CXX) $< $(BUILD_CXX_FLAGS) $(NATIVE_BUILD_FLAGS) -c -o $@
  188. # ----------------------------------------------------------------------------------------------------------------------
  189. # posix32
  190. $(OBJDIR)/CarlaBridgePlugin.cpp.posix32.o: CarlaBridgePlugin.cpp
  191. -@mkdir -p $(OBJDIR)
  192. @echo "Compiling $< (posix32 bridge)"
  193. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  194. $(OBJDIR)/CarlaEng%.cpp.posix32.o: $(CWD)/backend/engine/CarlaEng%.cpp
  195. -@mkdir -p $(OBJDIR)
  196. @echo "Compiling CarlaEng$*.cpp (posix32 bridge)"
  197. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  198. $(OBJDIR)/CarlaPlug%.cpp.posix32.o: $(CWD)/backend/plugin/CarlaPlug%.cpp
  199. -@mkdir -p $(OBJDIR)
  200. @echo "Compiling CarlaPlug$*.cpp (posix32 bridge)"
  201. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  202. $(OBJDIR)/CarlaStandalone.cpp.posix32.o: $(CWD)/backend/CarlaStandalone.cpp
  203. -@mkdir -p $(OBJDIR)
  204. @echo "Compiling CarlaStandalone.cpp (posix32 bridge)"
  205. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  206. # ----------------------------------------------------------------------------------------------------------------------
  207. # posix64
  208. $(OBJDIR)/CarlaBridgePlugin.cpp.posix64.o: CarlaBridgePlugin.cpp
  209. -@mkdir -p $(OBJDIR)
  210. @echo "Compiling $< (posix64 bridge)"
  211. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  212. $(OBJDIR)/CarlaEng%.cpp.posix64.o: $(CWD)/backend/engine/CarlaEng%.cpp
  213. -@mkdir -p $(OBJDIR)
  214. @echo "Compiling CarlaEng$*.cpp (posix64 bridge)"
  215. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  216. $(OBJDIR)/CarlaPlug%.cpp.posix64.o: $(CWD)/backend/plugin/CarlaPlug%.cpp
  217. -@mkdir -p $(OBJDIR)
  218. @echo "Compiling CarlaPlug$*.cpp (posix64 bridge)"
  219. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  220. $(OBJDIR)/CarlaStandalone.cpp.posix64.o: $(CWD)/backend/CarlaStandalone.cpp
  221. -@mkdir -p $(OBJDIR)
  222. @echo "Compiling CarlaStandalone.cpp (posix64 bridge)"
  223. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  224. # ----------------------------------------------------------------------------------------------------------------------
  225. # win32
  226. $(OBJDIR)/CarlaBridgePlugin.cpp.win32.o: CarlaBridgePlugin.cpp
  227. -@mkdir -p $(OBJDIR)
  228. @echo "Compiling $< (win32 bridge)"
  229. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  230. $(OBJDIR)/CarlaEng%.cpp.win32.o: $(CWD)/backend/engine/CarlaEng%.cpp
  231. -@mkdir -p $(OBJDIR)
  232. @echo "Compiling CarlaEng$*.cpp (win32 bridge)"
  233. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  234. $(OBJDIR)/CarlaPlug%.cpp.win32.o: $(CWD)/backend/plugin/CarlaPlug%.cpp
  235. -@mkdir -p $(OBJDIR)
  236. @echo "Compiling CarlaPlug$*.cpp (win32 bridge)"
  237. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  238. $(OBJDIR)/CarlaStandalone.cpp.win32.o: $(CWD)/backend/CarlaStandalone.cpp
  239. -@mkdir -p $(OBJDIR)
  240. @echo "Compiling CarlaStandalone.cpp (win32 bridge)"
  241. @$(CXX) $< $(BUILD_CXX_FLAGS) $(32BIT_FLAGS) -c -o $@
  242. # ----------------------------------------------------------------------------------------------------------------------
  243. # win64
  244. $(OBJDIR)/CarlaBridgePlugin.cpp.win64.o: CarlaBridgePlugin.cpp
  245. -@mkdir -p $(OBJDIR)
  246. @echo "Compiling $< (win64 bridge)"
  247. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  248. $(OBJDIR)/CarlaEng%.cpp.win64.o: $(CWD)/backend/engine/CarlaEng%.cpp
  249. -@mkdir -p $(OBJDIR)
  250. @echo "Compiling CarlaEng$*.cpp (win64 bridge)"
  251. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  252. $(OBJDIR)/CarlaPlug%.cpp.win64.o: $(CWD)/backend/plugin/CarlaPlug%.cpp
  253. -@mkdir -p $(OBJDIR)
  254. @echo "Compiling CarlaPlug$*.cpp (win64 bridge)"
  255. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  256. $(OBJDIR)/CarlaStandalone.cpp.win64.o: $(CWD)/backend/CarlaStandalone.cpp
  257. -@mkdir -p $(OBJDIR)
  258. @echo "Compiling CarlaStandalone.cpp (win64 bridge)"
  259. @$(CXX) $< $(BUILD_CXX_FLAGS) $(64BIT_FLAGS) -c -o $@
  260. # ----------------------------------------------------------------------------------------------------------------------
  261. -include $(OBJS_lv2:%.o=%.d)
  262. -include $(OBJS_posix32:%.o=%.d)
  263. -include $(OBJS_posix64:%.o=%.d)
  264. -include $(OBJS_win32:%.o=%.d)
  265. -include $(OBJS_win64:%.o=%.d)
  266. # ----------------------------------------------------------------------------------------------------------------------