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.

223 lines
6.3KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-native #
  3. # ------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. ifeq ($(HAVE_QT4),true)
  8. BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui)
  9. else
  10. BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  11. endif
  12. # --------------------------------------------------------------
  13. ifeq ($(HAVE_AF_DEPS),true)
  14. AF_C_FLAGS = $(BUILD_C_FLAGS)
  15. AF_C_FLAGS += $(shell pkg-config --cflags sndfile)
  16. ifeq ($(HAVE_FFMPEG),true)
  17. AF_C_FLAGS += -DHAVE_FFMPEG
  18. AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil)
  19. endif
  20. endif
  21. ifeq ($(HAVE_MF_DEPS),true)
  22. MF_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  23. MF_CXX_FLAGS += $(shell pkg-config --cflags smf)
  24. endif
  25. ifeq ($(HAVE_OPENGL),true)
  26. GL_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  27. GL_CXX_FLAGS += -I../../modules/distrho
  28. GL_CXX_FLAGS += $(shell pkg-config --cflags gl)
  29. endif
  30. QT_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  31. QT_CXX_FLAGS += -I../../modules/distrho -I../../modules/widgets
  32. ifeq ($(HAVE_ZYN_DEPS),true)
  33. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  34. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  35. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  36. ZYN_CXX_FLAGS += -DNTK_GUI
  37. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk ntk_images)
  38. endif
  39. endif
  40. # --------------------------------------------------------------
  41. # Simple plugins
  42. OBJS = \
  43. bypass.c.o \
  44. lfo.c.o \
  45. midi-sequencer.cpp.o \
  46. midi-split.c.o \
  47. midi-through.c.o \
  48. midi-transpose.c.o \
  49. nekofilter.c.o
  50. # AudioFile
  51. ifeq ($(HAVE_AF_DEPS),true)
  52. OBJS += \
  53. audio-file.cpp.o \
  54. audio_decoder/ad_ffmpeg.c.o \
  55. audio_decoder/ad_plugin.c.o \
  56. audio_decoder/ad_soundfile.c.o
  57. endif
  58. # MidiFile
  59. ifeq ($(HAVE_MF_DEPS),true)
  60. OBJS += \
  61. midi-file.cpp.o
  62. endif
  63. # DISTRHO plugins (OpenGL)
  64. ifeq ($(HAVE_OPENGL),true)
  65. OBJS += \
  66. distrho-3bandeq.cpp.o \
  67. distrho-3bandsplitter.cpp.o \
  68. distrho-nekobi.cpp.o \
  69. distrho-pingpongpan.cpp.o \
  70. distrho-stereoenhancer.cpp.o
  71. endif
  72. # DISTRHO plugins (Qt)
  73. OBJS += \
  74. distrho-notes.cpp.o
  75. ifeq ($(HAVE_ZYN_DEPS),true)
  76. # ZynAddSubFX
  77. OBJS += \
  78. zynaddsubfx.cpp.o \
  79. zynaddsubfx-src.cpp.o
  80. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  81. OBJS += zynaddsubfx-ui.cpp.o
  82. ZYN_UI_FILES_CPP = \
  83. zynaddsubfx/UI/ADnoteUI.cpp \
  84. zynaddsubfx/UI/BankUI.cpp \
  85. zynaddsubfx/UI/ConfigUI.cpp \
  86. zynaddsubfx/UI/EffUI.cpp \
  87. zynaddsubfx/UI/EnvelopeUI.cpp \
  88. zynaddsubfx/UI/FilterUI.cpp \
  89. zynaddsubfx/UI/LFOUI.cpp \
  90. zynaddsubfx/UI/MasterUI.cpp \
  91. zynaddsubfx/UI/MicrotonalUI.cpp \
  92. zynaddsubfx/UI/OscilGenUI.cpp \
  93. zynaddsubfx/UI/PADnoteUI.cpp \
  94. zynaddsubfx/UI/PartUI.cpp \
  95. zynaddsubfx/UI/PresetsUI.cpp \
  96. zynaddsubfx/UI/ResonanceUI.cpp \
  97. zynaddsubfx/UI/SUBnoteUI.cpp \
  98. zynaddsubfx/UI/VirKeyboard.cpp
  99. ZYN_UI_FILES_H = \
  100. zynaddsubfx/UI/ADnoteUI.h \
  101. zynaddsubfx/UI/BankUI.h \
  102. zynaddsubfx/UI/ConfigUI.h \
  103. zynaddsubfx/UI/EffUI.h \
  104. zynaddsubfx/UI/EnvelopeUI.h \
  105. zynaddsubfx/UI/FilterUI.h \
  106. zynaddsubfx/UI/LFOUI.h \
  107. zynaddsubfx/UI/MasterUI.h \
  108. zynaddsubfx/UI/MicrotonalUI.h \
  109. zynaddsubfx/UI/OscilGenUI.h \
  110. zynaddsubfx/UI/PADnoteUI.h \
  111. zynaddsubfx/UI/PartUI.h \
  112. zynaddsubfx/UI/PresetsUI.h \
  113. zynaddsubfx/UI/ResonanceUI.h \
  114. zynaddsubfx/UI/SUBnoteUI.h \
  115. zynaddsubfx/UI/VirKeyboard.h
  116. endif
  117. endif
  118. TARGET = ../libcarla_native.a
  119. # --------------------------------------------------------------
  120. all: $(TARGET)
  121. clean:
  122. rm -f $(OBJS) $(TARGET) $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  123. rm -f moc_*.cpp
  124. debug:
  125. $(MAKE) DEBUG=true
  126. # --------------------------------------------------------------
  127. CDEPS = ../CarlaNative.h
  128. CXXDEPS = ../CarlaNative.h ../CarlaNative.hpp
  129. $(TARGET): $(OBJS)
  130. $(AR) rs $@ $^
  131. # --------------------------------------------------------------
  132. audio_decoder/%.c.o: audio_decoder/%.c
  133. $(CC) $< $(AF_C_FLAGS) -c -o $@
  134. audio-file.cpp.o: audio-file.cpp audio-base.hpp $(CXXDEPS)
  135. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  136. distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/*.cpp 3bandeq/*.h 3bandeq/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  137. $(CXX) $< $(GL_CXX_FLAGS) -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@
  138. distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/*.cpp 3bandsplitter/*.h 3bandsplitter/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  139. $(CXX) $< $(GL_CXX_FLAGS) -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@
  140. distrho-nekobi.cpp.o: distrho-nekobi.cpp nekobi/*.cpp nekobi/*.h nekobi/*.hpp nekobi/nekobee-src/*.c nekobi/nekobee-src/*.h distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  141. $(CXX) $< $(GL_CXX_FLAGS) -Inekobi -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -c -o $@
  142. distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/*.cpp pingpongpan/*.h pingpongpan/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  143. $(CXX) $< $(GL_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@
  144. distrho-stereoenhancer.cpp.o: distrho-stereoenhancer.cpp stereoenhancer/*.cpp stereoenhancer/*.h stereoenhancer/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  145. $(CXX) $< $(GL_CXX_FLAGS) -Istereoenhancer -DDISTRHO_NAMESPACE=DISTRHO_StereoEnhancer -c -o $@
  146. distrho-notes.cpp.o: distrho-notes.cpp notes/moc_DistrhoUINotes.cpp notes/*.cpp notes/*.h notes/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  147. $(CXX) $< $(QT_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@
  148. midi-file.cpp.o: midi-file.cpp midi-base.hpp $(CXXDEPS)
  149. $(CXX) $< $(MF_CXX_FLAGS) -c -o $@
  150. midi-sequencer.cpp.o: midi-sequencer.cpp midi-base.hpp $(CXXDEPS)
  151. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  152. nekofilter.c.o: nekofilter.c nekofilter/*.c nekofilter/*.h $(CDEPS)
  153. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  154. zynaddsubfx.cpp.o: zynaddsubfx.cpp $(CXXDEPS) $(ZYN_UI_FILES_H)
  155. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  156. zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  157. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  158. zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H)
  159. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  160. # --------------------------------------------------------------
  161. %.c.o: %.c
  162. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  163. %.cpp.o: %.cpp
  164. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  165. moc_%.cpp: %.hpp
  166. $(MOC) $< -DMOC_PARSING -o $@
  167. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  168. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  169. zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl
  170. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  171. # --------------------------------------------------------------
  172. ../libs/%:
  173. $(MAKE) -C ../libs $*