Collection of tools useful for audio production
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.

126 lines
3.2KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-backend #
  3. # ------------------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. HAVE_JACK = $(shell pkg-config --exists jack && echo true)
  8. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  9. HAVE_ALSA = $(shell pkg-config --exists alsa && echo true)
  10. HAVE_PULSEAUDIO = $(shell pkg-config --exists libpulse-simple && echo true)
  11. endif
  12. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  13. HAVE_SUIL = $(shell pkg-config --exists suil-0 && echo true)
  14. endif
  15. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  16. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  17. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  18. endif
  19. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml && echo true)
  20. HAVE_ZYN_GUI_DEPS = $(shell which ntk-config)
  21. # --------------------------------------------------------------
  22. BUILD_CXX_FLAGS += -I. -I../carla-engine -I../carla-includes -I../carla-native -I../carla-plugin -I../carla-utils
  23. BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC
  24. BUILD_CXX_FLAGS += $(shell pkg-config --cflags liblo QtCore)
  25. LINK_FLAGS += -fPIC -shared -ldl -lm
  26. LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtGui)
  27. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  28. BUILD_CXX_FLAGS += -DWANT_LADSPA -DWANT_DSSI -DWANT_LV2 -DWANT_VST
  29. endif
  30. ifeq ($(CARLA_RTAUDIO_SUPPORT),true)
  31. BUILD_CXX_FLAGS += -DCARLA_ENGINE_RTAUDIO
  32. endif
  33. ifeq ($(HAVE_JACK),true)
  34. LINK_FLAGS += $(shell pkg-config --libs jack)
  35. endif
  36. ifeq ($(HAVE_ALSA),true)
  37. LINK_FLAGS += $(shell pkg-config --libs alsa)
  38. endif
  39. ifeq ($(HAVE_PULSEAUDIO),true)
  40. LINK_FLAGS += $(shell pkg-config --libs libpulse-simple)
  41. endif
  42. ifeq ($(HAVE_SUIL),true)
  43. LINK_FLAGS += $(shell pkg-config --libs suil-0)
  44. endif
  45. ifeq ($(HAVE_FLUIDSYNTH),true)
  46. BUILD_CXX_FLAGS += -DWANT_FLUIDSYNTH
  47. LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
  48. endif
  49. ifeq ($(HAVE_LINUXSAMPLER),true)
  50. BUILD_CXX_FLAGS += -DWANT_LINUXSAMPLER
  51. LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
  52. endif
  53. ifeq ($(HAVE_ZYN_DEPS),true)
  54. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml)
  55. ifneq ($(HAVE_ZYN_GUI_DEPS),)
  56. LINK_FLAGS += $(shell ntk-config --ldflags)
  57. endif
  58. endif
  59. OBJS = \
  60. carla_backend_standalone.o \
  61. OBJS += ../carla-engine/carla_engine.a
  62. OBJS += ../carla-plugin/carla_plugin.a
  63. OBJS += ../carla-native/carla_native.a
  64. # others
  65. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  66. OBJS += ../carla-lilv/carla_lilv.a
  67. OBJS += ../carla-rtmempool/carla_rtmempool.a
  68. endif
  69. # --------------------------------------------------------------
  70. all: carla_backend.so
  71. doxygen: carla_backend.doxygen
  72. doxygen $<
  73. carla_backend.so: $(OBJS)
  74. $(CXX) $^ $(LINK_FLAGS) -o $@ && $(STRIP) $@
  75. # --------------------------------------------------------------
  76. ../carla-engine/carla_engine.a:
  77. $(MAKE) -C ../carla-engine
  78. ../carla-lilv/carla_lilv.a:
  79. $(MAKE) -C ../carla-lilv
  80. ../carla-native/carla_native.a:
  81. $(MAKE) -C ../carla-native
  82. ../carla-plugin/carla_plugin.a:
  83. $(MAKE) -C ../carla-plugin
  84. ../carla-rtmempool/carla_rtmempool.a:
  85. $(MAKE) -C ../carla-rtmempool
  86. # --------------------------------------------------------------
  87. .cpp.o:
  88. $(CXX) -c $< $(BUILD_CXX_FLAGS) -o $@
  89. clean:
  90. rm -f $(OBJS) *.so *.dll