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.

178 lines
6.1KB

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