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.

148 lines
3.4KB

  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 liblo)
  9. # --------------------------------------------------------------
  10. # Common
  11. LIBS = ../libcarla_engine.a
  12. LIBS += ../libcarla_plugin.a
  13. LINK_FLAGS += $(shell pkg-config --libs liblo)
  14. LINK_FLAGS += -lpthread
  15. # --------------------------------------------------------------
  16. # Juce
  17. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  18. LINK_FLAGS += $(JUCE_CORE_LIBS)
  19. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  20. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  21. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  22. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  23. # --------------------------------------------------------------
  24. # Engine
  25. ifeq ($(HAVE_ALSA),true)
  26. LINK_FLAGS += $(shell pkg-config --libs alsa)
  27. endif
  28. ifeq ($(HAVE_PULSEAUDIO),true)
  29. LINK_FLAGS += $(shell pkg-config --libs libpulse-simple)
  30. endif
  31. # --------------------------------------------------------------
  32. # Plugin
  33. ifeq ($(HAVE_FLUIDSYNTH),true)
  34. LINK_FLAGS += $(shell pkg-config --libs fluidsynth)
  35. endif
  36. ifeq ($(HAVE_LINUXSAMPLER),true)
  37. LINK_FLAGS += $(shell pkg-config --libs linuxsampler)
  38. ifeq ($(WIN32),true)
  39. LINK_FLAGS += lrpcrt4
  40. endif
  41. endif
  42. # --------------------------------------------------------------
  43. # Native
  44. ifeq ($(HAVE_AF_DEPS),true)
  45. LINK_FLAGS += $(shell pkg-config --libs sndfile)
  46. ifeq ($(HAVE_FFMPEG),true)
  47. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  48. endif
  49. endif
  50. ifeq ($(HAVE_MF_DEPS),true)
  51. LINK_FLAGS += $(shell pkg-config --libs smf)
  52. endif
  53. ifeq ($(HAVE_ZYN_DEPS),true)
  54. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  55. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  56. LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  57. endif
  58. endif
  59. ifeq ($(HAVE_OPENGL),true)
  60. LINK_FLAGS += $(DGL_LIBS)
  61. endif
  62. # --------------------------------------------------------------
  63. LIBS += ../../modules/carla_native.a
  64. LIBS += ../../modules/juce_audio_basics.a
  65. LIBS += ../../modules/juce_core.a
  66. LIBS += ../../modules/juce_data_structures.a
  67. LIBS += ../../modules/juce_events.a
  68. LIBS += ../../modules/juce_graphics.a
  69. LIBS += ../../modules/juce_gui_basics.a
  70. LIBS += ../../modules/rtmempool.a
  71. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  72. LIBS += ../../modules/lilv.a
  73. endif
  74. ifeq ($(HAVE_OPENGL),true)
  75. LIBS += ../../modules/dgl.a
  76. endif
  77. OBJS = \
  78. CarlaStandalone.cpp.o
  79. ifeq ($(WIN32),true)
  80. TARGET = ../libcarla_standalone.dll
  81. else
  82. ifeq ($(MACOS),true)
  83. TARGET = ../libcarla_standalone.dylib
  84. else
  85. TARGET = ../libcarla_standalone.so
  86. endif
  87. endif
  88. # --------------------------------------------------------------
  89. all: $(TARGET)
  90. clean:
  91. rm -f $(OBJS) $(TARGET)
  92. debug:
  93. $(MAKE) DEBUG=true
  94. # --------------------------------------------------------------
  95. %.cpp.o: %.cpp ../CarlaBackend.hpp ../CarlaEngine.hpp ../CarlaPlugin.hpp ../CarlaHost.hpp
  96. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  97. ../libcarla_standalone.dll: $(OBJS) $(LIBS)
  98. $(CXX) $^ -shared $(LINK_FLAGS) $(W32_LIBS) -Wl,--output-def,$@.def -o $@
  99. ../libcarla_standalone.dylib: $(OBJS) $(LIBS)
  100. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -framework CoreAudio -framework CoreMIDI -framework CoreFoundation -o $@
  101. ../libcarla_standalone.so: $(OBJS) $(LIBS)
  102. $(CXX) $^ $(LINK_FLAGS) -shared -o $@
  103. # --------------------------------------------------------------
  104. .FORCE:
  105. .PHONY: .FORCE
  106. ../libcarla_%.a: .FORCE
  107. $(MAKE) -C ../$*
  108. ../../modules/%.a: .FORCE
  109. $(MAKE) -C ../../modules $*