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.

169 lines
5.9KB

  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/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_core.a
  39. LIBS_posix32 += ../modules/juce_core.posix32.a
  40. LIBS_posix64 += ../modules/juce_core.posix64.a
  41. LIBS_win32 += ../modules/juce_core.win32.a
  42. LIBS_win64 += ../modules/juce_core.win64.a
  43. LINK_FLAGS += $(JUCE_CORE_LIBS)
  44. ifeq ($(MACOS_OR_WIN32),true)
  45. LIBS += ../modules/juce_audio_basics.a
  46. LIBS_posix32 += ../modules/juce_audio_basics.posix32.a
  47. LIBS_posix64 += ../modules/juce_audio_basics.posix64.a
  48. LIBS_win32 += ../modules/juce_audio_basics.win32.a
  49. LIBS_win64 += ../modules/juce_audio_basics.win64.a
  50. LIBS += ../modules/juce_audio_processors.a
  51. LIBS_posix32 += ../modules/juce_audio_processors.posix32.a
  52. LIBS_posix64 += ../modules/juce_audio_processors.posix64.a
  53. LIBS_win32 += ../modules/juce_audio_processors.win32.a
  54. LIBS_win64 += ../modules/juce_audio_processors.win64.a
  55. LIBS += ../modules/juce_data_structures.a
  56. LIBS_posix32 += ../modules/juce_data_structures.posix32.a
  57. LIBS_posix64 += ../modules/juce_data_structures.posix64.a
  58. LIBS_win32 += ../modules/juce_data_structures.win32.a
  59. LIBS_win64 += ../modules/juce_data_structures.win64.a
  60. LIBS += ../modules/juce_events.a
  61. LIBS_posix32 += ../modules/juce_events.posix32.a
  62. LIBS_posix64 += ../modules/juce_events.posix64.a
  63. LIBS_win32 += ../modules/juce_events.win32.a
  64. LIBS_win64 += ../modules/juce_events.win64.a
  65. LIBS += ../modules/juce_graphics.a
  66. LIBS_posix32 += ../modules/juce_graphics.posix32.a
  67. LIBS_posix64 += ../modules/juce_graphics.posix64.a
  68. LIBS_win32 += ../modules/juce_graphics.win32.a
  69. LIBS_win64 += ../modules/juce_graphics.win64.a
  70. LIBS += ../modules/juce_gui_basics.a
  71. LIBS_posix32 += ../modules/juce_gui_basics.posix32.a
  72. LIBS_posix64 += ../modules/juce_gui_basics.posix64.a
  73. LIBS_win32 += ../modules/juce_gui_basics.win32.a
  74. LIBS_win64 += ../modules/juce_gui_basics.win64.a
  75. ifeq ($(MACOS),true)
  76. LIBS += ../modules/juce_gui_extra.a
  77. LIBS_posix32 += ../modules/juce_gui_extra.posix32.a
  78. LIBS_posix64 += ../modules/juce_gui_extra.posix64.a
  79. endif
  80. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  81. LINK_FLAGS += $(JUCE_AUDIO_PROCESSORS_LIBS)
  82. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  83. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  84. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  85. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  86. ifeq ($(MACOS),true)
  87. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  88. endif
  89. endif
  90. POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  91. POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  92. POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  93. POSIX_LINK_FLAGS = $(LINK_FLAGS)
  94. ifneq ($(HAIKU),true)
  95. POSIX_LINK_FLAGS += -ldl
  96. endif
  97. WIN_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  98. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  99. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  100. WIN_LINK_FLAGS = $(LINK_FLAGS) $(EXTRA_LIBS)
  101. # --------------------------------------------------------------
  102. DEPS = $(CARLA_BACKEND_UTILS_HPP)
  103. DEPS += $(CARLA_LIB_UTILS_HPP)
  104. DEPS += $(CARLA_MATH_UTILS_HPP)
  105. DEPS += $(CARLA_MIDI_H)
  106. # juce_audio_processors.h
  107. DEPS += $(CARLA_LADSPA_UTILS_HPP)
  108. DEPS += $(CARLA_DSSI_UTILS_CPP)
  109. DEPS += $(CARLA_LV2_UTILS_HPP)
  110. DEPS += $(CARLA_VST_UTILS_HPP)
  111. OBJS = carla-discovery.cpp
  112. # --------------------------------------------------------------
  113. all: ../../bin/carla-discovery-native$(APP_EXT)
  114. posix32: ../../bin/carla-discovery-posix32
  115. posix64: ../../bin/carla-discovery-posix64
  116. win32: ../../bin/carla-discovery-win32.exe
  117. win64: ../../bin/carla-discovery-win64.exe
  118. # --------------------------------------------------------------
  119. ../../bin/carla-discovery-native: $(OBJS) $(DEPS) $(LIBS)
  120. $(CXX) $(OBJS) $(LIBS_START) $(LIBS) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  121. ../../bin/carla-discovery-native.exe: $(OBJS) $(DEPS) $(LIBS)
  122. $(CXX) $(OBJS) $(LIBS_START) $(LIBS) $(LIBS_END) $(WIN_BUILD_FLAGS) $(NATIVE_FLAGS) $(WIN_LINK_FLAGS) -o $@
  123. ../../bin/carla-discovery-posix32: $(OBJS) $(DEPS) $(LIBS_posix32)
  124. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_posix32) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  125. ../../bin/carla-discovery-posix64: $(OBJS) $(DEPS) $(LIBS_posix64)
  126. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_posix64) $(LIBS_END) $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  127. ../../bin/carla-discovery-win32.exe: $(OBJS) $(DEPS) $(LIBS_win32)
  128. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_win32) $(LIBS_END) $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  129. ../../bin/carla-discovery-win64.exe: $(OBJS) $(DEPS) $(LIBS_win64)
  130. $(CXX) $(OBJS) $(LIBS_START) $(LIBS_win64) $(LIBS_END) $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  131. # --------------------------------------------------------------
  132. clean:
  133. $(RM) ../../bin/carla-discovery-*
  134. debug:
  135. $(MAKE) DEBUG=true
  136. # --------------------------------------------------------------