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.

194 lines
4.9KB

  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. ifeq ($(HAVE_AF_DEPS),true)
  55. LINK_FLAGS += $(shell pkg-config --libs sndfile)
  56. ifeq ($(HAVE_FFMPEG),true)
  57. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  58. endif
  59. endif
  60. ifeq ($(HAVE_MF_DEPS),true)
  61. LINK_FLAGS += $(shell pkg-config --libs smf)
  62. endif
  63. ifeq ($(HAVE_ZYN_DEPS),true)
  64. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  65. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  66. LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  67. endif
  68. endif
  69. # --------------------------------------------------------------
  70. # Libs
  71. LIBS += ../backend/carla_engine_plugin.a
  72. LIBS += ../backend/carla_plugin.a
  73. LIBS += ../modules/native-plugins.a
  74. LIBS += ../modules/jackbridge.a
  75. LIBS += ../modules/rtmempool.a
  76. ifeq ($(CARLA_PLUGIN_SUPPORT),true)
  77. LIBS += ../modules/lilv.a
  78. endif
  79. ifeq ($(HAVE_JUCE),true)
  80. LIBS += ../modules/juce_audio_basics.a
  81. LIBS += ../modules/juce_audio_processors.a
  82. LIBS += ../modules/juce_core.a
  83. LIBS += ../modules/juce_data_structures.a
  84. LIBS += ../modules/juce_events.a
  85. LIBS += ../modules/juce_graphics.a
  86. LIBS += ../modules/juce_gui_basics.a
  87. LIBS += ../modules/juce_gui_extra.a
  88. endif
  89. ifeq ($(HAVE_DGL),true)
  90. LIBS += ../modules/dgl.a
  91. endif
  92. # --------------------------------------------------------------
  93. ifeq ($(WIN32),true)
  94. TARGETS = carla-native-lv2-export.exe carla-native.lv2/carla-native.dll
  95. else
  96. ifeq ($(MACOS),true)
  97. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.dylib
  98. else
  99. TARGETS = carla-native-lv2-export carla-native.lv2/carla-native.so
  100. endif
  101. endif
  102. # --------------------------------------------------------------
  103. all: $(TARGETS)
  104. clean:
  105. $(RM) $(TARGETS) *.o
  106. $(RM) carla-native.lv2/*.*
  107. debug:
  108. $(MAKE) DEBUG=true
  109. # --------------------------------------------------------------
  110. carla-native-base.cpp.o: carla-native-base.cpp ../modules/CarlaNative.h
  111. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  112. carla-native-lv2.cpp.o: carla-native-lv2.cpp carla-native-base.cpp ../modules/CarlaNative.h
  113. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  114. carla-native-lv2-export.cpp.o: carla-native-lv2-export.cpp carla-native-base.cpp ../modules/CarlaNative.h
  115. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  116. # --------------------------------------------------------------
  117. carla-native-lv2-export: carla-native-lv2-export.cpp.o $(LIBS)
  118. ifneq ($(MACOS),true)
  119. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
  120. else
  121. $(CXX) $< $(LIBS) $(LINK_FLAGS) -o $@
  122. endif
  123. ./carla-native-lv2-export
  124. carla-native-lv2-export.exe: carla-native-lv2-export.cpp.o $(LIBS)
  125. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group $(LINK_FLAGS) -o $@
  126. ./carla-native-lv2-export.exe
  127. # --------------------------------------------------------------
  128. carla-native.lv2/carla-native.dll: carla-native-lv2.cpp.o $(LIBS)
  129. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
  130. carla-native.lv2/carla-native.dylib: carla-native-lv2.cpp.o $(LIBS)
  131. $(CXX) $< $(LIBS) -dynamiclib $(LINK_FLAGS) -o $@
  132. carla-native.lv2/carla-native.so: carla-native-lv2.cpp.o $(LIBS)
  133. $(CXX) $< -Wl,--start-group $(LIBS) -Wl,--end-group -shared $(LINK_FLAGS) -o $@
  134. # --------------------------------------------------------------
  135. .FORCE:
  136. .PHONY: .FORCE
  137. ../backend/carla_engine_plugin.a: .FORCE
  138. $(MAKE) -C ../backend/engine ../carla_engine_plugin.a
  139. ../backend/carla_plugin.a: .FORCE
  140. $(MAKE) -C ../backend/plugin ../carla_plugin.a
  141. ../modules/%.a: .FORCE
  142. $(MAKE) -C ../modules $*
  143. # --------------------------------------------------------------