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.

346 lines
11KB

  1. #!/usr/bin/make -f
  2. # Makefile for native-plugins #
  3. # --------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_C_FLAGS += -I. -I../../includes -isystem ..
  9. BUILD_CXX_FLAGS += -I. -I../../includes -I../../utils -I../distrho -isystem ..
  10. # --------------------------------------------------------------
  11. # Flags for _all.c
  12. ALL_C_FLAGS = $(BUILD_C_FLAGS)
  13. # AudioFile
  14. ifeq ($(HAVE_AF_DEPS),true)
  15. ALL_C_FLAGS += -DWANT_AUDIOFILE
  16. endif
  17. # MidiFile
  18. ifeq ($(HAVE_MF_DEPS),true)
  19. ALL_C_FLAGS += -DWANT_MIDIFILE
  20. endif
  21. # ProjectM
  22. ifeq ($(HAVE_PM_DEPS),true)
  23. ALL_C_FLAGS += -DWANT_PROJECTM
  24. endif
  25. # ZynAddSubFX
  26. ifeq ($(HAVE_ZYN_DEPS),true)
  27. ALL_C_FLAGS += -DWANT_ZYNADDSUBFX
  28. endif
  29. # --------------------------------------------------------------
  30. # Flags for MidiFile
  31. ifeq ($(HAVE_MF_DEPS),true)
  32. MF_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  33. MF_CXX_FLAGS += $(shell pkg-config --cflags smf)
  34. endif
  35. # --------------------------------------------------------------
  36. # Flags for ProjectM
  37. ifeq ($(HAVE_PM_DEPS),true)
  38. PM_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  39. PM_CXX_FLAGS += $(shell pkg-config --cflags libprojectM)
  40. endif
  41. # --------------------------------------------------------------
  42. # Flags for ZynAddSubFX
  43. ifeq ($(HAVE_ZYN_DEPS),true)
  44. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  45. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  46. ifneq ($(MACOS),true)
  47. ZYN_CXX_FLAGS += -DHAVE_SCHEDULER
  48. endif
  49. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  50. ZYN_CXX_FLAGS += -DNTK_GUI -DWANT_ZYNADDSUBFX_UI
  51. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk_images ntk)
  52. endif
  53. endif
  54. # --------------------------------------------------------------
  55. # Set objects
  56. OBJS = _all.c.o
  57. # --------------------------------------------------------------
  58. # Simple plugins
  59. OBJS += \
  60. bypass.c.o \
  61. lfo.c.o \
  62. midi-gain.c.o \
  63. midi-split.c.o \
  64. midi-through.c.o \
  65. midi-transpose.c.o \
  66. nekofilter.c.o
  67. ifneq ($(WIN32),true)
  68. # --------------------------------------------------------------
  69. # External-UI plugins
  70. OBJS += \
  71. bigmeter.cpp.o \
  72. notes.cpp.o
  73. endif
  74. # --------------------------------------------------------------
  75. # DISTRHO plugins
  76. OBJS += \
  77. distrho-3bandeq.cpp.o \
  78. distrho-3bandsplitter.cpp.o \
  79. distrho-pingpongpan.cpp.o \
  80. distrho-nekobi.cpp.o
  81. # distrho-stereoenhancer.cpp.o
  82. OBJS += \
  83. distrho-groovejuice.cpp.o \
  84. distrho-powerjuice.cpp.o \
  85. distrho-segmentjuice.cpp.o \
  86. distrho-vectorjuice.cpp.o \
  87. distrho-wobblejuice.cpp.o
  88. OBJS += \
  89. distrho-zamcomp.cpp.o \
  90. distrho-zamcompx2.cpp.o \
  91. distrho-zameq2.cpp.o \
  92. distrho-zamsynth.cpp.o \
  93. distrho-zamtube.cpp.o \
  94. distrho-zamulticomp.cpp.o \
  95. distrho-zamulticompx2.cpp.o
  96. ifeq ($(HAVE_PM_DEPS),true)
  97. OBJS += \
  98. distrho-prom.cpp.o
  99. endif
  100. ifeq ($(HAVE_JUCE),true)
  101. # --------------------------------------------------------------
  102. # JUCE based plugins
  103. OBJS += \
  104. juce-patchbay.cpp.o \
  105. vex-fx.cpp.o \
  106. vex-synth.cpp.o \
  107. vex-src.cpp.o
  108. endif
  109. # --------------------------------------------------------------
  110. # AudioFile
  111. ifeq ($(HAVE_AF_DEPS),true)
  112. OBJS += audio-file.cpp.o
  113. endif
  114. # --------------------------------------------------------------
  115. # MidiFile
  116. ifeq ($(HAVE_MF_DEPS),true)
  117. OBJS += midi-file.cpp.o
  118. endif
  119. # --------------------------------------------------------------
  120. # ZynAddSubFX
  121. ifeq ($(HAVE_ZYN_DEPS),true)
  122. OBJS += \
  123. zynaddsubfx-fx.cpp.o \
  124. zynaddsubfx-synth.cpp.o \
  125. zynaddsubfx-src.cpp.o
  126. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  127. OBJS += zynaddsubfx-ui.cpp.o
  128. ZYN_UI_FILES_CPP = \
  129. zynaddsubfx/UI/ADnoteUI.cpp \
  130. zynaddsubfx/UI/BankUI.cpp \
  131. zynaddsubfx/UI/ConfigUI.cpp \
  132. zynaddsubfx/UI/EffUI.cpp \
  133. zynaddsubfx/UI/EnvelopeUI.cpp \
  134. zynaddsubfx/UI/FilterUI.cpp \
  135. zynaddsubfx/UI/LFOUI.cpp \
  136. zynaddsubfx/UI/MasterUI.cpp \
  137. zynaddsubfx/UI/MicrotonalUI.cpp \
  138. zynaddsubfx/UI/OscilGenUI.cpp \
  139. zynaddsubfx/UI/PADnoteUI.cpp \
  140. zynaddsubfx/UI/PartUI.cpp \
  141. zynaddsubfx/UI/PresetsUI.cpp \
  142. zynaddsubfx/UI/ResonanceUI.cpp \
  143. zynaddsubfx/UI/SUBnoteUI.cpp \
  144. zynaddsubfx/UI/VirKeyboard.cpp
  145. ZYN_UI_FILES_H = \
  146. zynaddsubfx/UI/ADnoteUI.h \
  147. zynaddsubfx/UI/BankUI.h \
  148. zynaddsubfx/UI/ConfigUI.h \
  149. zynaddsubfx/UI/EffUI.h \
  150. zynaddsubfx/UI/EnvelopeUI.h \
  151. zynaddsubfx/UI/FilterUI.h \
  152. zynaddsubfx/UI/LFOUI.h \
  153. zynaddsubfx/UI/MasterUI.h \
  154. zynaddsubfx/UI/MicrotonalUI.h \
  155. zynaddsubfx/UI/OscilGenUI.h \
  156. zynaddsubfx/UI/PADnoteUI.h \
  157. zynaddsubfx/UI/PartUI.h \
  158. zynaddsubfx/UI/PresetsUI.h \
  159. zynaddsubfx/UI/ResonanceUI.h \
  160. zynaddsubfx/UI/SUBnoteUI.h \
  161. zynaddsubfx/UI/VirKeyboard.h
  162. endif
  163. endif
  164. # --------------------------------------------------------------
  165. all: ../native-plugins.a
  166. # --------------------------------------------------------------
  167. ../native-plugins.a: $(OBJS)
  168. $(RM) $@
  169. $(AR) crs $@ $^
  170. ../libnative-plugins.dll: $(OBJS)
  171. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  172. ../libnative-plugins.dylib: $(OBJS)
  173. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  174. ../libnative-plugins.so: $(OBJS)
  175. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  176. # --------------------------------------------------------------
  177. CDEPS = ../CarlaNative.h
  178. _all.c.o: _all.c $(CDEPS)
  179. $(CC) $< $(ALL_C_FLAGS) -c -o $@
  180. bypass.c.o: bypass.c $(CDEPS)
  181. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  182. lfo.c.o: lfo.c $(CDEPS)
  183. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  184. midi-%.c.o: midi-%.c $(CDEPS)
  185. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  186. nekofilter.c.o: nekofilter.c nekofilter/*.c nekofilter/*.h $(CDEPS)
  187. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  188. # --------------------------------------------------------------
  189. CXXDEPS = ../CarlaNative.h ../CarlaNative.hpp
  190. audio-file.cpp.o: audio-file.cpp audio-base.hpp $(CXXDEPS)
  191. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  192. bigmeter.cpp.o: bigmeter.cpp $(CXXDEPS) ../CarlaNativeExtUI.hpp
  193. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  194. distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/*.cpp 3bandeq/*.h 3bandeq/*.hpp ../distrho/* $(CXXDEPS)
  195. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@
  196. distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/*.cpp 3bandsplitter/*.h 3bandsplitter/*.hpp ../distrho/* $(CXXDEPS)
  197. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@
  198. distrho-nekobi.cpp.o: distrho-nekobi.cpp nekobi/*.cpp nekobi/*.h nekobi/*.hpp nekobi/nekobee-src/*.c nekobi/nekobee-src/*.h ../distrho/* $(CXXDEPS)
  199. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Inekobi -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -c -o $@
  200. distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/*.cpp pingpongpan/*.h pingpongpan/*.hpp ../distrho/* $(CXXDEPS)
  201. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@
  202. distrho-prom.cpp.o: distrho-prom.cpp prom/*.cpp prom/*.h prom/*.hpp ../distrho/* $(CXXDEPS)
  203. $(CXX) $< $(PM_CXX_FLAGS) -I../dgl -Iprom -DDISTRHO_NAMESPACE=DISTRHO_ProM -c -o $@
  204. distrho-stereoenhancer.cpp.o: distrho-stereoenhancer.cpp stereoenhancer/*.cpp stereoenhancer/*.h stereoenhancer/*.hpp ../distrho/* $(CXXDEPS)
  205. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Istereoenhancer -DDISTRHO_NAMESPACE=DISTRHO_StereoEnhancer -c -o $@
  206. distrho-groovejuice.cpp.o: distrho-groovejuice.cpp groovejuice/*.cpp groovejuice/*.h groovejuice/*.hpp groovejuice/*.hxx ../distrho/* $(CXXDEPS)
  207. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Igroovejuice -DDISTRHO_NAMESPACE=DISTRHO_GrooveJuice -c -o $@
  208. distrho-powerjuice.cpp.o: distrho-powerjuice.cpp powerjuice/*.cpp powerjuice/*.h powerjuice/*.hpp ../distrho/* $(CXXDEPS)
  209. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Ipowerjuice -DDISTRHO_NAMESPACE=DISTRHO_PowerJuice -c -o $@
  210. distrho-segmentjuice.cpp.o: distrho-segmentjuice.cpp segmentjuice/*.cpp segmentjuice/*.h segmentjuice/*.hpp segmentjuice/*.hxx ../distrho/* $(CXXDEPS)
  211. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Isegmentjuice -DDISTRHO_NAMESPACE=DISTRHO_SegmentJuice -c -o $@
  212. distrho-vectorjuice.cpp.o: distrho-vectorjuice.cpp vectorjuice/*.cpp vectorjuice/*.h vectorjuice/*.hpp ../distrho/* $(CXXDEPS)
  213. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Ivectorjuice -DDISTRHO_NAMESPACE=DISTRHO_VectorJuice -c -o $@
  214. distrho-wobblejuice.cpp.o: distrho-wobblejuice.cpp wobblejuice/*.cpp wobblejuice/*.h wobblejuice/*.hpp wobblejuice/*.hxx ../distrho/* $(CXXDEPS)
  215. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Iwobblejuice -DDISTRHO_NAMESPACE=DISTRHO_WobbleJuice -c -o $@
  216. distrho-zamcomp.cpp.o: distrho-zamcomp.cpp zamcomp/*.cpp zamcomp/*.h zamcomp/*.hpp ../distrho/* $(CXXDEPS)
  217. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Izamcomp -DDISTRHO_NAMESPACE=DISTRHO_ZamComp -c -o $@
  218. distrho-zamcompx2.cpp.o: distrho-zamcompx2.cpp zamcompx2/*.cpp zamcompx2/*.h zamcompx2/*.hpp ../distrho/* $(CXXDEPS)
  219. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Izamcompx2 -DDISTRHO_NAMESPACE=DISTRHO_ZamCompX2 -c -o $@
  220. distrho-zameq2.cpp.o: distrho-zameq2.cpp zameq2/*.cpp zameq2/*.h zameq2/*.hpp ../distrho/* $(CXXDEPS)
  221. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Izameq2 -DDISTRHO_NAMESPACE=DISTRHO_ZamEQ2 -c -o $@
  222. distrho-zamsynth.cpp.o: distrho-zamsynth.cpp zamsynth/*.cpp zamsynth/*.h zamsynth/*.hpp ../distrho/* $(CXXDEPS)
  223. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Izamsynth -DDISTRHO_NAMESPACE=DISTRHO_ZamSynth -c -o $@
  224. distrho-zamtube.cpp.o: distrho-zamtube.cpp zamtube/*.cpp zamtube/*.h zamtube/*.hpp ../distrho/* $(CXXDEPS)
  225. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Izamtube -DDISTRHO_NAMESPACE=DISTRHO_ZamTube -c -o $@
  226. distrho-zamulticomp.cpp.o: distrho-zamulticomp.cpp zamulticomp/*.cpp zamulticomp/*.h zamulticomp/*.hpp ../distrho/* $(CXXDEPS)
  227. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Izamulticomp -DDISTRHO_NAMESPACE=DISTRHO_ZaMultiComp -c -o $@
  228. distrho-zamulticompx2.cpp.o: distrho-zamulticompx2.cpp zamulticompx2/*.cpp zamulticompx2/*.h zamulticompx2/*.hpp ../distrho/* $(CXXDEPS)
  229. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Izamulticompx2 -DDISTRHO_NAMESPACE=DISTRHO_ZaMultiCompX2 -c -o $@
  230. juce-patchbay.cpp.o: juce-patchbay.cpp
  231. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  232. midi-file.cpp.o: midi-file.cpp midi-base.hpp $(CXXDEPS)
  233. $(CXX) $< $(MF_CXX_FLAGS) -c -o $@
  234. midi-sequencer.cpp.o: midi-sequencer.cpp midi-base.hpp $(CXXDEPS)
  235. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  236. notes.cpp.o: notes.cpp $(CXXDEPS) ../CarlaNativeExtUI.hpp
  237. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  238. vex-%.cpp.o: vex-%.cpp
  239. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  240. zynaddsubfx-%.cpp.o: zynaddsubfx-%.cpp $(CXXDEPS) $(ZYN_UI_FILES_H)
  241. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  242. zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H)
  243. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  244. zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  245. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  246. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  247. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  248. zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl
  249. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  250. # --------------------------------------------------------------
  251. clean:
  252. $(RM) *.o ../native-plugins*.a ../libnative-plugins.*
  253. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  254. $(RM) $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  255. endif
  256. debug:
  257. $(MAKE) DEBUG=true
  258. # --------------------------------------------------------------