Merge commit 'origin/caching'
[calf.git] / src / Makefile.am
blobfa5dc2e58959a5be8207c4e86078f573cfbb9b38
1 # Calf DSP library - example modules
3 INCLUDES = -I$(top_srcdir) -I$(srcdir)
5 SUBDIRS = calf
7 ladspadir = $(with_ladspa_dir)
8 lv2dir = $(with_lv2_dir)
10 bin_PROGRAMS = 
12 noinst_PROGRAMS = calfbenchmark
13 noinst_LTLIBRARIES = calf.la libcalfstatic.la
14 if USE_DSSI_GUI
15 noinst_PROGRAMS += calfdssigui
16 endif
17 if USE_LV2_GUI
18 noinst_LTLIBRARIES += calflv2gui.la
19 endif
21 AM_CXXFLAGS = -ffast-math -finline-limit=80 
23 if USE_GUI
24 AM_CXXFLAGS += $(GUI_DEPS_CFLAGS)
25 endif
26 if USE_JACK
27 AM_CXXFLAGS += $(JACK_DEPS_CFLAGS)
28 noinst_LTLIBRARIES += libcalfgui.la
29 bin_PROGRAMS += calfjackhost 
30 calfjackhost_SOURCES = jackhost.cpp
31 calfjackhost_LDADD = libcalfgui.la libcalfstatic.la $(JACK_DEPS_LIBS) $(GUI_DEPS_LIBS)
32 if USE_LASH
33 AM_CXXFLAGS += $(LASH_DEPS_CFLAGS)
34 calfjackhost_LDADD += $(LASH_DEPS_LIBS)
35 endif
36 endif
38 AM_CXXFLAGS += $(GLIB_DEPS_CFLAGS)
39 noinst_PROGRAMS += calfmakerdf
40 calfmakerdf_SOURCES = makerdf.cpp 
41 calfmakerdf_LDADD = libcalfstatic.la
43 calfbenchmark_SOURCES = benchmark.cpp
44 calfbenchmark_LDADD = $(GLIB_DEPS_LIBS) libcalfstatic.la
46 if USE_DSSI_GUI
47 calfdssigui_SOURCES = dssigui.cpp
48 calfdssigui_LDADD = libcalfstatic.la libcalfgui.la $(GLIB_DEPS_LIBS) $(GUI_DEPS_LIBS)
49 calfbenchmark_CXXFLAGS = $(AM_CXXFLAGS) -DTEST_OSC
50 calfbenchmark_LDADD += libcalfgui.la
51 endif
53 calf_la_SOURCES = modules.cpp modules_dsp.cpp modules_small.cpp giface.cpp monosynth.cpp organ.cpp osctl.cpp osctlnet.cpp plugin.cpp preset.cpp synth.cpp utils.cpp
54 if USE_DEBUG
55 calf_la_LDFLAGS = -rpath $(ladspadir) -avoid-version -module -lexpat -disable-static
56 else
57 calf_la_LDFLAGS = -rpath $(ladspadir) -avoid-version -module -lexpat -disable-static -export-symbols-regex "(ladspa_|lv2_|dssi_)descriptor"
58 endif
60 if USE_LV2_GUI
61 calflv2gui_la_SOURCES = gui.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_led.cpp custom_ctl.cpp modules.cpp giface.cpp preset.cpp synth.cpp lv2gui.cpp main_win.cpp osctl.cpp osctlnet.cpp utils.cpp
62 if USE_DEBUG
63 calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat $(GUI_DEPS_LIBS) -disable-static
64 else
65 calflv2gui_la_LDFLAGS = -rpath $(lv2dir) -avoid-version -module -lexpat -export-symbols-regex "lv2_gui_descriptor" $(GUI_DEPS_LIBS) -disable-static
66 endif
67 endif
69 libcalfstatic_la_SOURCES = modules.cpp modules_dsp.cpp modules_small.cpp giface.cpp monosynth.cpp organ.cpp osctl.cpp osctlnet.cpp preset.cpp synth.cpp utils.cpp
70 libcalfstatic_la_LDFLAGS = -static -lexpat -disable-shared
72 if USE_GUI
73 libcalfgui_la_SOURCES = gui.cpp ctl_curve.cpp ctl_keyboard.cpp ctl_led.cpp preset_gui.cpp custom_ctl.cpp osctl.cpp osctlnet.cpp osctlserv.cpp main_win.cpp utils.cpp
74 libcalfgui_la_LDFLAGS = -static -disable-shared
75 endif
77 clean-local:
78         $(RM) -f calfjackhost *~
80 install-data-hook:
81         install -d -m 755 $(DESTDIR)$(pkgdatadir)    
82         install -c -m 644 $(top_srcdir)/presets.xml $(DESTDIR)$(pkgdatadir)
83         install -c -m 644 $(top_srcdir)/knob.png $(DESTDIR)$(pkgdatadir)
84         $(top_builddir)/src/calfmakerdf -m gui -p $(DESTDIR)$(pkgdatadir)
85         install -c -m 644 $(top_srcdir)/gui/gui-*.xml $(DESTDIR)$(pkgdatadir)
86 if USE_JACK
87         install -c -m 644 $(top_srcdir)/calf.glade $(DESTDIR)$(pkgdatadir)
88 endif
89 if USE_LADSPA
90         install -d -m 755 $(DESTDIR)$(with_ladspa_dir)
91         install -d -m 755 $(DESTDIR)$(with_ladspa_rdf_dir)
92         install -c -m 755 $(top_builddir)/src/.libs/calf.so $(DESTDIR)$(with_ladspa_dir)/calf.so
93         $(top_builddir)/src/calfmakerdf > $(DESTDIR)$(with_ladspa_rdf_dir)/calf.rdf
94 endif
95 if USE_DSSI
96         install -d -m 755 $(DESTDIR)$(with_dssi_dir)
97         install -d -m 755 $(DESTDIR)$(with_dssi_dir)/calf
98         install -c -m 755 $(top_builddir)/src/.libs/calf.so $(DESTDIR)$(with_dssi_dir)/calf.so
99 if USE_DSSI_GUI
100         install -c -m 755 $(top_builddir)/src/calfdssigui $(DESTDIR)$(with_dssi_dir)/calf/calf_gtk
101 endif
102 endif
103 if USE_LV2
104         install -d -m 755 $(DESTDIR)$(with_lv2_dir)/calf.lv2
105         install -c -m 755 $(top_builddir)/src/.libs/calf.so $(DESTDIR)$(with_lv2_dir)/calf.lv2/calf.so
106 if USE_LV2_GUI
107         install -c -m 755 $(top_builddir)/src/.libs/calflv2gui.so $(DESTDIR)$(with_lv2_dir)/calf.lv2/calflv2gui.so
108 endif
109         rm -f $(DESTDIR)$(with_lv2_dir)/calf.lv2/*.ttl
110         $(top_builddir)/src/calfmakerdf -m ttl -p $(DESTDIR)$(with_lv2_dir)/calf.lv2/
111 endif
113 #remove calf.so, calf.rdf and - if empty - ladspa dir in usr/share
114 uninstall-hook:
115 if USE_LV2
116 if USE_LV2_GUI
117         rm -f $(DESTDIR)$(with_lv2_dir)/calf.lv2/calflv2gui.so
118 endif
119         rm -f $(DESTDIR)$(with_lv2_dir)/calf.lv2/calf.so
120         rm -f $(DESTDIR)$(with_lv2_dir)/calf.lv2/*.ttl
121         rmdir -p $(DESTDIR)$(with_lv2_dir)/calf.lv2 || true
122 endif
123 if USE_JACK
124         rm -f $(DESTDIR)$(pkgdatadir)/calf.glade 
125 endif
126         rm -f $(DESTDIR)$(pkgdatadir)/gui-*.xml
127         rm -f $(DESTDIR)$(pkgdatadir)/presets.xml
128         rm -f $(DESTDIR)$(pkgdatadir)/knob.png
129         rmdir $(DESTDIR)$(pkgdatadir) || true
130 if USE_LADSPA
131         $(RM) -f $(DESTDIR)$(with_ladspa_dir)/calf.so
132         $(RM) -f $(DESTDIR)$(with_ladspa_rdf_dir)/calf.rdf
133         rmdir -p $(DESTDIR)$(with_ladspa_rdf_dir) || true
134 endif
135 if USE_DSSI
136         $(RM) -f $(DESTDIR)$(with_dssi_dir)/calf.so
137 if USE_DSSI_GUI
138         $(RM) -f $(DESTDIR)$(with_dssi_dir)/calf/calf_gtk
139 endif
140         rmdir -p $(DESTDIR)$(with_dssi_dir)/calf || true
141 endif
143 #install:
144 #       $(INSTALL) calfjackhost $(bindir)