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.

130 lines
3.7KB

  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../modules -I../utils
  9. BUILD_CXX_FLAGS += -DWANT_NATIVE
  10. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  11. BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST
  12. ifeq ($(CARLA_VESTIGE_HEADER),true)
  13. BUILD_CXX_FLAGS += -DVESTIGE_HEADER
  14. endif
  15. endif
  16. ifeq ($(CARLA_CSOUND_SUPPORT),true)
  17. NATIVE_FLAGS += -DWANT_CSOUND
  18. endif
  19. ifeq ($(HAVE_FLUIDSYNTH),true)
  20. NATIVE_FLAGS += $(shell pkg-config --cflags --libs fluidsynth) -DWANT_FLUIDSYNTH
  21. endif
  22. ifeq ($(HAVE_LINUXSAMPLER),true)
  23. NATIVE_FLAGS += $(shell pkg-config --cflags --libs linuxsampler) -DWANT_LINUXSAMPLER
  24. endif
  25. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  26. LINK_FLAGS += $(JUCE_CORE_LIBS)
  27. # --------------------------------------------------------------
  28. POSIX_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  29. POSIX_32BIT_FLAGS = $(32BIT_FLAGS) -L/usr/lib32 -L/usr/lib/i386-linux-gnu
  30. POSIX_64BIT_FLAGS = $(64BIT_FLAGS) -L/usr/lib64 -L/usr/lib/x86_64-linux-gnu
  31. POSIX_LINK_FLAGS = $(LINK_FLAGS) -ldl
  32. WIN_BUILD_FLAGS = $(BUILD_CXX_FLAGS)
  33. WIN_32BIT_FLAGS = $(32BIT_FLAGS)
  34. WIN_64BIT_FLAGS = $(64BIT_FLAGS)
  35. WIN_LINK_FLAGS = $(LINK_FLAGS) -lkernel32
  36. LIBS = ../modules/juce_audio_basics.a
  37. LIBS_posix32 = ../modules/juce_audio_basics.posix32.a
  38. LIBS_posix64 = ../modules/juce_audio_basics.posix64.a
  39. LIBS_win32 = ../modules/juce_audio_basics.win32.a
  40. LIBS_win64 = ../modules/juce_audio_basics.win64.a
  41. LIBS += ../modules/juce_core.a
  42. LIBS_posix32 += ../modules/juce_core.posix32.a
  43. LIBS_posix64 += ../modules/juce_core.posix64.a
  44. LIBS_win32 += ../modules/juce_core.win32.a
  45. LIBS_win64 += ../modules/juce_core.win64.a
  46. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  47. LIBS += ../modules/lilv.a
  48. LIBS_posix32 += ../modules/lilv.posix32.a
  49. LIBS_posix64 += ../modules/lilv.posix64.a
  50. LIBS_win32 += ../modules/lilv.win32.a
  51. LIBS_win64 += ../modules/lilv.win64.a
  52. LINK_FLAGS += $(LILV_LIBS)
  53. endif
  54. OBJS = carla-discovery.cpp
  55. # --------------------------------------------------------------
  56. ifeq ($(WIN32),true)
  57. all: carla-discovery-native.exe
  58. else
  59. all: carla-discovery-native
  60. endif
  61. posix32: carla-discovery-posix32
  62. posix64: carla-discovery-posix64
  63. win32: carla-discovery-win32.exe
  64. win64: carla-discovery-win64.exe
  65. # --------------------------------------------------------------
  66. carla-discovery-native: $(OBJS) $(LIBS)
  67. $(CXX) $^ $(POSIX_BUILD_FLAGS) $(NATIVE_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  68. carla-discovery-native.exe: $(OBJS) $(LIBS)
  69. $(CXX) $^ $(WIN_BUILD_FLAGS) $(NATIVE_FLAGS) $(WIN_LINK_FLAGS) -o $@
  70. carla-discovery-posix32: $(OBJS) $(LIBS_posix32)
  71. $(CXX) $^ $(POSIX_BUILD_FLAGS) $(POSIX_32BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  72. carla-discovery-posix64: $(OBJS) $(LIBS_posix64)
  73. $(CXX) $^ $(POSIX_BUILD_FLAGS) $(POSIX_64BIT_FLAGS) $(POSIX_LINK_FLAGS) -o $@
  74. carla-discovery-win32.exe: $(OBJS) $(LIBS_win32)
  75. $(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_32BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  76. carla-discovery-win64.exe: $(OBJS) $(LIBS_win64)
  77. $(CXX) $^ $(WIN_BUILD_FLAGS) $(WIN_64BIT_FLAGS) $(WIN_LINK_FLAGS) -o $@
  78. # --------------------------------------------------------------
  79. clean:
  80. rm -f carla-discovery-*
  81. debug:
  82. $(MAKE) DEBUG=true
  83. # --------------------------------------------------------------
  84. .FORCE:
  85. .PHONY: .FORCE
  86. ../modules/juce_audio_basics.%.a: .FORCE
  87. $(MAKE) -C ../modules juce_audio_basics_$*
  88. ../modules/juce_core.%.a: .FORCE
  89. $(MAKE) -C ../modules juce_core_$*
  90. ../modules/lilv.%.a: .FORCE
  91. $(MAKE) -C ../modules lilv_$*
  92. ../modules/%.a: .FORCE
  93. $(MAKE) -C ../modules $*
  94. # --------------------------------------------------------------