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.

Makefile 4.9KB

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