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.

166 lines
5.8KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-discovery #
  3. # ---------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. include $(CWD)/Makefile.deps
  8. include $(CWD)/Makefile.mk
  9. # --------------------------------------------------------------
  10. BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules
  11. BUILD_CXX_FLAGS += -I../includes/ladspa -I../includes/vst
  12. ifeq ($(MACOS_OR_WIN32),true)
  13. BUILD_CXX_FLAGS += -I../includes/vst3
  14. endif
  15. ifeq ($(MACOS),true)
  16. BUILD_CXX_FLAGS += -ObjC++
  17. endif
  18. 32BIT_FLAGS += -DBUILD_BRIDGE
  19. 64BIT_FLAGS += -DBUILD_BRIDGE
  20. # --------------------------------------------------------------
  21. ifeq ($(CARLA_VESTIGE_HEADER),true)
  22. BUILD_CXX_FLAGS += -DVESTIGE_HEADER
  23. endif
  24. # --------------------------------------------------------------
  25. ifeq ($(HAVE_FLUIDSYNTH),true)
  26. NATIVE_FLAGS += $(FLUIDSYNTH_FLAGS) $(FLUIDSYNTH_LIBS)
  27. endif
  28. ifeq ($(HAVE_LINUXSAMPLER),true)
  29. NATIVE_FLAGS += $(LINUXSAMPLER_FLAGS) $(LINUXSAMPLER_LIBS)
  30. endif
  31. # --------------------------------------------------------------
  32. LIBS = ../modules/lilv.a
  33. LIBS_posix32 = ../modules/lilv.posix32.a
  34. LIBS_posix64 = ../modules/lilv.posix64.a
  35. LIBS_win32 = ../modules/lilv.win32.a
  36. LIBS_win64 = ../modules/lilv.win64.a
  37. LINK_FLAGS = $(LILV_LIBS)
  38. LIBS += ../modules/juce_audio_basics.a
  39. LIBS_posix32 += ../modules/juce_audio_basics.posix32.a
  40. LIBS_posix64 += ../modules/juce_audio_basics.posix64.a
  41. LIBS_win32 += ../modules/juce_audio_basics.win32.a
  42. LIBS_win64 += ../modules/juce_audio_basics.win64.a
  43. LIBS += ../modules/juce_core.a
  44. LIBS_posix32 += ../modules/juce_core.posix32.a
  45. LIBS_posix64 += ../modules/juce_core.posix64.a
  46. LIBS_win32 += ../modules/juce_core.win32.a
  47. LIBS_win64 += ../modules/juce_core.win64.a
  48. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  49. LINK_FLAGS += $(JUCE_CORE_LIBS)
  50. ifeq ($(MACOS_OR_WIN32),true)
  51. LIBS += ../modules/juce_audio_processors.a
  52. LIBS_posix32 += ../modules/juce_audio_processors.posix32.a
  53. LIBS_posix64 += ../modules/juce_audio_processors.posix64.a
  54. LIBS_win32 += ../modules/juce_audio_processors.win32.a
  55. LIBS_win64 += ../modules/juce_audio_processors.win64.a
  56. LIBS += ../modules/juce_data_structures.a
  57. LIBS_posix32 += ../modules/juce_data_structures.posix32.a
  58. LIBS_posix64 += ../modules/juce_data_structures.posix64.a
  59. LIBS_win32 += ../modules/juce_data_structures.win32.a
  60. LIBS_win64 += ../modules/juce_data_structures.win64.a
  61. LIBS += ../modules/juce_events.a
  62. LIBS_posix32 += ../modules/juce_events.posix32.a
  63. LIBS_posix64 += ../modules/juce_events.posix64.a
  64. LIBS_win32 += ../modules/juce_events.win32.a
  65. LIBS_win64 += ../modules/juce_events.win64.a
  66. LIBS += ../modules/juce_graphics.a
  67. LIBS_posix32 += ../modules/juce_graphics.posix32.a
  68. LIBS_posix64 += ../modules/juce_graphics.posix64.a
  69. LIBS_win32 += ../modules/juce_graphics.win32.a
  70. LIBS_win64 += ../modules/juce_graphics.win64.a
  71. LIBS += ../modules/juce_gui_basics.a
  72. LIBS_posix32 += ../modules/juce_gui_basics.posix32.a
  73. LIBS_posix64 += ../modules/juce_gui_basics.posix64.a
  74. LIBS_win32 += ../modules/juce_gui_basics.win32.a
  75. LIBS_win64 += ../modules/juce_gui_basics.win64.a
  76. LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  77. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  78. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  79. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  80. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  81. endif
  82. ifeq ($(MACOS),true)
  83. LIBS += ../modules/juce_gui_extra.a
  84. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  85. endif
  86. POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  87. POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  88. POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  89. POSIX_LINK_FLAGS = $(LINK_FLAGS)
  90. ifneq ($(HAIKU),true)
  91. POSIX_LINK_FLAGS += -ldl
  92. endif
  93. WIN_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  94. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  95. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  96. WIN_LINK_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS)
  97. # --------------------------------------------------------------
  98. DEPS = $(CARLA_BACKEND_UTILS_HPP)
  99. DEPS += $(CARLA_LIB_UTILS_HPP)
  100. DEPS += $(CARLA_MATH_UTILS_HPP)
  101. DEPS += $(CARLA_MIDI_H)
  102. # juce_audio_processors.h
  103. DEPS += $(CARLA_LADSPA_UTILS_HPP)
  104. DEPS += $(CARLA_DSSI_UTILS_CPP)
  105. DEPS += $(CARLA_LV2_UTILS_HPP)
  106. DEPS += $(CARLA_VST_UTILS_HPP)
  107. OBJS = carla-discovery.cpp
  108. # --------------------------------------------------------------
  109. all: ../../bin/carla-discovery-native$(APP_EXT)
  110. posix32: ../../bin/carla-discovery-posix32
  111. posix64: ../../bin/carla-discovery-posix64
  112. win32: ../../bin/carla-discovery-win32.exe
  113. win64: ../../bin/carla-discovery-win64.exe
  114. # --------------------------------------------------------------
  115. ../../bin/carla-discovery-native: $(OBJS) $(DEPS) $(LIBS)
  116. $(CXX) $(OBJS) $(LIBS_START) $(LIBS) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  117. ../../bin/carla-discovery-native.exe: $(OBJS) $(DEPS) $(LIBS)
  118. $(CXX) $(OBJS) $(LIBS_START) $(LIBS) $(LIBS_END) $(WIN_BUILD_FLAGS) $(NATIVE_FLAGS) $(WIN_LINK_FLAGS) -o $@
  119. ../../bin/carla-discovery-posix32: $(OBJS) $(DEPS) $(LIBS_posix32)
  120. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  121. ../../bin/carla-discovery-posix64: $(OBJS) $(DEPS) $(LIBS_posix64)
  122. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  123. ../../bin/carla-discovery-win32.exe: $(OBJS) $(DEPS) $(LIBS_win32)
  124. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  125. ../../bin/carla-discovery-win64.exe: $(OBJS) $(DEPS) $(LIBS_win64)
  126. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  127. # --------------------------------------------------------------
  128. clean:
  129. $(RM) ../../bin/carla-discovery-*
  130. debug:
  131. $(MAKE) DEBUG=true
  132. # --------------------------------------------------------------