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.

146 lines
4.4KB

  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 ($(HAVE_CSOUND),true)
  56. LINK_FLAGS += $(CSOUND_LIBS)
  57. endif
  58. ifeq ($(HAVE_FLUIDSYNTH),true)
  59. LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  60. endif
  61. ifeq ($(HAVE_LINUXSAMPLER),true)
  62. LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  63. endif
  64. ifeq ($(HAVE_X11),true)
  65. LINK_FLAGS += $(X11_LIBS)
  66. endif
  67. # ----------------------------------------------------------------------------------------------------------------------------
  68. # Native
  69. STATIC_LIBS += ../../modules/native-plugins.a
  70. ifeq ($(HAVE_AF_DEPS),true)
  71. STATIC_LIBS += ../../modules/audio_decoder.a
  72. endif
  73. LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  74. # ----------------------------------------------------------------------------------------------------------------------------
  75. ifeq ($(WIN32),true)
  76. TARGET = ../libcarla_standalone2.dll
  77. else
  78. ifeq ($(MACOS),true)
  79. TARGET = ../libcarla_standalone2.dylib
  80. else
  81. TARGET = ../libcarla_standalone2.so
  82. endif
  83. endif
  84. # ----------------------------------------------------------------------------------------------------------------------------
  85. all: $(TARGET)
  86. clean:
  87. $(RM) *.o $(TARGET)
  88. debug:
  89. $(MAKE) DEBUG=true
  90. # ----------------------------------------------------------------------------------------------------------------------------
  91. ../libcarla_standalone2.dll: CarlaStandalone.cpp.o $(STATIC_LIBS)
  92. $(CXX) $< -Wl,--start-group $(STATIC_LIBS) -Wl,--end-group $(LINK_FLAGS) $(EXTRA_LIBS) -shared -Wl,--output-def,$@.def -o $@
  93. ../libcarla_standalone2.dylib: CarlaStandalone.cpp.o $(STATIC_LIBS)
  94. $(CXX) $< $(STATIC_LIBS) $(LINK_FLAGS) -dynamiclib -o $@
  95. ../libcarla_standalone2.so: CarlaStandalone.cpp.o $(STATIC_LIBS)
  96. $(CXX) $< -Wl,--start-group $(STATIC_LIBS) -Wl,--end-group $(LINK_FLAGS) -shared -o $@
  97. # ----------------------------------------------------------------------------------------------------------------------------
  98. 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)
  99. $(CXX) $< $(BUILD_CXX_FLAGS) $(QTCORE_FLAGS) -c -o $@
  100. # ----------------------------------------------------------------------------------------------------------------------------
  101. .FORCE:
  102. .PHONY: .FORCE
  103. ../libcarla_%.a: .FORCE
  104. $(MAKE) -C ../$*
  105. ../../modules/%.a: .FORCE
  106. $(MAKE) -C ../../modules $*
  107. # ----------------------------------------------------------------------------------------------------------------------------