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.

151 lines
4.7KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-standalone #
  3. # ----------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # ----------------------------------------------------------------------------------------------------------------------------
  8. # Base
  9. LINK_FLAGS += $(LIBLO_LIBS)
  10. LINK_FLAGS += $(QTCORE_LIBS)
  11. LINK_FLAGS += $(QTXML_LIBS)
  12. # ----------------------------------------------------------------------------------------------------------------------------
  13. # Common
  14. STATIC_LIBS = ../carla_engine.a
  15. STATIC_LIBS += ../carla_plugin.a
  16. STATIC_LIBS += ../../modules/jackbridge.a
  17. STATIC_LIBS += ../../modules/rtmempool.a
  18. LINK_FLAGS += $(JACKBRIDGE_LIBS)
  19. LINK_FLAGS += $(RTMEMPOOL_LIBS)
  20. ifeq ($(HAVE_JUCE),true)
  21. STATIC_LIBS += ../../modules/juce_audio_basics.a
  22. STATIC_LIBS += ../../modules/juce_audio_devices.a
  23. STATIC_LIBS += ../../modules/juce_audio_processors.a
  24. STATIC_LIBS += ../../modules/juce_core.a
  25. STATIC_LIBS += ../../modules/juce_data_structures.a
  26. STATIC_LIBS += ../../modules/juce_events.a
  27. STATIC_LIBS += ../../modules/juce_graphics.a
  28. STATIC_LIBS += ../../modules/juce_gui_basics.a
  29. STATIC_LIBS += ../../modules/juce_gui_extra.a
  30. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  31. LINK_FLAGS += $(JUCE_AUDIO_DEVICES_LIBS)
  32. LINK_FLAGS += $(JUCE_CORE_LIBS)
  33. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  34. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  35. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  36. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  37. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  38. endif
  39. ifeq ($(HAVE_DGL),true)
  40. STATIC_LIBS += ../../modules/dgl.a
  41. LINK_FLAGS += $(DGL_LIBS)
  42. endif
  43. # ----------------------------------------------------------------------------------------------------------------------------
  44. # Engine
  45. STATIC_LIBS += ../../modules/rtaudio.a
  46. STATIC_LIBS += ../../modules/rtmidi.a
  47. LINK_FLAGS += $(RTAUDIO_LIBS)
  48. LINK_FLAGS += $(RTMIDI_LIBS)
  49. # ----------------------------------------------------------------------------------------------------------------------------
  50. # Plugin
  51. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  52. STATIC_LIBS += ../../modules/lilv.a
  53. LINK_FLAGS += $(LILV_LIBS)
  54. endif
  55. ifeq ($(CARLA_CSOUND_SUPPORT),true)
  56. LINK_FLAGS += $(CSOUND_LIBS)
  57. endif
  58. ifeq ($(CARLA_SAMPLERS_SUPPORT),true)
  59. LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  60. LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  61. endif
  62. # ----------------------------------------------------------------------------------------------------------------------------
  63. # Native
  64. STATIC_LIBS += ../../modules/daz-plugins.a
  65. ifeq ($(HAVE_AF_DEPS),true)
  66. LINK_FLAGS += $(shell pkg-config --libs sndfile)
  67. ifeq ($(HAVE_FFMPEG),true)
  68. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  69. endif
  70. endif
  71. ifeq ($(HAVE_MF_DEPS),true)
  72. LINK_FLAGS += $(shell pkg-config --libs smf)
  73. endif
  74. ifeq ($(HAVE_ZYN_DEPS),true)
  75. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  76. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  77. LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  78. endif
  79. endif
  80. # ----------------------------------------------------------------------------------------------------------------------------
  81. ifeq ($(WIN32),true)
  82. TARGET = ../libcarla_standalone2.dll
  83. else
  84. ifeq ($(MACOS),true)
  85. TARGET = ../libcarla_standalone2.dylib
  86. else
  87. TARGET = ../libcarla_standalone2.so
  88. endif
  89. endif
  90. # ----------------------------------------------------------------------------------------------------------------------------
  91. all: $(TARGET)
  92. clean:
  93. $(RM) *.o $(TARGET)
  94. debug:
  95. $(MAKE) DEBUG=true
  96. # ----------------------------------------------------------------------------------------------------------------------------
  97. ../libcarla_standalone2.dll: CarlaStandalone.cpp.o $(STATIC_LIBS)
  98. $(CXX) $< -Wl,--start-group $(STATIC_LIBS) -Wl,--end-group $(LINK_FLAGS) $(EXTRA_LIBS) -shared -Wl,--output-def,$@.def -o $@
  99. ../libcarla_standalone2.dylib: CarlaStandalone.cpp.o $(STATIC_LIBS)
  100. $(CXX) $< $(STATIC_LIBS) $(LINK_FLAGS) -dynamiclib -o $@
  101. ../libcarla_standalone2.so: CarlaStandalone.cpp.o $(STATIC_LIBS)
  102. $(CXX) $< -Wl,--start-group $(STATIC_LIBS) -Wl,--end-group $(LINK_FLAGS) -shared -o $@
  103. # ----------------------------------------------------------------------------------------------------------------------------
  104. CarlaStandalone.cpp.o: CarlaStandalone.cpp $(CARLA_HOST_H) $(CARLA_MIDI_H) $(CARLA_NATIVE_H) $(CARLA_ENGINE_HPP) $(CARLA_PLUGIN_HPP) $(CARLA_BACKEND_UTILS_HPP) $(CARLA_THREAD_HPP) $(CARLA_STATE_UTILS_CPP)
  105. $(CXX) $< $(BUILD_CXX_FLAGS) $(QTCORE_FLAGS) -c -o $@
  106. # ----------------------------------------------------------------------------------------------------------------------------
  107. .FORCE:
  108. .PHONY: .FORCE
  109. ../libcarla_%.a: .FORCE
  110. $(MAKE) -C ../$*
  111. ../../modules/%.a: .FORCE
  112. $(MAKE) -C ../../modules $*
  113. # ----------------------------------------------------------------------------------------------------------------------------