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

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