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.

Makefile 8.1KB

11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
11 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  1. #!/usr/bin/make -f
  2. # Makefile for carla_native #
  3. # ------------------------- #
  4. # Created by falkTX
  5. #
  6. include ../../Makefile.mk
  7. # --------------------------------------------------------------
  8. BUILD_C_FLAGS += -I. -I.. -I../../includes
  9. BUILD_CXX_FLAGS += -I. -I.. -I../../includes -I../../utils -I../distrho
  10. LINK_FLAGS += -L..
  11. ifeq ($(HAVE_OPENGL),true)
  12. LINK_FLAGS += -ldgl $(DGL_LIBS)
  13. endif
  14. LINK_FLAGS += -ljuce_audio_basics $(JUCE_AUDIO_BASICS_LIBS)
  15. LINK_FLAGS += -ljuce_core $(JUCE_CORE_LIBS)
  16. LINK_FLAGS += -ljuce_data_structures $(JUCE_DATA_STRUCTURES_LIBS)
  17. LINK_FLAGS += -ljuce_events $(JUCE_EVENTS_LIBS)
  18. LINK_FLAGS += -ljuce_graphics $(JUCE_GRAPHICS_LIBS)
  19. LINK_FLAGS += -ljuce_gui_basics $(JUCE_GUI_BASICS_LIBS)
  20. # --------------------------------------------------------------
  21. ALL_C_FLAGS = $(BUILD_C_FLAGS)
  22. ifeq ($(HAVE_OPENGL),true)
  23. ALL_C_FLAGS += -DWANT_OPENGL
  24. endif
  25. ifeq ($(HAVE_AF_DEPS),true)
  26. AF_C_FLAGS = $(BUILD_C_FLAGS)
  27. AF_C_FLAGS += $(shell pkg-config --cflags sndfile)
  28. LINK_FLAGS += $(shell pkg-config --libs sndfile)
  29. ALL_C_FLAGS += -DWANT_AUDIOFILE
  30. ifeq ($(HAVE_FFMPEG),true)
  31. AF_C_FLAGS += -DHAVE_FFMPEG
  32. AF_C_FLAGS += $(shell pkg-config --cflags libavcodec libavformat libavutil)
  33. LINK_FLAGS += $(shell pkg-config --libs libavcodec libavformat libavutil)
  34. endif
  35. endif
  36. ifeq ($(HAVE_MF_DEPS),true)
  37. MF_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  38. MF_CXX_FLAGS += $(shell pkg-config --cflags smf)
  39. LINK_FLAGS += $(shell pkg-config --libs smf)
  40. ALL_C_FLAGS += -DWANT_MIDIFILE
  41. endif
  42. ifeq ($(HAVE_ZYN_DEPS),true)
  43. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS)
  44. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  45. LINK_FLAGS += $(shell pkg-config --libs fftw3 mxml zlib)
  46. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  47. ZYN_CXX_FLAGS += -DNTK_GUI -DWANT_ZYNADDSUBFX_UI
  48. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk_images ntk)
  49. LINK_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  50. endif
  51. ALL_C_FLAGS += -DWANT_ZYNADDSUBFX
  52. endif
  53. # Implement carla_register_native_plugin
  54. LINK_FLAGS += -I.. _link.c
  55. # --------------------------------------------------------------
  56. OBJS = _all.c.o
  57. # Simple plugins (C)
  58. OBJS += \
  59. bypass.c.o \
  60. lfo.c.o \
  61. midi-gain.c.o \
  62. midi-split.c.o \
  63. midi-through.c.o \
  64. midi-transpose.c.o \
  65. nekofilter.c.o
  66. # Simple plugins (C++)
  67. # OBJS += \
  68. # vex-fx.cpp.o \
  69. # vex-synth.cpp.o \
  70. # vex-src.cpp.o
  71. # AudioFile
  72. ifeq ($(HAVE_AF_DEPS),true)
  73. OBJS += \
  74. audio-file.cpp.o \
  75. audio_decoder/ad_ffmpeg.c.o \
  76. audio_decoder/ad_plugin.c.o \
  77. audio_decoder/ad_soundfile.c.o
  78. endif
  79. # MidiFile
  80. ifeq ($(HAVE_MF_DEPS),true)
  81. OBJS += \
  82. midi-file.cpp.o
  83. endif
  84. # DISTRHO plugins (OpenGL)
  85. ifeq ($(HAVE_OPENGL),true)
  86. OBJS += \
  87. distrho-3bandeq.cpp.o \
  88. distrho-3bandsplitter.cpp.o \
  89. distrho-nekobi.cpp.o \
  90. distrho-pingpongpan.cpp.o
  91. # distrho-stereoenhancer.cpp.o
  92. endif
  93. # DISTRHO plugins (PyQt)
  94. # OBJS += \
  95. # distrho-bigmeter.cpp.o \
  96. # distrho-bigmeterM.cpp.o \
  97. # distrho-notes.cpp.o
  98. ifeq ($(HAVE_ZYN_DEPS),true)
  99. # ZynAddSubFX
  100. OBJS += \
  101. zynaddsubfx-fx.cpp.o \
  102. zynaddsubfx-synth.cpp.o \
  103. zynaddsubfx-src.cpp.o
  104. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  105. OBJS += zynaddsubfx-ui.cpp.o
  106. ZYN_UI_FILES_CPP = \
  107. zynaddsubfx/UI/ADnoteUI.cpp \
  108. zynaddsubfx/UI/BankUI.cpp \
  109. zynaddsubfx/UI/ConfigUI.cpp \
  110. zynaddsubfx/UI/EffUI.cpp \
  111. zynaddsubfx/UI/EnvelopeUI.cpp \
  112. zynaddsubfx/UI/FilterUI.cpp \
  113. zynaddsubfx/UI/LFOUI.cpp \
  114. zynaddsubfx/UI/MasterUI.cpp \
  115. zynaddsubfx/UI/MicrotonalUI.cpp \
  116. zynaddsubfx/UI/OscilGenUI.cpp \
  117. zynaddsubfx/UI/PADnoteUI.cpp \
  118. zynaddsubfx/UI/PartUI.cpp \
  119. zynaddsubfx/UI/PresetsUI.cpp \
  120. zynaddsubfx/UI/ResonanceUI.cpp \
  121. zynaddsubfx/UI/SUBnoteUI.cpp \
  122. zynaddsubfx/UI/VirKeyboard.cpp
  123. ZYN_UI_FILES_H = \
  124. zynaddsubfx/UI/ADnoteUI.h \
  125. zynaddsubfx/UI/BankUI.h \
  126. zynaddsubfx/UI/ConfigUI.h \
  127. zynaddsubfx/UI/EffUI.h \
  128. zynaddsubfx/UI/EnvelopeUI.h \
  129. zynaddsubfx/UI/FilterUI.h \
  130. zynaddsubfx/UI/LFOUI.h \
  131. zynaddsubfx/UI/MasterUI.h \
  132. zynaddsubfx/UI/MicrotonalUI.h \
  133. zynaddsubfx/UI/OscilGenUI.h \
  134. zynaddsubfx/UI/PADnoteUI.h \
  135. zynaddsubfx/UI/PartUI.h \
  136. zynaddsubfx/UI/PresetsUI.h \
  137. zynaddsubfx/UI/ResonanceUI.h \
  138. zynaddsubfx/UI/SUBnoteUI.h \
  139. zynaddsubfx/UI/VirKeyboard.h
  140. endif
  141. endif
  142. # --------------------------------------------------------------
  143. all: ../carla_native.a
  144. # --------------------------------------------------------------
  145. ../carla_native.a: $(OBJS)
  146. $(RM) $@
  147. $(AR) crs $@ $^
  148. ../libcarla_native.dll: $(OBJS)
  149. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  150. ../libcarla_native.dylib: $(OBJS)
  151. $(CXX) $^ -dynamiclib $(LINK_FLAGS) -o $@
  152. ../libcarla_native.so: $(OBJS)
  153. $(CXX) $^ -shared $(LINK_FLAGS) -o $@
  154. # --------------------------------------------------------------
  155. CDEPS = ../CarlaNative.h
  156. _all.c.o: _all.c $(CDEPS)
  157. $(CC) $< $(ALL_C_FLAGS) -c -o $@
  158. bypass.c.o: bypass.c $(CDEPS)
  159. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  160. audio_decoder/%.c.o: audio_decoder/%.c
  161. $(CC) $< $(AF_C_FLAGS) -c -o $@
  162. lfo.c.o: lfo.c $(CDEPS)
  163. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  164. midi-%.c.o: midi-%.c $(CDEPS)
  165. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  166. nekofilter.c.o: nekofilter.c nekofilter/*.c nekofilter/*.h $(CDEPS)
  167. $(CC) $< $(BUILD_C_FLAGS) -c -o $@
  168. # --------------------------------------------------------------
  169. CXXDEPS = ../CarlaNative.h ../CarlaNative.hpp
  170. audio-file.cpp.o: audio-file.cpp audio-base.hpp $(CXXDEPS)
  171. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  172. distrho-3bandeq.cpp.o: distrho-3bandeq.cpp 3bandeq/*.cpp 3bandeq/*.h 3bandeq/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  173. $(CXX) $< $(BUILD_CXX_FLAGS) -I3bandeq -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -c -o $@
  174. distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp 3bandsplitter/*.cpp 3bandsplitter/*.h 3bandsplitter/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  175. $(CXX) $< $(BUILD_CXX_FLAGS) -I3bandsplitter -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -c -o $@
  176. 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)
  177. $(CXX) $< $(BUILD_CXX_FLAGS) -Inekobi -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -c -o $@
  178. distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp pingpongpan/*.cpp pingpongpan/*.h pingpongpan/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  179. $(CXX) $< $(BUILD_CXX_FLAGS) -Ipingpongpan -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -c -o $@
  180. distrho-stereoenhancer.cpp.o: distrho-stereoenhancer.cpp stereoenhancer/*.cpp stereoenhancer/*.h stereoenhancer/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  181. $(CXX) $< $(BUILD_CXX_FLAGS) -Istereoenhancer -DDISTRHO_NAMESPACE=DISTRHO_StereoEnhancer -c -o $@
  182. distrho-bigmeter.cpp.o: distrho-bigmeter.cpp bigmeter/*.cpp bigmeter/*.h bigmeter/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  183. $(CXX) $< $(BUILD_CXX_FLAGS) -Ibigmeter -DDISTRHO_NAMESPACE=DISTRHO_BigMeter -c -o $@
  184. distrho-bigmeterM.cpp.o: distrho-bigmeterM.cpp bigmeterM/*.cpp bigmeterM/*.h bigmeterM/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  185. $(CXX) $< $(BUILD_CXX_FLAGS) -IbigmeterM -DDISTRHO_NAMESPACE=DISTRHO_BigMeterM -c -o $@
  186. distrho-notes.cpp.o: distrho-notes.cpp notes/*.cpp notes/*.h notes/*.hpp distrho/DistrhoPluginCarla.cpp $(CXXDEPS)
  187. $(CXX) $< $(BUILD_CXX_FLAGS) -Inotes -DDISTRHO_NAMESPACE=DISTRHO_Notes -c -o $@
  188. midi-file.cpp.o: midi-file.cpp midi-base.hpp $(CXXDEPS)
  189. $(CXX) $< $(MF_CXX_FLAGS) -c -o $@
  190. midi-sequencer.cpp.o: midi-sequencer.cpp midi-base.hpp $(CXXDEPS)
  191. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  192. vex-%.cpp.o: vex-%.cpp
  193. $(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  194. zynaddsubfx-%.cpp.o: zynaddsubfx-%.cpp $(CXXDEPS) $(ZYN_UI_FILES_H)
  195. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  196. zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H)
  197. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  198. zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  199. $(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  200. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  201. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  202. zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl
  203. ntk-fluid -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  204. # --------------------------------------------------------------
  205. clean:
  206. $(RM) $(OBJS) ../carla_native*.a ../libcarla_native.*
  207. $(RM) $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  208. debug:
  209. $(MAKE) DEBUG=true
  210. # --------------------------------------------------------------