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.

268 lines
7.1KB

  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. # ZynAddSubFX
  22. ifeq ($(HAVE_ZYN_DEPS),true)
  23. ALL_C_FLAGS += -DWANT_ZYNADDSUBFX
  24. endif
  25. # --------------------------------------------------------------
  26. # Flags for MidiFile
  27. ifeq ($(HAVE_MF_DEPS),true)
  28. MF_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  29. MF_CXX_FLAGS += $(shell pkg-config --cflags smf)
  30. endif
  31. # --------------------------------------------------------------
  32. # Flags for ZynAddSubFX
  33. ifeq ($(HAVE_ZYN_DEPS),true)
  34. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  35. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  36. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  37. ZYN_CXX_FLAGS += -DNTK_GUI -DWANT_ZYNADDSUBFX_UI
  38. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk_images ntk)
  39. endif
  40. endif
  41. # --------------------------------------------------------------
  42. # Set objects
  43. OBJS = _all.c.o
  44. # --------------------------------------------------------------
  45. # Simple plugins
  46. OBJS += \
  47. bypass.c.o \
  48. lfo.c.o \
  49. midi-gain.c.o \
  50. midi-split.c.o \
  51. midi-through.c.o \
  52. midi-transpose.c.o \
  53. nekofilter.c.o
  54. ifneq ($(WIN32),true)
  55. # --------------------------------------------------------------
  56. # External-UI plugins
  57. OBJS += \
  58. bigmeter.cpp.o \
  59. notes.cpp.o
  60. endif
  61. # --------------------------------------------------------------
  62. # DISTRHO plugins
  63. OBJS += \
  64. distrho-3bandeq.cpp.o \
  65. distrho-3bandsplitter.cpp.o \
  66. distrho-pingpongpan.cpp.o \
  67. distrho-nekobi.cpp.o
  68. # distrho-stereoenhancer.cpp.o
  69. ifeq ($(HAVE_JUCE),true)
  70. # --------------------------------------------------------------
  71. # JUCE based plugins
  72. OBJS += \
  73. juce-patchbay.cpp.o \
  74. vex-fx.cpp.o \
  75. vex-synth.cpp.o \
  76. vex-src.cpp.o
  77. endif
  78. # --------------------------------------------------------------
  79. # AudioFile
  80. ifeq ($(HAVE_AF_DEPS),true)
  81. OBJS += audio-file.cpp.o
  82. endif
  83. # --------------------------------------------------------------
  84. # MidiFile
  85. ifeq ($(HAVE_MF_DEPS),true)
  86. OBJS += midi-file.cpp.o
  87. endif
  88. # --------------------------------------------------------------
  89. # ZynAddSubFX
  90. ifeq ($(HAVE_ZYN_DEPS),true)
  91. OBJS += \
  92. zynaddsubfx-fx.cpp.o \
  93. zynaddsubfx-synth.cpp.o \
  94. zynaddsubfx-src.cpp.o
  95. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  96. OBJS += zynaddsubfx-ui.cpp.o
  97. ZYN_UI_FILES_CPP = \
  98. zynaddsubfx/UI/ADnoteUI.cpp \
  99. zynaddsubfx/UI/BankUI.cpp \
  100. zynaddsubfx/UI/ConfigUI.cpp \
  101. zynaddsubfx/UI/EffUI.cpp \
  102. zynaddsubfx/UI/EnvelopeUI.cpp \
  103. zynaddsubfx/UI/FilterUI.cpp \
  104. zynaddsubfx/UI/LFOUI.cpp \
  105. zynaddsubfx/UI/MasterUI.cpp \
  106. zynaddsubfx/UI/MicrotonalUI.cpp \
  107. zynaddsubfx/UI/OscilGenUI.cpp \
  108. zynaddsubfx/UI/PADnoteUI.cpp \
  109. zynaddsubfx/UI/PartUI.cpp \
  110. zynaddsubfx/UI/PresetsUI.cpp \
  111. zynaddsubfx/UI/ResonanceUI.cpp \
  112. zynaddsubfx/UI/SUBnoteUI.cpp \
  113. zynaddsubfx/UI/VirKeyboard.cpp
  114. ZYN_UI_FILES_H = \
  115. zynaddsubfx/UI/ADnoteUI.h \
  116. zynaddsubfx/UI/BankUI.h \
  117. zynaddsubfx/UI/ConfigUI.h \
  118. zynaddsubfx/UI/EffUI.h \
  119. zynaddsubfx/UI/EnvelopeUI.h \
  120. zynaddsubfx/UI/FilterUI.h \
  121. zynaddsubfx/UI/LFOUI.h \
  122. zynaddsubfx/UI/MasterUI.h \
  123. zynaddsubfx/UI/MicrotonalUI.h \
  124. zynaddsubfx/UI/OscilGenUI.h \
  125. zynaddsubfx/UI/PADnoteUI.h \
  126. zynaddsubfx/UI/PartUI.h \
  127. zynaddsubfx/UI/PresetsUI.h \
  128. zynaddsubfx/UI/ResonanceUI.h \
  129. zynaddsubfx/UI/SUBnoteUI.h \
  130. zynaddsubfx/UI/VirKeyboard.h
  131. endif
  132. endif
  133. # --------------------------------------------------------------
  134. all: ../native-plugins.a
  135. # --------------------------------------------------------------
  136. ../native-plugins.a: $(OBJS)
  137. $(RM) $@
  138. $(AR) crs $@ $^
  139. ../libnative-plugins.dll: $(OBJS)
  140. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  141. ../libnative-plugins.dylib: $(OBJS)
  142. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  143. ../libnative-plugins.so: $(OBJS)
  144. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  145. # --------------------------------------------------------------
  146. CDEPS = ../CarlaNative.h
  147. _all.c.o: _all.c $(CDEPS)
  148. $(CC) $< $(ALL_C_FLAGS) -c -o $@
  149. bypass.c.o: bypass.c $(CDEPS)
  150. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  151. lfo.c.o: lfo.c $(CDEPS)
  152. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  153. midi-%.c.o: midi-%.c $(CDEPS)
  154. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  155. nekofilter.c.o: nekofilter.c nekofilter/*.c nekofilter/*.h $(CDEPS)
  156. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  157. # --------------------------------------------------------------
  158. CXXDEPS = ../CarlaNative.h ../CarlaNative.hpp
  159. audio-file.cpp.o: audio-file.cpp audio-base.hpp $(CXXDEPS)
  160. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  161. bigmeter.cpp.o: bigmeter.cpp $(CXXDEPS) ../CarlaNativeExtUI.hpp
  162. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  163. distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/*.cpp 3bandeq/*.h 3bandeq/*.hpp $(CXXDEPS)
  164. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@
  165. distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/*.cpp 3bandsplitter/*.h 3bandsplitter/*.hpp $(CXXDEPS)
  166. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@
  167. distrho-nekobi.cpp.o: distrho-nekobi.cpp nekobi/*.cpp nekobi/*.h nekobi/*.hpp nekobi/nekobee-src/*.c nekobi/nekobee-src/*.h $(CXXDEPS)
  168. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Inekobi -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -c -o $@
  169. distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/*.cpp pingpongpan/*.h pingpongpan/*.hpp $(CXXDEPS)
  170. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@
  171. distrho-stereoenhancer.cpp.o: distrho-stereoenhancer.cpp stereoenhancer/*.cpp stereoenhancer/*.h stereoenhancer/*.hpp $(CXXDEPS)
  172. $(CXX) $< $(BUILD_CXX_FLAGS) -I../dgl -Istereoenhancer -DDISTRHO_NAMESPACE=DISTRHO_StereoEnhancer -c -o $@
  173. juce-patchbay.cpp.o: juce-patchbay.cpp
  174. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  175. midi-file.cpp.o: midi-file.cpp midi-base.hpp $(CXXDEPS)
  176. $(CXX) $< $(MF_CXX_FLAGS) -c -o $@
  177. midi-sequencer.cpp.o: midi-sequencer.cpp midi-base.hpp $(CXXDEPS)
  178. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  179. notes.cpp.o: notes.cpp $(CXXDEPS) ../CarlaNativeExtUI.hpp
  180. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  181. vex-%.cpp.o: vex-%.cpp
  182. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  183. zynaddsubfx-%.cpp.o: zynaddsubfx-%.cpp $(CXXDEPS) $(ZYN_UI_FILES_H)
  184. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  185. zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H)
  186. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  187. zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  188. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  189. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  190. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  191. zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl
  192. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  193. # --------------------------------------------------------------
  194. clean:
  195. $(RM) $(OBJS) ../native-plugins*.a ../libnative-plugins.*
  196. $(RM) $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  197. debug:
  198. $(MAKE) DEBUG=true
  199. # --------------------------------------------------------------