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.

102 lines
2.8KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-backend #
  3. # ------------------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  8. HAVE_SUIL = $(shell pkg-config --exists suil-0 && echo true)
  9. endif
  10. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  11. HAVE_FLUIDSYNTH = $(shell pkg-config --exists fluidsynth && echo true)
  12. HAVE_LINUXSAMPLER = $(shell pkg-config --exists linuxsampler && echo true)
  13. endif
  14. HAVE_ZYN_DEPS = $(shell pkg-config --exists fftw3 mxml && echo true)
  15. HAVE_ZYN_GUI_DEPS = $(shell pkg-config --exists ntk && echo true)
  16. # --------------------------------------------------------------
  17. BUILD_CXX_FLAGS += -I. -I../carla-includes -I../carla-engine -I../carla-jackbridge -I../carla-native -I../carla-plugin -I../carla-utils
  18. BUILD_CXX_FLAGS += -fvisibility=hidden -fPIC
  19. BUILD_CXX_FLAGS += $(shell pkg-config --cflags jack liblo QtCore QtGui)
  20. LINK_FLAGS += -fPIC -shared -ldl -lm
  21. LINK_FLAGS += $(shell pkg-config --libs jack liblo QtCore QtGui)
  22. ifeq ($(HAVE_SUIL),true)
  23. BUILD_CXX_FLAGS += $(shell pkg-config --cflags suil-0) -DWANT_SUIL
  24. LINK_FLAGS += $(shell pkg-config --libs suil-0)
  25. endif
  26. ifeq ($(HAVE_FLUIDSYNTH),true)
  27. BUILD_CXX_FLAGS += $(shell pkg-config --cflags fluidsynth) -DWANT_FLUIDSYNTH
  28. LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
  29. endif
  30. ifeq ($(HAVE_LINUXSAMPLER),true)
  31. BUILD_CXX_FLAGS += $(shell pkg-config --cflags linuxsampler) -DWANT_LINUXSAMPLER
  32. LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
  33. endif
  34. ifeq ($(HAVE_ZYN_DEPS),true)
  35. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml)
  36. ifeq ($(HAVE_ZYN_GUI_DEPS),true)
  37. LINK_FLAGS += $(shell pkg-config --libs ntk)
  38. endif
  39. endif
  40. OBJS = \
  41. carla_backend_standalone.o \
  42. OBJS += \
  43. ../carla-engine/carla_engine.a \
  44. ../carla-native/carla_native.a \
  45. ../carla-plugin/carla_plugin.a
  46. # others
  47. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  48. OBJS += ../carla-lilv/carla_lilv.a
  49. OBJS += ../carla-rtmempool/carla_rtmempool.a
  50. endif
  51. # --------------------------------------------------------------
  52. all: carla_backend.so
  53. doc: carla_backend.doxygen
  54. doxygen $<
  55. carla_backend.so: $(OBJS)
  56. $(CXX) $^ $(LINK_FLAGS) -o $@ && strip $@
  57. # carla_backend-dssi.so: $(OBJS) carla_backend_plugin.cpp
  58. # $(CXX) $^ -DDISTRHO_PLUGIN_TARGET_DSSI -Idistrho-plugin-toolkit $(CARLA_CXX_FLAGS) $(CARLA_LD_FLAGS) -o $@ && strip $@
  59. # --------------------------------------------------------------
  60. .cpp.o:
  61. $(CXX) -c $< $(BUILD_CXX_FLAGS) -o $@
  62. ../carla-engine/carla_engine.a:
  63. $(MAKE) -C ../carla-engine
  64. ../carla-lilv/carla_lilv.a:
  65. $(MAKE) -C ../carla-lilv
  66. ../carla-native/carla_native.a:
  67. $(MAKE) -C ../carla-native
  68. ../carla-plugin/carla_plugin.a:
  69. $(MAKE) -C ../carla-plugin
  70. ../carla-rtmempool/carla_rtmempool.a:
  71. $(MAKE) -C ../carla-rtmempool
  72. clean:
  73. rm -f $(OBJS) *.a *.so *.dll