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.

189 lines
5.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 += $(shell pkg-config --cflags QtCore QtGui) -I../../widgets
  9. LINK_FLAGS += $(shell pkg-config --libs QtCore QtGui)
  10. # --------------------------------------------------------------
  11. ifeq ($(HAVE_AF_DEPS),true)
  12. AF_C_FLAGS = $(BUILD_C_FLAGS)
  13. AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat sndfile)
  14. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat sndfile)
  15. endif
  16. ifeq ($(HAVE_OPENGL),true)
  17. GL_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  18. GL_CXX_FLAGS += $(shell pkg-config --cflags gl)
  19. LINK_FLAGS += $(shell pkg-config --cflags gl)
  20. endif
  21. ifeq ($(HAVE_ZYN_DEPS),true)
  22. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  23. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  24. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  25. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  26. ZYN_CXX_FLAGS += -DNTK_GUI
  27. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk ntk_images)
  28. LINK_FLAGS += $(shell pkg-config --libs ntk ntk_images)
  29. endif
  30. endif
  31. # --------------------------------------------------------------
  32. # Simple plugins
  33. OBJS = \
  34. bypass.c.o \
  35. midi-sequencer.cpp.o \
  36. midi-split.c.o \
  37. midi-through.c.o \
  38. midi-transpose.c.o \
  39. nekofilter.c.o
  40. # AudioFile
  41. ifeq ($(HAVE_AF_DEPS),true)
  42. OBJS += \
  43. audiofile.c.o
  44. endif
  45. # DISTRHO plugins (OpenGL)
  46. ifeq ($(HAVE_OPENGL),true)
  47. OBJS += \
  48. distrho-3bandeq.cpp.o \
  49. distrho-3bandsplitter.cpp.o \
  50. distrho-pingpongpan.cpp.o
  51. endif
  52. # DISTRHO plugins (Qt)
  53. OBJS += \
  54. distrho-notes.cpp.o
  55. ifeq ($(HAVE_ZYN_DEPS),true)
  56. # ZynAddSubFX
  57. OBJS += \
  58. zynaddsubfx.cpp.o \
  59. zynaddsubfx-src.cpp.o
  60. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  61. OBJS += zynaddsubfx-ui.cpp.o
  62. ZYN_UI_FILES_CPP = \
  63. zynaddsubfx/UI/ADnoteUI.cpp \
  64. zynaddsubfx/UI/BankUI.cpp \
  65. zynaddsubfx/UI/ConfigUI.cpp \
  66. zynaddsubfx/UI/EffUI.cpp \
  67. zynaddsubfx/UI/EnvelopeUI.cpp \
  68. zynaddsubfx/UI/FilterUI.cpp \
  69. zynaddsubfx/UI/LFOUI.cpp \
  70. zynaddsubfx/UI/MasterUI.cpp \
  71. zynaddsubfx/UI/MicrotonalUI.cpp \
  72. zynaddsubfx/UI/OscilGenUI.cpp \
  73. zynaddsubfx/UI/PADnoteUI.cpp \
  74. zynaddsubfx/UI/PartUI.cpp \
  75. zynaddsubfx/UI/PresetsUI.cpp \
  76. zynaddsubfx/UI/ResonanceUI.cpp \
  77. zynaddsubfx/UI/SUBnoteUI.cpp \
  78. zynaddsubfx/UI/VirKeyboard.cpp
  79. ZYN_UI_FILES_H = \
  80. zynaddsubfx/UI/ADnoteUI.h \
  81. zynaddsubfx/UI/BankUI.h \
  82. zynaddsubfx/UI/ConfigUI.h \
  83. zynaddsubfx/UI/EffUI.h \
  84. zynaddsubfx/UI/EnvelopeUI.h \
  85. zynaddsubfx/UI/FilterUI.h \
  86. zynaddsubfx/UI/LFOUI.h \
  87. zynaddsubfx/UI/MasterUI.h \
  88. zynaddsubfx/UI/MicrotonalUI.h \
  89. zynaddsubfx/UI/OscilGenUI.h \
  90. zynaddsubfx/UI/PADnoteUI.h \
  91. zynaddsubfx/UI/PartUI.h \
  92. zynaddsubfx/UI/PresetsUI.h \
  93. zynaddsubfx/UI/ResonanceUI.h \
  94. zynaddsubfx/UI/SUBnoteUI.h \
  95. zynaddsubfx/UI/VirKeyboard.h
  96. endif
  97. endif
  98. SHARED = ../libcarla_native.so
  99. STATIC = ../libcarla_native.a
  100. LIBS = ../../libs/widgets.a
  101. ifeq ($(HAVE_OPENGL),true)
  102. LIBS += ../../libs/dgl.a
  103. endif
  104. # --------------------------------------------------------------
  105. all: $(STATIC)
  106. clean:
  107. rm -f $(OBJS) $(SHARED) $(STATIC)
  108. rm -f $(ZYN_UI_FILES_CPP)
  109. rm -f $(ZYN_UI_FILES_H)
  110. rm -f moc_*.cpp
  111. debug:
  112. $(MAKE) DEBUG=true
  113. # --------------------------------------------------------------
  114. %.c.o: %.c ../CarlaNative.h
  115. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  116. %.cpp.o: %.cpp ../CarlaNative.h ../CarlaNative.hpp
  117. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  118. $(SHARED): $(OBJS) $(LIBS)
  119. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  120. $(STATIC): $(OBJS)
  121. $(AR) rs $@ $^
  122. # --------------------------------------------------------------
  123. audiofile.c.o: audiofile.c
  124. $(CC) $< $(AF_C_FLAGS) -c -o $@
  125. distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/DistrhoArtwork3BandEQ.cpp 3bandeq/DistrhoPlugin3BandEQ.cpp 3bandeq/DistrhoUI3BandEQ.cpp distrho/DistrhoPluginCarla.cpp
  126. $(CXX) $< $(GL_CXX_FLAGS) -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@
  127. distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/DistrhoArtwork3BandSplitter.cpp 3bandsplitter/DistrhoPlugin3BandSplitter.cpp 3bandsplitter/DistrhoUI3BandSplitter.cpp distrho/DistrhoPluginCarla.cpp
  128. $(CXX) $< $(GL_CXX_FLAGS) -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@
  129. distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/DistrhoArtworkPingPongPan.cpp pingpongpan/DistrhoPluginPingPongPan.cpp pingpongpan/DistrhoUIPingPongPan.cpp distrho/DistrhoPluginCarla.cpp
  130. $(CXX) $< $(GL_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@
  131. distrho-notes.cpp.o: distrho-notes.cpp notes/DistrhoPluginNotes.cpp notes/DistrhoUINotes.cpp distrho/DistrhoPluginCarla.cpp moc_DistrhoUINotes.cpp
  132. $(CXX) $< $(BUILD_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@
  133. zynaddsubfx.cpp.o: zynaddsubfx.cpp $(ZYN_UI_FILES)
  134. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  135. zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp
  136. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  137. zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES)
  138. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  139. # --------------------------------------------------------------
  140. moc_DistrhoUINotes.cpp: notes/DistrhoUINotes.hpp
  141. $(MOC) $< -o $@
  142. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  143. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  144. # --------------------------------------------------------------
  145. ../libs/%:
  146. $(MAKE) -C ../libs $*