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.

226 lines
6.3KB

  1. #!/usr/bin/make -f
  2. # Makefile for carla-native #
  3. # ------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_CXX_FLAGS += -I. -I../../libs/distrho -I../../widgets
  9. ifeq ($(HAVE_QT4),true)
  10. BUILD_CXX_FLAGS += $(shell pkg-config --cflags QtCore QtGui)
  11. else
  12. BUILD_CXX_FLAGS += $(shell pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets)
  13. endif
  14. # --------------------------------------------------------------
  15. ifeq ($(HAVE_AF_DEPS),true)
  16. AF_C_FLAGS = $(BUILD_C_FLAGS)
  17. AF_C_FLAGS += $(shell pkg-config --cflags sndfile)
  18. ifeq ($(HAVE_FFMPEG),true)
  19. AF_C_FLAGS += -DHAVE_FFMPEG
  20. AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil)
  21. endif
  22. endif
  23. ifeq ($(HAVE_MF_DEPS),true)
  24. MF_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  25. MF_CXX_FLAGS += $(shell pkg-config --cflags smf)
  26. endif
  27. ifeq ($(HAVE_OPENGL),true)
  28. GL_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  29. GL_CXX_FLAGS += $(shell pkg-config --cflags gl)
  30. endif
  31. ifeq ($(HAVE_ZYN_DEPS),true)
  32. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  33. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  34. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  35. ZYN_CXX_FLAGS += -DNTK_GUI
  36. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk ntk_images)
  37. endif
  38. endif
  39. # --------------------------------------------------------------
  40. # Simple plugins
  41. OBJS = \
  42. bypass.c.o \
  43. lfo.c.o \
  44. midi-sequencer.cpp.o \
  45. midi-split.c.o \
  46. midi-through.c.o \
  47. midi-transpose.c.o \
  48. nekofilter.c.o \
  49. sunvox-file.cpp.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)
  123. rm -f $(ZYN_UI_FILES_CPP)
  124. rm -f $(ZYN_UI_FILES_H)
  125. rm -f moc_*.cpp
  126. debug:
  127. $(MAKE) DEBUG=true
  128. # --------------------------------------------------------------
  129. CDEPS = ../CarlaNative.h
  130. CXXDEPS = ../CarlaNative.h ../CarlaNative.hpp
  131. $(TARGET): $(OBJS)
  132. $(AR) rs $@ $^
  133. # --------------------------------------------------------------
  134. audio_decoder/%.c.o: audio_decoder/%.c
  135. $(CC) $< $(AF_C_FLAGS) -c -o $@
  136. audio-file.cpp.o: audio-file.cpp audio-base.hpp $(CXXDEPS)
  137. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  138. distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/*.cpp 3bandeq/*.h 3bandeq/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  139. $(CXX) $< $(GL_CXX_FLAGS) -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@
  140. distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/*.cpp 3bandsplitter/*.h 3bandsplitter/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  141. $(CXX) $< $(GL_CXX_FLAGS) -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@
  142. 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)
  143. $(CXX) $< $(GL_CXX_FLAGS) -Inekobi -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -c -o $@
  144. distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/*.cpp pingpongpan/*.h pingpongpan/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  145. $(CXX) $< $(GL_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@
  146. distrho-stereoenhancer.cpp.o: distrho-stereoenhancer.cpp stereoenhancer/*.cpp stereoenhancer/*.h stereoenhancer/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  147. $(CXX) $< $(GL_CXX_FLAGS) -Istereoenhancer -DDISTRHO_NAMESPACE=DISTRHO_StereoEnhancer -c -o $@
  148. distrho-notes.cpp.o: distrho-notes.cpp notes/moc_DistrhoUINotes.cpp notes/*.cpp notes/*.h notes/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  149. $(CXX) $< $(BUILD_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@
  150. midi-file.cpp.o: midi-file.cpp midi-base.hpp $(CXXDEPS)
  151. $(CXX) $< $(MF_CXX_FLAGS) -c -o $@
  152. midi-sequencer.cpp.o: midi-sequencer.cpp midi-base.hpp $(CXXDEPS)
  153. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  154. nekofilter.c.o: nekofilter.c nekofilter/*.c nekofilter/*.h $(CDEPS)
  155. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  156. zynaddsubfx.cpp.o: zynaddsubfx.cpp $(CXXDEPS) $(ZYN_UI_FILES_H)
  157. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  158. zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_CPP)
  159. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  160. zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H)
  161. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  162. # --------------------------------------------------------------
  163. %.c.o: %.c $(CDEPS)
  164. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  165. %.cpp.o: %.cpp $(CXXDEPS)
  166. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  167. moc_%.cpp: %.hpp
  168. $(MOC) $< -DMOC_PARSING -o $@
  169. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  170. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  171. zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl
  172. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  173. # --------------------------------------------------------------
  174. ../libs/%:
  175. $(MAKE) -C ../libs $*