Merge branch 'master' of https://github.com/calf-studio-gear/calf
[calf.git] / src / Makefile.am
blobccd58b269440c1d53d7bf01ae3234d93dd5fe234
1 # Calf DSP library - example modules
3 SUBDIRS = calf
5 lv2dir = $(with_lv2_dir)/calf.lv2
7 bin_PROGRAMS = 
8 noinst_LTLIBRARIES =
10 noinst_PROGRAMS = calfbenchmark
11 pkglib_LTLIBRARIES = calf.la
13 AM_CPPFLAGS = -I$(top_srcdir) -I$(srcdir)
14 # TODO: Remove -finline flags is clang is used
15 AM_CXXFLAGS = -ffast-math -finline-limit=80 $(FLUIDSYNTH_DEPS_CFLAGS) $(LV2_DEPS_CFLAGS)
17 if USE_GUI
18 AM_CXXFLAGS += $(GUI_DEPS_CFLAGS)
19 endif
20 if USE_JACK
21 AM_CXXFLAGS += $(JACK_DEPS_CFLAGS)
22 noinst_LTLIBRARIES += libcalfgui.la
23 bin_PROGRAMS += calfjackhost 
24 calfjackhost_SOURCES = gtk_session_env.cpp host_session.cpp jack_client.cpp jackhost.cpp gtk_main_win.cpp connector.cpp session_mgr.cpp
25 calfjackhost_LDADD = libcalfgui.la calf.la $(JACK_DEPS_LIBS) $(GUI_DEPS_LIBS) $(FLUIDSYNTH_DEPS_LIBS)
26 if USE_LASH
27 AM_CXXFLAGS += $(LASH_DEPS_CFLAGS)
28 calfjackhost_LDADD += $(LASH_DEPS_LIBS)
29 endif
30 endif
32 AM_CXXFLAGS += $(GLIB_DEPS_CFLAGS)
33 noinst_PROGRAMS += calfmakerdf
34 calfmakerdf_SOURCES = makerdf.cpp
35 calfmakerdf_LDADD = calf.la
37 calfbenchmark_SOURCES = benchmark.cpp
38 calfbenchmark_LDADD = calf.la
40 calf_la_SOURCES = audio_fx.cpp analyzer.cpp metadata.cpp modules_tools.cpp modules_delay.cpp modules_comp.cpp modules_limit.cpp modules_dist.cpp modules_filter.cpp modules_mod.cpp modules_pitch.cpp fluidsynth.cpp giface.cpp monosynth.cpp organ.cpp osctl.cpp plugin.cpp preset.cpp synth.cpp utils.cpp wavetable.cpp modmatrix.cpp
41 calf_la_LIBADD = $(FLUIDSYNTH_DEPS_LIBS) $(GLIB_DEPS_LIBS) 
42 if USE_DEBUG
43 calf_la_LDFLAGS = -rpath $(pkglibdir) -avoid-version -module -lexpat -disable-static
44 else
45 calf_la_LDFLAGS = -rpath $(pkglibdir) -avoid-version -module -lexpat -disable-static -export-symbols-regex "lv2_descriptor"
46 endif
48 if USE_LV2_GUI
50 # Version WITH out-of-process GUI - links GTK+, UI controls etc.
52 noinst_LTLIBRARIES += calflv2gui.la
54 calflv2gui_la_SOURCES = gui.cpp gui_config.cpp gui_controls.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_knob.cpp ctl_led.cpp ctl_tube.cpp ctl_vumeter.cpp custom_ctl.cpp metadata.cpp giface.cpp plugin_gui_window.cpp preset.cpp preset_gui.cpp lv2gui.cpp osctl.cpp utils.cpp ctl_linegraph.cpp drawingutils.cpp
56 if USE_DEBUG
57 calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat $(GUI_DEPS_LIBS) -disable-static  -Wl,-z,nodelete
58 else
59 calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat -export-symbols-regex "lv2ui_descriptor" $(GUI_DEPS_LIBS) -disable-static  -Wl,-z,nodelete
60 endif
62 endif
64 if USE_GUI
65 libcalfgui_la_SOURCES = ctl_curve.cpp ctl_keyboard.cpp ctl_knob.cpp ctl_led.cpp ctl_tube.cpp ctl_vumeter.cpp custom_ctl.cpp gui.cpp gui_config.cpp gui_controls.cpp osctl.cpp plugin_gui_window.cpp preset_gui.cpp utils.cpp ctl_linegraph.cpp drawingutils.cpp
66 libcalfgui_la_LDFLAGS = -static -disable-shared -lexpat
67 endif
69 clean-local:
70         $(RM) -f calfjackhost *~
72 install-data-hook:
73         install -d -m 755 $(DESTDIR)$(pkgdatadir) 
74         install -c -m 644 $(top_srcdir)/presets.xml $(DESTDIR)$(pkgdatadir)
75 if USE_GUI
76         install -c -m 644 $(top_srcdir)/calf-gui.xml $(DESTDIR)$(pkgdatadir)
77 endif
78 if USE_LV2
79         install -d -m 755 $(DESTDIR)$(lv2dir)
80         ln -sf $(pkglibdir)/calf.so $(DESTDIR)$(lv2dir)/calf.so
81 if USE_LV2_GUI
82         install -c -m 755 $(top_builddir)/src/.libs/calflv2gui.so $(DESTDIR)$(lv2dir)/calflv2gui.so
83 endif
84         rm -f $(DESTDIR)$(lv2dir)/*.ttl
85         $(top_builddir)/src/calfmakerdf -m ttl -p $(DESTDIR)$(lv2dir)/ -d $(DESTDIR)$(pkgdatadir)/
86 if USE_SORDI
87         for f in $(DESTDIR)$(lv2dir)/*.ttl; do sout=`sordi -o turtle "$$f"`; if test $$? != 0; then echo "RDF file $$f is corrupted:"; echo $$sout"<<<"; fi; done
88 endif
89 endif
91 #remove calf.so, calf.rdf and - if empty - ladspa dir in usr/share
92 uninstall-hook:
93 if USE_LV2
94 if USE_LV2_GUI
95         rm -f $(DESTDIR)$(lv2dir)/calflv2gui.so
96 endif
97         rm -f $(DESTDIR)$(lv2dir)/calf.so
98         rm -f $(DESTDIR)$(lv2dir)/*.ttl
99         rmdir -p $(DESTDIR)$(lv2dir) || true
100 endif
101 if USE_GUI
102         rm -f $(DESTDIR)$(pkgdatadir)/calf-gui.xml
103 endif
104         rm -f $(DESTDIR)$(pkgdatadir)/presets*.xml
105         rmdir $(DESTDIR)$(pkgdatadir) || true