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.

287 lines
9.6KB

  1. #!/usr/bin/make -f
  2. # Makefile for native-plugins #
  3. # --------------------------- #
  4. # Created by falkTX
  5. #
  6. CWD=..
  7. MODULENAME=native-plugins
  8. include ../modules/Makefile.mk
  9. # ----------------------------------------------------------------------------------------------------------------------------
  10. BUILD_C_FLAGS += -I..
  11. BUILD_CXX_FLAGS += -I.. -isystem $(CWD)/modules -I$(CWD)/modules/distrho
  12. # ----------------------------------------------------------------------------------------------------------------------------
  13. # Flags for ZynAddSubFX
  14. ifeq ($(HAVE_ZYN_DEPS),true)
  15. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS) -isystem zynaddsubfx
  16. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  17. ifneq ($(MACOS),true)
  18. ZYN_CXX_FLAGS += -DHAVE_SCHEDULER
  19. endif
  20. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  21. ifeq ($(HAVE_NTK),true)
  22. FLUID = ntk-fluid
  23. ZYN_CXX_FLAGS += -DNTK_GUI
  24. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk_images ntk)
  25. else
  26. FLUID = fluid
  27. ZYN_CXX_FLAGS += -DFLTK_GUI
  28. ZYN_CXX_FLAGS += $(shell fltk-config --use-images --cxxflags)
  29. endif
  30. endif
  31. endif
  32. # ----------------------------------------------------------------------------------------------------------------------------
  33. # Set objects
  34. OBJS = \
  35. $(OBJDIR)/_all.c.o \
  36. $(OBJDIR)/_data.cpp.o
  37. # ----------------------------------------------------------------------------------------------------------------------------
  38. # Simple plugins
  39. OBJS += \
  40. $(OBJDIR)/bypass.c.o \
  41. $(OBJDIR)/lfo.c.o \
  42. $(OBJDIR)/midi-gain.c.o \
  43. $(OBJDIR)/midi-split.c.o \
  44. $(OBJDIR)/midi-through.c.o \
  45. $(OBJDIR)/midi-transpose.c.o \
  46. $(OBJDIR)/nekofilter.c.o
  47. OBJS += \
  48. $(OBJDIR)/audio-file.cpp.o \
  49. $(OBJDIR)/bigmeter.cpp.o \
  50. $(OBJDIR)/midi-file.cpp.o \
  51. $(OBJDIR)/midi-sequencer.cpp.o \
  52. $(OBJDIR)/notes.cpp.o
  53. # ----------------------------------------------------------------------------------------------------------------------------
  54. # DISTRHO plugins
  55. OBJS += \
  56. $(OBJDIR)/distrho-3bandeq.cpp.o \
  57. $(OBJDIR)/distrho-3bandsplitter.cpp.o \
  58. $(OBJDIR)/distrho-mverb.cpp.o \
  59. $(OBJDIR)/distrho-nekobi.cpp.o \
  60. $(OBJDIR)/distrho-pingpongpan.cpp.o
  61. ifeq ($(HAVE_DGL),true)
  62. ifeq ($(HAVE_PROJECTM),true)
  63. OBJS += $(OBJDIR)/distrho-prom.cpp.o
  64. endif
  65. endif
  66. # ----------------------------------------------------------------------------------------------------------------------------
  67. # DISTRHO plugins (Juice)
  68. OBJS += \
  69. $(OBJDIR)/distrho-vectorjuice.cpp.o \
  70. $(OBJDIR)/distrho-wobblejuice.cpp.o
  71. # ----------------------------------------------------------------------------------------------------------------------------
  72. # ZynAddSubFX
  73. ifeq ($(HAVE_ZYN_DEPS),true)
  74. OBJS += \
  75. $(OBJDIR)/zynaddsubfx-fx.cpp.o \
  76. $(OBJDIR)/zynaddsubfx-synth.cpp.o \
  77. $(OBJDIR)/zynaddsubfx-src.cpp.o
  78. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  79. OBJS += \
  80. $(OBJDIR)/zynaddsubfx-ui.cpp.o
  81. ZYN_UI_FILES_CPP = \
  82. zynaddsubfx/UI/ADnoteUI.cpp \
  83. zynaddsubfx/UI/BankUI.cpp \
  84. zynaddsubfx/UI/ConfigUI.cpp \
  85. zynaddsubfx/UI/EffUI.cpp \
  86. zynaddsubfx/UI/EnvelopeUI.cpp \
  87. zynaddsubfx/UI/FilterUI.cpp \
  88. zynaddsubfx/UI/LFOUI.cpp \
  89. zynaddsubfx/UI/MasterUI.cpp \
  90. zynaddsubfx/UI/MicrotonalUI.cpp \
  91. zynaddsubfx/UI/OscilGenUI.cpp \
  92. zynaddsubfx/UI/PADnoteUI.cpp \
  93. zynaddsubfx/UI/PartUI.cpp \
  94. zynaddsubfx/UI/PresetsUI.cpp \
  95. zynaddsubfx/UI/ResonanceUI.cpp \
  96. zynaddsubfx/UI/SUBnoteUI.cpp \
  97. zynaddsubfx/UI/VirKeyboard.cpp
  98. ZYN_UI_FILES_H = \
  99. zynaddsubfx/UI/ADnoteUI.h \
  100. zynaddsubfx/UI/BankUI.h \
  101. zynaddsubfx/UI/ConfigUI.h \
  102. zynaddsubfx/UI/EffUI.h \
  103. zynaddsubfx/UI/EnvelopeUI.h \
  104. zynaddsubfx/UI/FilterUI.h \
  105. zynaddsubfx/UI/LFOUI.h \
  106. zynaddsubfx/UI/MasterUI.h \
  107. zynaddsubfx/UI/MicrotonalUI.h \
  108. zynaddsubfx/UI/OscilGenUI.h \
  109. zynaddsubfx/UI/PADnoteUI.h \
  110. zynaddsubfx/UI/PartUI.h \
  111. zynaddsubfx/UI/PresetsUI.h \
  112. zynaddsubfx/UI/ResonanceUI.h \
  113. zynaddsubfx/UI/SUBnoteUI.h \
  114. zynaddsubfx/UI/VirKeyboard.h
  115. endif
  116. endif
  117. # ----------------------------------------------------------------------------------------------------------------------------
  118. # Experimental plugins
  119. ifeq ($(EXPERIMENTAL_PLUGINS),true)
  120. OBJS += \
  121. $(OBJDIR)/zita-at1.cpp.o \
  122. $(OBJDIR)/zita-bls1.cpp.o \
  123. $(OBJDIR)/zita-rev1.cpp.o
  124. endif
  125. # ----------------------------------------------------------------------------------------------------------------------------
  126. all: $(MODULEDIR)/$(MODULENAME).a
  127. # ----------------------------------------------------------------------------------------------------------------------------
  128. clean:
  129. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  130. debug:
  131. $(MAKE) DEBUG=true
  132. # ----------------------------------------------------------------------------------------------------------------------------
  133. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  134. -@mkdir -p $(MODULEDIR)
  135. @echo "Creating $(MODULENAME).a"
  136. @rm -f $@
  137. @$(AR) crs $@ $^
  138. # ----------------------------------------------------------------------------------------------------------------------------
  139. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  140. @echo "Generating $@/h"
  141. @$(FLUID) -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  142. zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl
  143. @echo "Generating $@/cpp"
  144. @$(FLUID) -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  145. # ----------------------------------------------------------------------------------------------------------------------------
  146. $(OBJDIR)/_all.c.o: _all.c
  147. -@mkdir -p $(OBJDIR)
  148. @echo "Compiling $<"
  149. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  150. $(OBJDIR)/%.c.o: %.c
  151. -@mkdir -p $(OBJDIR)
  152. @echo "Compiling $<"
  153. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  154. # ----------------------------------------------------------------------------------------------------------------------------
  155. $(OBJDIR)/distrho-3bandeq.cpp.o: distrho-3bandeq.cpp
  156. -@mkdir -p $(OBJDIR)
  157. @echo "Compiling $<"
  158. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -Idistrho-3bandeq -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  159. $(OBJDIR)/distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp
  160. -@mkdir -p $(OBJDIR)
  161. @echo "Compiling $<"
  162. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -Idistrho-3bandsplitter -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  163. $(OBJDIR)/distrho-mverb.cpp.o: distrho-mverb.cpp
  164. -@mkdir -p $(OBJDIR)
  165. # FIXME - fix mverb strict warnings
  166. @echo "Compiling $<"
  167. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_MVerb -Idistrho-mverb -I$(CWD)/modules/dgl -Wno-conversion -Wno-effc++ -Wno-shadow -c -o $@
  168. $(OBJDIR)/distrho-nekobi.cpp.o: distrho-nekobi.cpp
  169. -@mkdir -p $(OBJDIR)
  170. # FIXME - fix nekobi strict warnings
  171. @echo "Compiling $<"
  172. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -Idistrho-nekobi -I$(CWD)/modules/dgl -w -c -o $@
  173. $(OBJDIR)/distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp
  174. -@mkdir -p $(OBJDIR)
  175. @echo "Compiling $<"
  176. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -Idistrho-pingpongpan -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  177. $(OBJDIR)/distrho-prom.cpp.o: distrho-prom.cpp
  178. -@mkdir -p $(OBJDIR)
  179. @echo "Compiling $<"
  180. @$(CXX) $< $(BUILD_CXX_FLAGS) $(PROJECTM_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_ProM -Idistrho-prom -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  181. # ----------------------------------------------------------------------------------------------------------------------------
  182. $(OBJDIR)/distrho-vectorjuice.cpp.o: distrho-vectorjuice.cpp
  183. -@mkdir -p $(OBJDIR)
  184. @echo "Compiling $<"
  185. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_VectorJuice -Idistrho-vectorjuice -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  186. $(OBJDIR)/distrho-wobblejuice.cpp.o: distrho-wobblejuice.cpp
  187. -@mkdir -p $(OBJDIR)
  188. @echo "Compiling $<"
  189. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_WobbleJuice -Idistrho-wobblejuice -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  190. # ----------------------------------------------------------------------------------------------------------------------------
  191. $(OBJDIR)/zynaddsubfx-fx.cpp.o: zynaddsubfx-fx.cpp $(ZYN_UI_FILES_H)
  192. -@mkdir -p $(OBJDIR)
  193. @echo "Compiling $<"
  194. @$(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  195. $(OBJDIR)/zynaddsubfx-synth.cpp.o: zynaddsubfx-synth.cpp $(ZYN_UI_FILES_H)
  196. -@mkdir -p $(OBJDIR)
  197. @echo "Compiling $<"
  198. @$(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  199. $(OBJDIR)/zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H)
  200. -@mkdir -p $(OBJDIR)
  201. @echo "Compiling $<"
  202. @$(CXX) $< $(ZYN_CXX_FLAGS) -w -c -o $@
  203. $(OBJDIR)/zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  204. -@mkdir -p $(OBJDIR)
  205. @echo "Compiling $<"
  206. @$(CXX) $< $(ZYN_CXX_FLAGS) -w -c -o $@
  207. # ----------------------------------------------------------------------------------------------------------------------------
  208. $(OBJDIR)/zita-at1.cpp.o: zita-at1.cpp
  209. -@mkdir -p $(OBJDIR)
  210. @echo "Compiling $<"
  211. @$(CXX) $< $(BUILD_CXX_FLAGS) $(shell pkg-config --cflags fftw3f x11 xft) -Wno-unused-parameter -Wno-unused-result -c -o $@
  212. $(OBJDIR)/zita-bls1.cpp.o: zita-bls1.cpp
  213. -@mkdir -p $(OBJDIR)
  214. @echo "Compiling $<"
  215. @$(CXX) $< $(BUILD_CXX_FLAGS) $(shell pkg-config --cflags cairo fftw3f libpng12 x11 xft) -Wno-unused-parameter -Wno-unused-result -c -o $@
  216. $(OBJDIR)/zita-rev1.cpp.o: zita-rev1.cpp
  217. -@mkdir -p $(OBJDIR)
  218. @echo "Compiling $<"
  219. @$(CXX) $< $(BUILD_CXX_FLAGS) $(shell pkg-config --cflags fftw3f x11 xft) -Wno-unused-parameter -Wno-unused-result -c -o $@
  220. # ----------------------------------------------------------------------------------------------------------------------------
  221. $(OBJDIR)/%.cpp.o: %.cpp
  222. -@mkdir -p $(OBJDIR)
  223. @echo "Compiling $<"
  224. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  225. # ----------------------------------------------------------------------------------------------------------------------------
  226. -include $(OBJS:%.o=%.d)
  227. # ----------------------------------------------------------------------------------------------------------------------------