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.

216 lines
7.0KB

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