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.

262 lines
7.2KB

  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 -DBUILD_BRIDGE_UI
  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. LINK_FLAGS += $(JUCE_CORE_LIBS)
  13. # --------------------------------------------------------------
  14. # UI bridges
  15. BUILD_LV2_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_LV2
  16. BUILD_VST_FLAGS = $(BUILD_CXX_FLAGS) -DBRIDGE_VST
  17. ifeq ($(CARLA_VESTIGE_HEADER),true)
  18. BUILD_VST_FLAGS += -DVESTIGE_HEADER
  19. endif
  20. # --------------------------------------------------------------
  21. BUILD_LV2_GTK2_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK2 -DBRIDGE_LV2_GTK2 $(shell pkg-config --cflags gtk+-2.0)
  22. LINK_LV2_GTK2_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-2.0) -ldl
  23. BUILD_LV2_GTK3_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_GTK3 -DBRIDGE_LV2_GTK3 $(shell pkg-config --cflags gtk+-3.0)
  24. LINK_LV2_GTK3_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs gtk+-3.0) -ldl
  25. BUILD_LV2_QT4_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT4 -DBRIDGE_LV2_QT4 $(shell pkg-config --cflags QtCore QtGui)
  26. LINK_LV2_QT4_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs QtCore QtGui) -ldl
  27. BUILD_LV2_QT5_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_QT5 -DBRIDGE_LV2_QT5 $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  28. LINK_LV2_QT5_FLAGS = $(LINK_FLAGS) $(shell pkg-config --libs Qt5Core Qt5Gui Qt5Widgets) -ldl
  29. BUILD_LV2_X11_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_X11 -DBRIDGE_LV2_X11
  30. LINK_LV2_X11_FLAGS = $(LINK_FLAGS) -ldl
  31. BUILD_LV2_COCOA_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_COCOA -DBRIDGE_LV2_COCOA
  32. LINK_LV2_COCOA_FLAGS = $(LINK_FLAGS) -ldl
  33. BUILD_LV2_WINDOWS_FLAGS = $(BUILD_LV2_FLAGS) -DBRIDGE_HWND -DBRIDGE_LV2_HWND
  34. LINK_LV2_WINDOWS_FLAGS = $(LINK_FLAGS) -static -mwindows
  35. BUILD_VST_X11_FLAGS = $(BUILD_VST_FLAGS) -DBRIDGE_X11 -DBRIDGE_VST_X11
  36. LINK_VST_X11_FLAGS = $(LINK_FLAGS) -ldl
  37. # --------------------------------------------------------------
  38. ifeq ($(HAVE_GTK2),true)
  39. TARGETS += ui_lv2-gtk2
  40. endif
  41. ifeq ($(HAVE_GTK3),true)
  42. TARGETS += ui_lv2-gtk3
  43. endif
  44. ifeq ($(HAVE_QT4),true)
  45. TARGETS += ui_lv2-qt4
  46. endif
  47. ifeq ($(HAVE_QT5),true)
  48. TARGETS += ui_lv2-qt5
  49. endif
  50. ifeq ($(HAVE_X11),true)
  51. TARGETS += ui_lv2-x11
  52. TARGETS += ui_vst-x11
  53. endif
  54. ifeq ($(MACOS),true)
  55. TARGETS += ui_lv2-cocoa
  56. endif
  57. ifeq ($(WIN32),true)
  58. TARGETS += ui_lv2-windows
  59. endif
  60. # --------------------------------------------------------------
  61. # all: $(TARGETS)
  62. # TODO
  63. all:
  64. ui_lv2-gtk2: ../../bin/carla-bridge-lv2-gtk2
  65. ui_lv2-gtk3: ../../bin/carla-bridge-lv2-gtk3
  66. ui_lv2-qt4: ../../bin/carla-bridge-lv2-qt4
  67. ui_lv2-qt5: ../../bin/carla-bridge-lv2-qt5
  68. ui_lv2-x11: ../../bin/carla-bridge-lv2-x11
  69. ui_lv2-cocoa: ../../bin/carla-bridge-lv2-cocoa
  70. ui_lv2-windows: ../../bin/carla-bridge-lv2-windows.exe
  71. ui_vst-x11: ../../bin/carla-bridge-vst-x11
  72. # --------------------------------------------------------------
  73. # UI common
  74. OBJS_LV2_LIBS = \
  75. ../modules/juce_core.a \
  76. ../modules/lilv.a
  77. OBJS_VST_LIBS = \
  78. ../modules/juce_core.a
  79. %__lv2.o: %.cpp
  80. $(CXX) $< $(BUILD_LV2_FLAGS) -c -o $@
  81. %__vst.o: %.cpp
  82. $(CXX) $< $(BUILD_VST_FLAGS) -c -o $@
  83. resources.qt4.cpp: ../../resources/resources-theme.qrc
  84. $(RCC_QT4) $< -o $@
  85. resources.qt5.cpp: ../../resources/resources-theme.qrc
  86. $(RCC_QT5) $< -o $@
  87. CarlaBridgeToolkitQt4.moc: CarlaBridgeToolkitQt.cpp
  88. $(MOC_QT4) $< -DMOC_PARSING -o $@
  89. CarlaBridgeToolkitQt5.moc: CarlaBridgeToolkitQt.cpp
  90. $(MOC_QT5) $< -DMOC_PARSING -o $@
  91. # --------------------------------------------------------------
  92. # ui_lv2-gtk2
  93. OBJS_LV2_GTK2 = \
  94. CarlaBridgeClient__lv2.o \
  95. CarlaBridgeOsc__lv2.o \
  96. CarlaBridgeToolkitGtk__lv2-gtk2.o \
  97. CarlaBridgeUI-LV2__lv2-gtk2.o
  98. ../../bin/carla-bridge-lv2-gtk2: $(OBJS_LV2_GTK2) $(OBJS_LV2_LIBS)
  99. $(CXX) $^ $(LINK_LV2_GTK2_FLAGS) -o $@
  100. %__lv2-gtk2.o: %.cpp
  101. $(CXX) $< $(BUILD_LV2_GTK2_FLAGS) -c -o $@
  102. # --------------------------------------------------------------
  103. # ui_lv2-gtk3
  104. OBJS_LV2_GTK3 = \
  105. CarlaBridgeClient__lv2.o \
  106. CarlaBridgeOsc__lv2.o \
  107. CarlaBridgeToolkitGtk__lv2-gtk3.o \
  108. CarlaBridgeUI-LV2__lv2-gtk3.o
  109. ../../bin/carla-bridge-lv2-gtk3: $(OBJS_LV2_GTK3) $(OBJS_LV2_LIBS)
  110. $(CXX) $^ $(LINK_LV2_GTK3_FLAGS) -o $@
  111. %__lv2-gtk3.o: %.cpp
  112. $(CXX) $< $(BUILD_LV2_GTK3_FLAGS) -c -o $@
  113. # --------------------------------------------------------------
  114. # ui_lv2-qt4
  115. OBJS_LV2_QT4 = \
  116. CarlaBridgeClient__lv2.o \
  117. CarlaBridgeOsc__lv2.o \
  118. CarlaBridgeToolkitQt__lv2-qt4.o \
  119. CarlaBridgeUI-LV2__lv2-qt4.o
  120. ../../bin/carla-bridge-lv2-qt4: $(OBJS_LV2_QT4) $(OBJS_LV2_LIBS) ../modules/theme.qt4.a
  121. $(CXX) $^ $(LINK_LV2_QT4_FLAGS) -o $@
  122. %__lv2-qt4.o: %.cpp CarlaBridgeToolkitQt4.moc resources.qt4.cpp
  123. $(CXX) $< $(BUILD_LV2_QT4_FLAGS) -I../modules/theme -c -o $@
  124. # --------------------------------------------------------------
  125. # ui_lv2-qt5
  126. OBJS_LV2_QT5 = \
  127. CarlaBridgeClient__lv2.o \
  128. CarlaBridgeOsc__lv2.o \
  129. CarlaBridgeToolkitQt__lv2-qt5.o \
  130. CarlaBridgeUI-LV2__lv2-qt5.o
  131. ../../bin/carla-bridge-lv2-qt5: $(OBJS_LV2_QT5) $(OBJS_LV2_LIBS) ../modules/theme.qt5.a
  132. $(CXX) $^ $(LINK_LV2_QT5_FLAGS) -o $@
  133. %__lv2-qt5.o: %.cpp CarlaBridgeToolkitQt5.moc resources.qt5.cpp
  134. $(CXX) $< $(BUILD_LV2_QT5_FLAGS) -I../modules/theme -c -o $@
  135. # --------------------------------------------------------------
  136. # ui_lv2-x11
  137. OBJS_LV2_X11 = \
  138. CarlaBridgeClient__lv2.o \
  139. CarlaBridgeOsc__lv2.o \
  140. CarlaBridgeToolkitPlugin__lv2-x11.o \
  141. CarlaBridgeUI-LV2__lv2-x11.o
  142. ../../bin/carla-bridge-lv2-x11: $(OBJS_LV2_X11) $(OBJS_LV2_LIBS)
  143. $(CXX) $^ $(LINK_LV2_X11_FLAGS) -o $@
  144. %__lv2-x11.o: %.cpp
  145. $(CXX) $< $(BUILD_LV2_X11_FLAGS) -c -o $@
  146. # --------------------------------------------------------------
  147. # ui_lv2-cocoa
  148. OBJS_LV2_COCOA = \
  149. CarlaBridgeClient__lv2.o \
  150. CarlaBridgeOsc__lv2.o \
  151. CarlaBridgeToolkitPlugin__lv2-cocoa.o \
  152. CarlaBridgeUI-LV2__lv2-cocoa.o
  153. ../../bin/carla-bridge-lv2-cocoa: $(OBJS_LV2_COCOA) $(OBJS_LV2_LIBS)
  154. $(CXX) $^ $(LINK_LV2_COCOA_FLAGS) -o $@
  155. %__lv2-cocoa.o: %.cpp
  156. $(CXX) $< $(BUILD_LV2_COCOA_FLAGS) -c -o $@
  157. # --------------------------------------------------------------
  158. # ui_lv2-windows
  159. OBJS_LV2_WINDOWS = \
  160. CarlaBridgeClient__lv2.o \
  161. CarlaBridgeOsc__lv2.o \
  162. CarlaBridgeToolkitPlugin__lv2-windows.o \
  163. CarlaBridgeUI-LV2__lv2-windows.o
  164. ../../bin/carla-bridge-lv2-windows.exe: $(OBJS_LV2_WINDOWS) $(OBJS_LV2_LIBS)
  165. $(CXX) $^ $(LINK_LV2_WINDOWS_FLAGS) -o $@
  166. %__lv2-windows.o: %.cpp
  167. $(CXX) $< $(BUILD_LV2_WINDOWS_FLAGS) -c -o $@
  168. # --------------------------------------------------------------
  169. # ui_vst-x11
  170. OBJS_VST_X11 = \
  171. CarlaBridgeClient__vst.o \
  172. CarlaBridgeOsc__vst.o \
  173. CarlaBridgeToolkitPlugin__vst-x11.o \
  174. CarlaBridgeUI-VST__vst-x11.o \
  175. ../../bin/carla-bridge-vst-x11: $(OBJS_VST_X11) $(OBJS_VST_LIBS) ../modules/theme.a
  176. $(CXX) $^ $(LINK_VST_X11_FLAGS) -o $@
  177. %__vst-x11.o: %.cpp
  178. $(CXX) $< $(BUILD_VST_X11_FLAGS) -c -o $@
  179. # --------------------------------------------------------------
  180. clean:
  181. $(RM) *.moc *.o
  182. $(RM) resources.*.cpp
  183. $(RM) ../../bin/carla-bridge-lv2-* ../../bin/carla-bridge-vst-*
  184. debug:
  185. $(MAKE) DEBUG=true
  186. doxygen: carla_bridge.doxygen
  187. doxygen $<
  188. # --------------------------------------------------------------