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.

226 lines
7.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-discovery #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules
  9. BUILD_CXX_FLAGS += -I../includes/ladspa -I../includes/vst -I../includes/vst3
  10. #-Wno-multichar
  11. BUILD_CXX_FLAGS += $(QTCORE_FLAGS)
  12. LINK_FLAGS += $(QTCORE_LIBS)
  13. ifeq ($(MACOS),true)
  14. BUILD_CXX_FLAGS += -ObjC++
  15. endif
  16. # --------------------------------------------------------------
  17. BUILD_CXX_FLAGS += -DWANT_NATIVE
  18. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  19. BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST
  20. ifeq ($(MACOS),true)
  21. BUILD_CXX_FLAGS += -DWANT_AU
  22. endif
  23. ifeq ($(MACOS_OR_WIN32),true)
  24. BUILD_CXX_FLAGS += -DWANT_VST3
  25. endif
  26. ifeq ($(CARLA_VESTIGE_HEADER),true)
  27. BUILD_CXX_FLAGS += -DVESTIGE_HEADER
  28. endif
  29. endif
  30. # --------------------------------------------------------------
  31. ifeq ($(HAVE_CSOUND),true)
  32. NATIVE_FLAGS += -DWANT_CSOUND $(CSOUND_FLAGS) $(CSOUND_LIBS)
  33. endif
  34. ifeq ($(HAVE_FLUIDSYNTH),true)
  35. NATIVE_FLAGS += -DWANT_FLUIDSYNTH $(FLUIDSYNTH_FLAGS) $(FLUIDSYNTH_LIBS)
  36. endif
  37. ifeq ($(HAVE_LINUXSAMPLER),true)
  38. NATIVE_FLAGS += -DWANT_LINUXSAMPLER $(LINUXSAMPLER_FLAGS) $(LINUXSAMPLER_LIBS)
  39. endif
  40. # --------------------------------------------------------------
  41. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  42. LIBS += ../modules/lilv.a
  43. LIBS_posix32 += ../modules/lilv.posix32.a
  44. LIBS_posix64 += ../modules/lilv.posix64.a
  45. LIBS_win32 += ../modules/lilv.win32.a
  46. LIBS_win64 += ../modules/lilv.win64.a
  47. LINK_FLAGS += $(LILV_LIBS)
  48. endif
  49. ifeq ($(HAVE_JUCE),true)
  50. LIBS += ../modules/juce_audio_basics.a
  51. LIBS_posix32 += ../modules/juce_audio_basics.posix32.a
  52. LIBS_posix64 += ../modules/juce_audio_basics.posix64.a
  53. LIBS_win32 += ../modules/juce_audio_basics.win32.a
  54. LIBS_win64 += ../modules/juce_audio_basics.win64.a
  55. LIBS += ../modules/juce_core.a
  56. LIBS_posix32 += ../modules/juce_core.posix32.a
  57. LIBS_posix64 += ../modules/juce_core.posix64.a
  58. LIBS_win32 += ../modules/juce_core.win32.a
  59. LIBS_win64 += ../modules/juce_core.win64.a
  60. LINK_FLAGS += $(JUCE_CORE_LIBS) $(JUCE_AUDIO_BASICS_LIBS)
  61. endif
  62. ifeq ($(MACOS),true)
  63. LIBS += ../modules/juce_gui_extra.a
  64. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  65. endif
  66. ifeq ($(MACOS_OR_WIN32),true)
  67. LIBS += ../modules/juce_audio_processors.a
  68. LIBS_posix32 += ../modules/juce_audio_processors.posix32.a
  69. LIBS_posix64 += ../modules/juce_audio_processors.posix64.a
  70. LIBS_win32 += ../modules/juce_audio_processors.win32.a
  71. LIBS_win64 += ../modules/juce_audio_processors.win64.a
  72. LIBS += ../modules/juce_data_structures.a
  73. LIBS_posix32 += ../modules/juce_data_structures.posix32.a
  74. LIBS_posix64 += ../modules/juce_data_structures.posix64.a
  75. LIBS_win32 += ../modules/juce_data_structures.win32.a
  76. LIBS_win64 += ../modules/juce_data_structures.win64.a
  77. LIBS += ../modules/juce_events.a
  78. LIBS_posix32 += ../modules/juce_events.posix32.a
  79. LIBS_posix64 += ../modules/juce_events.posix64.a
  80. LIBS_win32 += ../modules/juce_events.win32.a
  81. LIBS_win64 += ../modules/juce_events.win64.a
  82. LIBS += ../modules/juce_graphics.a
  83. LIBS_posix32 += ../modules/juce_graphics.posix32.a
  84. LIBS_posix64 += ../modules/juce_graphics.posix64.a
  85. LIBS_win32 += ../modules/juce_graphics.win32.a
  86. LIBS_win64 += ../modules/juce_graphics.win64.a
  87. LIBS += ../modules/juce_gui_basics.a
  88. LIBS_posix32 += ../modules/juce_gui_basics.posix32.a
  89. LIBS_posix64 += ../modules/juce_gui_basics.posix64.a
  90. LIBS_win32 += ../modules/juce_gui_basics.win32.a
  91. LIBS_win64 += ../modules/juce_gui_basics.win64.a
  92. LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  93. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  94. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  95. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  96. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  97. endif
  98. POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  99. POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  100. POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  101. POSIX_LINK_FLAGS = $(LINK_FLAGS)
  102. ifneq ($(HAIKU),true)
  103. POSIX_LINK_FLAGS += -ldl
  104. endif
  105. WIN_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  106. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  107. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  108. WIN_LINK_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS)
  109. # --------------------------------------------------------------
  110. DEPS = ../includes/CarlaDefines.h
  111. DEPS += ../includes/CarlaMIDI.h
  112. DEPS += ../backend/CarlaBackend.h
  113. DEPS += ../utils/CarlaString.hpp
  114. DEPS += ../utils/CarlaUtils.hpp
  115. DEPS += ../utils/CarlaBackendUtils.hpp
  116. DEPS += ../utils/CarlaJuceUtils.hpp
  117. DEPS += ../utils/CarlaLibUtils.hpp
  118. DEPS += ../utils/CarlaMathUtils.hpp
  119. DEPS += ../utils/CarlaLadspaUtils.hpp
  120. DEPS += ../utils/CarlaDssiUtils.hpp
  121. DEPS += ../utils/CarlaLv2Utils.hpp
  122. DEPS += ../utils/CarlaVstUtils.hpp
  123. OBJS = carla-discovery.cpp
  124. # --------------------------------------------------------------
  125. ifeq ($(WIN32),true)
  126. all: carla-discovery-native.exe
  127. else
  128. all: carla-discovery-native
  129. endif
  130. posix32: carla-discovery-posix32
  131. posix64: carla-discovery-posix64
  132. win32: carla-discovery-win32.exe
  133. win64: carla-discovery-win64.exe
  134. # --------------------------------------------------------------
  135. carla-discovery-native: $(OBJS) $(DEPS) $(LIBS)
  136. ifeq ($(MACOS),true)
  137. $(CXX) $< $(LIBS) $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  138. else
  139. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  140. endif
  141. carla-discovery-native.exe: $(OBJS) $(DEPS) $(LIBS)
  142. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(WIN_BUILD_FLAGS) $(NATIVE_FLAGS) $(WIN_LINK_FLAGS) -o $@
  143. carla-discovery-posix32: $(OBJS) $(DEPS) $(LIBS_posix32)
  144. $(CXX) $< -Wl,--start-group $(LIBS_posix32) -Wl,--end-group $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  145. carla-discovery-posix64: $(OBJS) $(DEPS) $(LIBS_posix64)
  146. $(CXX) $< -Wl,--start-group $(LIBS_posix64) -Wl,--end-group $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  147. carla-discovery-win32.exe: $(OBJS) $(DEPS) $(LIBS_win32)
  148. $(CXX) $< -Wl,--start-group $(LIBS_win32) -Wl,--end-group $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  149. carla-discovery-win64.exe: $(OBJS) $(DEPS) $(LIBS_win64)
  150. $(CXX) $< -Wl,--start-group $(LIBS_win64) -Wl,--end-group $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  151. # --------------------------------------------------------------
  152. clean:
  153. rm -f carla-discovery-*
  154. debug:
  155. $(MAKE) DEBUG=true
  156. # --------------------------------------------------------------
  157. .FORCE:
  158. .PHONY: .FORCE
  159. ../modules/juce_audio_basics.%.a: .FORCE
  160. $(MAKE) -C ../modules juce_audio_basics_$*
  161. ../modules/juce_audio_processors.%.a: .FORCE
  162. $(MAKE) -C ../modules juce_audio_processors_$*
  163. ../modules/juce_core.%.a: .FORCE
  164. $(MAKE) -C ../modules juce_core_$*
  165. ../modules/juce_data_structures.%.a: .FORCE
  166. $(MAKE) -C ../modules juce_data_structures_$*
  167. ../modules/juce_events.%.a: .FORCE
  168. $(MAKE) -C ../modules juce_events_$*
  169. ../modules/juce_graphics.%.a: .FORCE
  170. $(MAKE) -C ../modules juce_graphics_$*
  171. ../modules/juce_gui_basics.%.a: .FORCE
  172. $(MAKE) -C ../modules juce_gui_basics_$*
  173. ../modules/lilv.%.a: .FORCE
  174. $(MAKE) -C ../modules lilv_$*
  175. ../modules/%.a: .FORCE
  176. $(MAKE) -C ../modules $*
  177. # --------------------------------------------------------------