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.

136 lines
3.0KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-standalone #
  3. # ----------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtGui)
  9. # --------------------------------------------------------------
  10. # Common
  11. LINK_FLAGS += $(shell pkg-config --libs liblo QtCore QtGui QtXml)
  12. # --------------------------------------------------------------
  13. # Engine
  14. ifeq ($(HAVE_ALSA),true)
  15. LINK_FLAGS += $(shell pkg-config --libs alsa)
  16. endif
  17. ifeq ($(HAVE_JACK),true)
  18. LINK_FLAGS += $(shell pkg-config --libs jack)
  19. endif
  20. ifeq ($(HAVE_PULSEAUDIO),true)
  21. LINK_FLAGS += $(shell pkg-config --libs libpulse-simple)
  22. endif
  23. # --------------------------------------------------------------
  24. # Plugin
  25. ifeq ($(HAVE_FLUIDSYNTH),true)
  26. LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
  27. endif
  28. ifeq ($(HAVE_LINUXSAMPLER),true)
  29. LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
  30. endif
  31. # --------------------------------------------------------------
  32. # Native
  33. ifeq ($(WIN32),true)
  34. DGL_LIBS = -lgdi32
  35. W32_LIBS = -lcomdlg32 -ldsound -limm32 -lole32 -luuid -lwinmm -lwinspool -lws2_32
  36. ifeq ($(HAVE_LINUXSAMPLER),true)
  37. W32_LIBS += -lrpcrt4
  38. endif
  39. else
  40. DGL_LIBS = -lX11
  41. endif
  42. ifeq ($(HAVE_AF_DEPS),true)
  43. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil sndfile)
  44. endif
  45. ifeq ($(HAVE_MF_DEPS),true)
  46. LINK_FLAGS += $(shell pkg-config --libs smf)
  47. endif
  48. ifeq ($(HAVE_OPENGL),true)
  49. LINK_FLAGS += $(shell pkg-config --libs gl) $(DGL_LIBS)
  50. endif
  51. ifeq ($(HAVE_ZYN_DEPS),true)
  52. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  53. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  54. LINK_FLAGS += $(shell pkg-config --libs ntk ntk_images)
  55. endif
  56. endif
  57. LINK_FLAGS += $(EXTRA_LIBS)
  58. # --------------------------------------------------------------
  59. LIBS = ../libcarla_engine.a
  60. LIBS += ../libcarla_plugin.a
  61. LIBS += ../libcarla_native.a
  62. LIBS += ../../libs/rtmempool.a
  63. LIBS += ../../libs/widgets.a
  64. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  65. LIBS += ../../libs/lilv.a
  66. endif
  67. ifeq ($(HAVE_OPENGL),true)
  68. LIBS += ../../libs/dgl.a
  69. endif
  70. OBJS = \
  71. CarlaStandalone.cpp.o
  72. STATIC = ../libcarla_standalone.a
  73. ifeq ($(WIN32),true)
  74. SHARED = ../libcarla_standalone.dll
  75. else
  76. SHARED = ../libcarla_standalone.so
  77. endif
  78. # --------------------------------------------------------------
  79. all: $(SHARED)
  80. clean:
  81. rm -f $(OBJS) $(SHARED) $(STATIC)
  82. debug:
  83. $(MAKE) DEBUG=true
  84. # --------------------------------------------------------------
  85. %.cpp.o: %.cpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp
  86. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  87. $(STATIC): $(OBJS) $(LIBS)
  88. $(AR) rs $@ $^
  89. ../libcarla_standalone.dll: $(OBJS) $(LIBS)
  90. $(CXX) $^ -shared $(LINK_FLAGS) $(W32_LIBS) -Wl,--output-def,$@.def -o $@ && $(STRIP) $@
  91. ../libcarla_standalone.so: $(OBJS) $(LIBS)
  92. $(CXX) $^ -shared $(LINK_FLAGS) -o $@ && $(STRIP) $@
  93. # --------------------------------------------------------------
  94. ../libcarla_%.a:
  95. $(MAKE) -C ../$* $@
  96. ../../libs/%.a:
  97. $(MAKE) -C ../../libs/ $*.a