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.

182 lines
4.6KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla plugin exports #
  3. # --------------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. BUILD_CXX_FLAGS += -I../backend -I../includes -I../utils -isystem ../modules
  8. # --------------------------------------------------------------
  9. ifeq ($(HAVE_AF_DEPS),true)
  10. BUILD_CXX_FLAGS += -DWANT_AUDIOFILE
  11. endif
  12. ifeq ($(HAVE_MF_DEPS),true)
  13. BUILD_CXX_FLAGS += -DWANT_MIDIFILE
  14. endif
  15. ifeq ($(HAVE_ZYN_DEPS),true)
  16. BUILD_CXX_FLAGS += -DWANT_ZYNADDSUBFX
  17. endif
  18. # --------------------------------------------------------------
  19. # Common
  20. LINK_FLAGS += $(LIBLO_LIBS)
  21. LINK_FLAGS += $(QTCORE_LIBS)
  22. LINK_FLAGS += $(QTXML_LIBS)
  23. LINK_FLAGS += $(RTMEMPOOL_LIBS)
  24. # --------------------------------------------------------------
  25. # Engine
  26. LINK_FLAGS += $(JACKBRIDGE_LIBS)
  27. # --------------------------------------------------------------
  28. # Plugin
  29. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  30. LINK_FLAGS += $(LILV_LIBS)
  31. endif
  32. ifeq ($(HAVE_FLUIDSYNTH),true)
  33. LINK_FLAGS += $(FLUIDSYNTH_LIBS)
  34. endif
  35. ifeq ($(HAVE_LINUXSAMPLER),true)
  36. LINK_FLAGS += $(LINUXSAMPLER_LIBS)
  37. endif
  38. # --------------------------------------------------------------
  39. # Coomon
  40. ifeq ($(HAVE_DGL),true)
  41. LINK_FLAGS += $(DGL_LIBS)
  42. endif
  43. ifeq ($(HAVE_JUCE),true)
  44. LINK_FLAGS += $(JUCE_AUDIO_BASICS_LIBS)
  45. LINK_FLAGS += $(JUCE_CORE_LIBS)
  46. LINK_FLAGS += $(JUCE_DATA_STRUCTURES_LIBS)
  47. LINK_FLAGS += $(JUCE_EVENTS_LIBS)
  48. LINK_FLAGS += $(JUCE_GRAPHICS_LIBS)
  49. LINK_FLAGS += $(JUCE_GUI_BASICS_LIBS)
  50. LINK_FLAGS += $(JUCE_GUI_EXTRA_LIBS)
  51. endif
  52. # --------------------------------------------------------------
  53. # Native
  54. LINK_FLAGS += $(NATIVE_PLUGINS_LIBS)
  55. # --------------------------------------------------------------
  56. # Libs
  57. LIBS += ../backend/carla_engine_plugin.a
  58. LIBS += ../backend/carla_plugin.a
  59. LIBS += ../modules/native-plugins.a
  60. LIBS += ../modules/jackbridge.a
  61. LIBS += ../modules/rtmempool.a
  62. ifeq ($(HAVE_AF_DEPS),true)
  63. LIBS += ../modules/audio_decoder.a
  64. endif
  65. ifeq ($(HAVE_DGL),true)
  66. LIBS += ../modules/dgl.a
  67. endif
  68. ifeq ($(HAVE_JUCE),true)
  69. LIBS += ../modules/juce_audio_basics.a
  70. LIBS += ../modules/juce_audio_processors.a
  71. LIBS += ../modules/juce_core.a
  72. LIBS += ../modules/juce_data_structures.a
  73. LIBS += ../modules/juce_events.a
  74. LIBS += ../modules/juce_graphics.a
  75. LIBS += ../modules/juce_gui_basics.a
  76. LIBS += ../modules/juce_gui_extra.a
  77. endif
  78. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  79. LIBS += ../modules/lilv.a
  80. endif
  81. # --------------------------------------------------------------
  82. ifeq ($(WIN32),true)
  83. TARGETS = carla-native-lv2-export.exe carla-native.lv2/carla-native.dll
  84. else
  85. ifeq ($(MACOS),true)
  86. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.dylib
  87. else
  88. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.so
  89. endif
  90. endif
  91. # --------------------------------------------------------------
  92. all: $(TARGETS)
  93. clean:
  94. $(RM) $(TARGETS) *.o
  95. $(RM) carla-native.lv2/*.*
  96. debug:
  97. $(MAKE) DEBUG=true
  98. # --------------------------------------------------------------
  99. carla-native-base.cpp.o: carla-native-base.cpp ../modules/CarlaNative.h
  100. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  101. carla-native-lv2.cpp.o: carla-native-lv2.cpp carla-native-base.cpp ../modules/CarlaNative.h
  102. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  103. carla-native-lv2-export.cpp.o: carla-native-lv2-export.cpp carla-native-base.cpp ../modules/CarlaNative.h
  104. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  105. # --------------------------------------------------------------
  106. carla-native-lv2-export: carla-native-lv2-export.cpp.o $(LIBS)
  107. ifneq ($(MACOS),true)
  108. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
  109. else
  110. $(CXX) $< $(LIBS) $(LINK_FLAGS) -o $@
  111. endif
  112. ./carla-native-lv2-export
  113. carla-native-lv2-export.exe: carla-native-lv2-export.cpp.o $(LIBS)
  114. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
  115. ./carla-native-lv2-export.exe
  116. # --------------------------------------------------------------
  117. carla-native.lv2/carla-native.dll: carla-native-lv2.cpp.o $(LIBS)
  118. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
  119. carla-native.lv2/carla-native.dylib: carla-native-lv2.cpp.o $(LIBS)
  120. $(CXX) $< $(LIBS) -dynamiclib $(LINK_FLAGS) -o $@
  121. carla-native.lv2/carla-native.so: carla-native-lv2.cpp.o $(LIBS)
  122. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
  123. # --------------------------------------------------------------
  124. .FORCE:
  125. .PHONY: .FORCE carla-native-lv2-export
  126. ../backend/carla_engine_plugin.a: .FORCE
  127. $(MAKE) -C ../backend/engine ../carla_engine_plugin.a
  128. ../backend/carla_plugin.a: .FORCE
  129. $(MAKE) -C ../backend/plugin ../carla_plugin.a
  130. ../modules/%.a: .FORCE
  131. $(MAKE) -C ../modules $*
  132. # --------------------------------------------------------------