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 12KB

11 years ago
11 years ago
10 years ago
10 years ago
9 years ago
9 years ago
10 years ago
10 years ago
11 years ago
9 years ago
11 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
11 years ago
10 years ago
11 years ago
11 years ago
10 years ago
11 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
10 years ago
11 years ago
9 years ago
10 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
9 years ago
9 years ago
9 years ago
9 years ago
10 years ago
10 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357
  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 Zita UIs
  14. ifeq ($(EXPERIMENTAL_PLUGINS),true)
  15. ZITA_DSP_CXX_FLAGS = $(BUILD_CXX_FLAGS) -Wno-unused-parameter
  16. ZITA_DSP_CXX_FLAGS += $(shell pkg-config --cflags fftw3f)
  17. ZITA_UI_CXX_FLAGS = $(BUILD_CXX_FLAGS) -Wno-unused-parameter -Wno-ignored-qualifiers
  18. ZITA_UI_CXX_FLAGS += $(shell pkg-config --cflags cairo libpng12 freetype2 x11 xft zlib)
  19. ZITA_UI_LINK_FLAGS = $(LINK_FLAGS) -lclxclient -lclthreads
  20. ZITA_UI_LINK_FLAGS += $(shell pkg-config --libs cairo libpng12 freetype2 x11 xft zlib)
  21. ZITA_UI_LINK_FLAGS += -ldl -lpthread -lrt
  22. endif # EXPERIMENTAL_PLUGINS
  23. # ----------------------------------------------------------------------------------------------------------------------------
  24. # Flags for ZynAddSubFX
  25. ifeq ($(HAVE_ZYN_DEPS),true)
  26. ZYN_CXX_FLAGS = $(BUILD_CXX_FLAGS) -Izynaddsubfx -Izynaddsubfx/rtosc
  27. ZYN_CXX_FLAGS += $(shell pkg-config --cflags fftw3 mxml zlib)
  28. ZYN_LD_FLAGS = $(shell pkg-config --libs liblo)
  29. ZYN_LD_FLAGS += -ldl -lpthread -lrt
  30. ifeq ($(HAVE_X11),true)
  31. ZYN_CXX_FLAGS += $(shell pkg-config --cflags x11)
  32. ZYN_LD_FLAGS += $(shell pkg-config --libs x11)
  33. endif
  34. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  35. ifeq ($(HAVE_NTK),true)
  36. FLUID = ntk-fluid
  37. ZYN_CXX_FLAGS += -DNTK_GUI
  38. ZYN_CXX_FLAGS += $(shell pkg-config --cflags ntk_images ntk)
  39. ZYN_LD_FLAGS += $(shell pkg-config --libs ntk_images ntk)
  40. else # HAVE_NTK
  41. FLUID = fluid
  42. ZYN_CXX_FLAGS += -DFLTK_GUI
  43. ZYN_CXX_FLAGS += $(shell fltk-config --use-images --cxxflags)
  44. ZYN_LD_FLAGS += $(shell fltk-config --use-images --ldflags)
  45. endif # HAVE_NTK
  46. else # HAVE_ZYN_UI_DEPS
  47. ZYN_CXX_FLAGS += -DNO_UI
  48. endif # HAVE_ZYN_UI_DEPS
  49. endif # HAVE_ZYN_DEPS
  50. # ----------------------------------------------------------------------------------------------------------------------------
  51. # Set targets
  52. TARGETS = $(MODULEDIR)/$(MODULENAME).a
  53. # ----------------------------------------------------------------------------------------------------------------------------
  54. # Set objects
  55. OBJS = \
  56. $(OBJDIR)/_all.c.o \
  57. $(OBJDIR)/_data.cpp.o
  58. # ----------------------------------------------------------------------------------------------------------------------------
  59. # Simple plugins
  60. OBJS += \
  61. $(OBJDIR)/bypass.c.o \
  62. $(OBJDIR)/lfo.c.o \
  63. $(OBJDIR)/midi-channel-filter.c.o \
  64. $(OBJDIR)/midi-gain.c.o \
  65. $(OBJDIR)/midi-join.c.o \
  66. $(OBJDIR)/midi-split.c.o \
  67. $(OBJDIR)/midi-through.c.o \
  68. $(OBJDIR)/midi-transpose.c.o
  69. OBJS += \
  70. $(OBJDIR)/audio-file.cpp.o \
  71. $(OBJDIR)/bigmeter.cpp.o \
  72. $(OBJDIR)/midi-file.cpp.o \
  73. $(OBJDIR)/midi-pattern.cpp.o \
  74. $(OBJDIR)/notes.cpp.o
  75. # ----------------------------------------------------------------------------------------------------------------------------
  76. # DISTRHO plugins
  77. OBJS += \
  78. $(OBJDIR)/distrho-3bandeq.cpp.o \
  79. $(OBJDIR)/distrho-3bandsplitter.cpp.o \
  80. $(OBJDIR)/distrho-mverb.cpp.o \
  81. $(OBJDIR)/distrho-nekobi.cpp.o \
  82. $(OBJDIR)/distrho-pingpongpan.cpp.o
  83. ifeq ($(HAVE_DGL),true)
  84. ifeq ($(HAVE_PROJECTM),true)
  85. OBJS += $(OBJDIR)/distrho-prom.cpp.o
  86. endif
  87. endif
  88. # ----------------------------------------------------------------------------------------------------------------------------
  89. # DISTRHO plugins (Juice)
  90. OBJS += \
  91. $(OBJDIR)/distrho-vectorjuice.cpp.o \
  92. $(OBJDIR)/distrho-wobblejuice.cpp.o
  93. # ----------------------------------------------------------------------------------------------------------------------------
  94. # ZynAddSubFX
  95. ifeq ($(LINUX),true)
  96. ifeq ($(HAVE_ZYN_DEPS),true)
  97. OBJS += \
  98. $(OBJDIR)/zynaddsubfx-fx.cpp.o \
  99. $(OBJDIR)/zynaddsubfx-synth.cpp.o \
  100. $(OBJDIR)/zynaddsubfx-src.cpp.o
  101. ifeq ($(HAVE_ZYN_UI_DEPS),true)
  102. TARGETS += resources/zynaddsubfx-ui$(APP_EXT)
  103. ZYN_UI_FILES_CPP = \
  104. zynaddsubfx/UI/ADnoteUI.cpp \
  105. zynaddsubfx/UI/BankUI.cpp \
  106. zynaddsubfx/UI/ConfigUI.cpp \
  107. zynaddsubfx/UI/EffUI.cpp \
  108. zynaddsubfx/UI/EnvelopeUI.cpp \
  109. zynaddsubfx/UI/FilterUI.cpp \
  110. zynaddsubfx/UI/LFOUI.cpp \
  111. zynaddsubfx/UI/MasterUI.cpp \
  112. zynaddsubfx/UI/MicrotonalUI.cpp \
  113. zynaddsubfx/UI/OscilGenUI.cpp \
  114. zynaddsubfx/UI/PADnoteUI.cpp \
  115. zynaddsubfx/UI/PartUI.cpp \
  116. zynaddsubfx/UI/PresetsUI.cpp \
  117. zynaddsubfx/UI/ResonanceUI.cpp \
  118. zynaddsubfx/UI/SUBnoteUI.cpp \
  119. zynaddsubfx/UI/VirKeyboard.cpp
  120. ZYN_UI_FILES_H = \
  121. zynaddsubfx/UI/ADnoteUI.h \
  122. zynaddsubfx/UI/BankUI.h \
  123. zynaddsubfx/UI/ConfigUI.h \
  124. zynaddsubfx/UI/EffUI.h \
  125. zynaddsubfx/UI/EnvelopeUI.h \
  126. zynaddsubfx/UI/FilterUI.h \
  127. zynaddsubfx/UI/LFOUI.h \
  128. zynaddsubfx/UI/MasterUI.h \
  129. zynaddsubfx/UI/MicrotonalUI.h \
  130. zynaddsubfx/UI/OscilGenUI.h \
  131. zynaddsubfx/UI/PADnoteUI.h \
  132. zynaddsubfx/UI/PartUI.h \
  133. zynaddsubfx/UI/PresetsUI.h \
  134. zynaddsubfx/UI/ResonanceUI.h \
  135. zynaddsubfx/UI/SUBnoteUI.h \
  136. zynaddsubfx/UI/VirKeyboard.h
  137. endif
  138. endif
  139. endif
  140. # ----------------------------------------------------------------------------------------------------------------------------
  141. # Experimental plugins
  142. ifeq ($(EXPERIMENTAL_PLUGINS),true)
  143. OBJS += \
  144. $(OBJDIR)/zita-at1.cpp.o \
  145. $(OBJDIR)/zita-bls1.cpp.o \
  146. $(OBJDIR)/zita-rev1.cpp.o
  147. TARGETS += \
  148. resources/at1-ui$(APP_EXT) \
  149. resources/bls1-ui$(APP_EXT) \
  150. resources/rev1-ui$(APP_EXT)
  151. endif
  152. # ----------------------------------------------------------------------------------------------------------------------------
  153. all: $(TARGETS)
  154. # ----------------------------------------------------------------------------------------------------------------------------
  155. clean:
  156. rm -f $(OBJDIR)/*.o $(MODULEDIR)/$(MODULENAME)*.a $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP) $(TARGETS)
  157. debug:
  158. $(MAKE) DEBUG=true
  159. # ----------------------------------------------------------------------------------------------------------------------------
  160. $(MODULEDIR)/$(MODULENAME).a: $(OBJS)
  161. -@mkdir -p $(MODULEDIR)
  162. @echo "Creating $(MODULENAME).a"
  163. @rm -f $@
  164. @$(AR) crs $@ $^
  165. resources/at1-ui$(APP_EXT): $(OBJDIR)/zita-at1-ui.cpp.o
  166. -@mkdir -p $(OBJDIR)
  167. @echo "Linking at1-ui"
  168. @$(CXX) $^ $(ZITA_UI_LINK_FLAGS) -o $@
  169. resources/bls1-ui$(APP_EXT): $(OBJDIR)/zita-bls1-ui.cpp.o
  170. -@mkdir -p $(OBJDIR)
  171. @echo "Linking bls1-ui"
  172. @$(CXX) $^ $(ZITA_UI_LINK_FLAGS) -o $@
  173. resources/rev1-ui$(APP_EXT): $(OBJDIR)/zita-rev1-ui.cpp.o
  174. -@mkdir -p $(OBJDIR)
  175. @echo "Linking rev1-ui"
  176. @$(CXX) $^ $(ZITA_UI_LINK_FLAGS) -o $@
  177. resources/zynaddsubfx-ui$(APP_EXT): $(OBJDIR)/zynaddsubfx-ui.cpp.o
  178. -@mkdir -p $(OBJDIR)
  179. @echo "Linking zynaddsubfx-ui"
  180. @$(CXX) $^ $(ZYN_LD_FLAGS) -o $@
  181. # ----------------------------------------------------------------------------------------------------------------------------
  182. zynaddsubfx/UI/%.cpp: zynaddsubfx/UI/%.fl
  183. @echo "Generating $@|h"
  184. @$(FLUID) -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  185. zynaddsubfx/UI/%.h: zynaddsubfx/UI/%.fl
  186. @echo "Generating $@|cpp"
  187. @$(FLUID) -c -o zynaddsubfx/UI/$*.cpp -h zynaddsubfx/UI/$*.h $<
  188. # ----------------------------------------------------------------------------------------------------------------------------
  189. $(OBJDIR)/%.c.o: %.c
  190. -@mkdir -p $(OBJDIR)
  191. @echo "Compiling $<"
  192. @$(CC) $< $(BUILD_C_FLAGS) -c -o $@
  193. # ----------------------------------------------------------------------------------------------------------------------------
  194. $(OBJDIR)/_data.cpp.o: _data.cpp
  195. -@mkdir -p $(OBJDIR)
  196. @echo "Compiling $<"
  197. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  198. $(OBJDIR)/audio-file.cpp.o: audio-file.cpp
  199. -@mkdir -p $(OBJDIR)
  200. @echo "Compiling $<"
  201. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  202. $(OBJDIR)/bigmeter.cpp.o: bigmeter.cpp
  203. -@mkdir -p $(OBJDIR)
  204. @echo "Compiling $<"
  205. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  206. $(OBJDIR)/midi-file.cpp.o: midi-file.cpp
  207. -@mkdir -p $(OBJDIR)
  208. @echo "Compiling $<"
  209. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  210. $(OBJDIR)/midi-pattern.cpp.o: midi-pattern.cpp
  211. -@mkdir -p $(OBJDIR)
  212. @echo "Compiling $<"
  213. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  214. $(OBJDIR)/notes.cpp.o: notes.cpp
  215. -@mkdir -p $(OBJDIR)
  216. @echo "Compiling $<"
  217. @$(CXX) $< $(BUILD_CXX_FLAGS) -c -o $@
  218. # ----------------------------------------------------------------------------------------------------------------------------
  219. $(OBJDIR)/distrho-3bandeq.cpp.o: distrho-3bandeq.cpp
  220. -@mkdir -p $(OBJDIR)
  221. @echo "Compiling $<"
  222. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandEQ -Idistrho-3bandeq -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  223. $(OBJDIR)/distrho-3bandsplitter.cpp.o: distrho-3bandsplitter.cpp
  224. -@mkdir -p $(OBJDIR)
  225. @echo "Compiling $<"
  226. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_3BandSplitter -Idistrho-3bandsplitter -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  227. $(OBJDIR)/distrho-mverb.cpp.o: distrho-mverb.cpp
  228. -@mkdir -p $(OBJDIR)
  229. # FIXME - fix mverb strict warnings
  230. @echo "Compiling $<"
  231. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_MVerb -Idistrho-mverb -I$(CWD)/modules/dgl -Wno-conversion -Wno-effc++ -Wno-shadow -c -o $@
  232. $(OBJDIR)/distrho-nekobi.cpp.o: distrho-nekobi.cpp
  233. -@mkdir -p $(OBJDIR)
  234. # FIXME - fix nekobi strict warnings
  235. @echo "Compiling $<"
  236. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_Nekobi -Idistrho-nekobi -I$(CWD)/modules/dgl -w -c -o $@
  237. $(OBJDIR)/distrho-pingpongpan.cpp.o: distrho-pingpongpan.cpp
  238. -@mkdir -p $(OBJDIR)
  239. @echo "Compiling $<"
  240. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_PingPongPan -Idistrho-pingpongpan -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  241. $(OBJDIR)/distrho-prom.cpp.o: distrho-prom.cpp
  242. -@mkdir -p $(OBJDIR)
  243. @echo "Compiling $<"
  244. @$(CXX) $< $(BUILD_CXX_FLAGS) $(PROJECTM_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_ProM -Idistrho-prom -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  245. # ----------------------------------------------------------------------------------------------------------------------------
  246. $(OBJDIR)/distrho-vectorjuice.cpp.o: distrho-vectorjuice.cpp
  247. -@mkdir -p $(OBJDIR)
  248. @echo "Compiling $<"
  249. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_VectorJuice -Idistrho-vectorjuice -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  250. $(OBJDIR)/distrho-wobblejuice.cpp.o: distrho-wobblejuice.cpp
  251. -@mkdir -p $(OBJDIR)
  252. @echo "Compiling $<"
  253. @$(CXX) $< $(BUILD_CXX_FLAGS) -DDISTRHO_NAMESPACE=DISTRHO_WobbleJuice -Idistrho-wobblejuice -I$(CWD)/modules/dgl -Wno-effc++ -c -o $@
  254. # ----------------------------------------------------------------------------------------------------------------------------
  255. $(OBJDIR)/zynaddsubfx-fx.cpp.o: zynaddsubfx-fx.cpp $(ZYN_UI_FILES_H)
  256. -@mkdir -p $(OBJDIR)
  257. @echo "Compiling $<"
  258. @$(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  259. $(OBJDIR)/zynaddsubfx-synth.cpp.o: zynaddsubfx-synth.cpp $(ZYN_UI_FILES_H)
  260. -@mkdir -p $(OBJDIR)
  261. @echo "Compiling $<"
  262. @$(CXX) $< $(ZYN_CXX_FLAGS) -c -o $@
  263. $(OBJDIR)/zynaddsubfx-src.cpp.o: zynaddsubfx-src.cpp $(ZYN_UI_FILES_H)
  264. -@mkdir -p $(OBJDIR)
  265. @echo "Compiling $<"
  266. @$(CXX) $< $(ZYN_CXX_FLAGS) -Wno-unused-parameter -c -o $@
  267. $(OBJDIR)/zynaddsubfx-ui.cpp.o: zynaddsubfx-ui.cpp $(ZYN_UI_FILES_H) $(ZYN_UI_FILES_CPP)
  268. -@mkdir -p $(OBJDIR)
  269. @echo "Compiling $<"
  270. $(CXX) $< $(ZYN_CXX_FLAGS) -Wno-unused-parameter -Wno-unused-variable -c -o $@
  271. # ----------------------------------------------------------------------------------------------------------------------------
  272. $(OBJDIR)/zita-%-ui.cpp.o: zita-%-ui.cpp
  273. -@mkdir -p $(OBJDIR)
  274. @echo "Compiling $<"
  275. @$(CXX) $< $(ZITA_UI_CXX_FLAGS) -c -o $@
  276. $(OBJDIR)/zita-%.cpp.o: zita-%.cpp
  277. -@mkdir -p $(OBJDIR)
  278. @echo "Compiling $<"
  279. @$(CXX) $< $(ZITA_DSP_CXX_FLAGS) -c -o $@
  280. # ----------------------------------------------------------------------------------------------------------------------------
  281. -include $(OBJS:%.o=%.d)
  282. -include $(OBJDIR)/zita-at1-ui.cpp.d
  283. -include $(OBJDIR)/zita-bls1-ui.cpp.d
  284. -include $(OBJDIR)/zita-rev1-ui.cpp.d
  285. -include $(OBJDIR)/zynaddsubfx-ui.cpp.d
  286. # ----------------------------------------------------------------------------------------------------------------------------