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.6KB

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