7 Import('env install_prefix final_prefix config_prefix libraries i18n version')
12 # this defines the version number of the GTK interface to ardour
17 gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
18 gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
19 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
20 gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
21 #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
22 gtkardour.Append(PACKAGE=domain)
23 gtkardour.Append(POTFILE=domain + '.pot')
27 libraries['gtkmm2ext'],
28 # libraries['flowcanvas'],
33 libraries['libgnomecanvas2'],
34 libraries['libgnomecanvasmm'],
46 libraries['soundtouch'],
47 libraries['samplerate'],
50 libraries['libglademm']
53 if gtkardour['DMALLOC']:
54 gtkardour.Merge([libraries['dmalloc']])
55 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
57 if gtkardour['FFT_ANALYSIS']:
58 gtkardour.Merge ([libraries['fftw3f']])
59 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
62 gtkardour.Merge ([ libraries['fst']])
64 skipped_files=Split("""
68 gtkardour_files=Split("""
75 ardour_ui_dependents.cc
82 automation_gain_line.cc
84 automation_pan_line.cc
85 automation_time_axis.cc
100 editor_audio_import.cc
103 editor_canvas_events.cc
105 editor_edit_groups.cc
106 editor_export_audio.cc
116 editor_region_list.cc
120 editor_selection_list.cc
121 editor_tempodisplay.cc
124 export_session_dialog.cc
125 export_region_dialog.cc
126 export_range_markers_dialog.cc
127 gain_automation_time_axis.cc
136 imageframe_socket_handler.cc
137 imageframe_time_axis.cc
138 imageframe_time_axis_group.cc
139 imageframe_time_axis_view.cc
147 marker_time_axis_view.cc
150 meter_bridge_strip.cc
153 new_session_dialog.cc
156 pan_automation_time_axis.cc
164 redirect_automation_line.cc
165 redirect_automation_time_axis.cc
172 route_redirect_selection.cc
181 time_axis_view_item.cc
189 fft_analysis_files=Split("""
195 glade_files=glob.glob('glade/*.glade')
196 pixmap_files=glob.glob('pixmaps/*.xpm')
198 intl_files = gtkardour_files + glade_files + glob.glob('*.h')
200 mtest_files=Split("""
204 itest_files=Split("""
209 vst_files = [ 'vst_pluginui.cc' ]
212 extra_sources += vst_files
214 if env['FFT_ANALYSIS']:
215 extra_sources += fft_analysis_files
218 intl_files += extra_sources
220 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
221 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
222 gtkardour.Append(CXXFLAGS="-DGLADEPATH=\\\""+final_prefix+"/share/ardour/glade\\\"")
224 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
226 gtkardour.Append(CXXFLAGS=versionflag)
228 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
230 executable = 'ardour.bin'
232 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
233 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
234 itest = gtkardour.Program(target = 'itest', source = itest_files)
237 my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
239 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
240 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
245 Default (env.VersionedExecutable ('tagged_executable', ardour))
248 Export('gtkardour', 'intl_files')
249 SConscript ('po/SConscript')
253 # the executable - into the library dir
254 env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardour))
255 # the script - into the bin dir
256 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
257 # configuration files
258 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
259 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
260 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
261 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
263 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
264 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
265 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/glade'), glade_files))
268 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
270 'i18n.h', 'gettext.h',
271 'ardour2_ui.rc', 'splash.ppm',
272 'ardour.menus', 'ardour.bindings', 'ardour.colors',
275 gtkardour_files + vst_files + glade_files + pixmap_files +
276 glob.glob('po/*.po') + glob.glob('*.h')))
278 # generate a prototype full-featured ardour_ui.rc file
280 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
281 grep set_name $SOURCES | \
282 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
283 grep -v '\\.' | sort | uniq | \
284 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
285 fg[NORMAL] = { 0, 0, 0 }\\n\
286 fg[ACTIVE] = { 0, 0, 0 }\\n\
287 fg[SELECTED] = { 0, 0, 0 }\\n\
288 bg[NORMAL] = { 0, 0, 0 }\\n\
289 bg[ACTIVE] = { 0, 0, 0 }\\n\
290 bg[SELECTED] = { 0, 0, 0 }\\n\
291 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
292 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
293 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
294 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
296 awk '{ printf ("style \\"%s\\"\\n{\\n\
297 fg[NORMAL] = { 0, 0, 0 }\\n\
298 fg[ACTIVE] = { 0, 0, 0 }\\n\
299 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;