7 Import('env install_prefix final_prefix config_prefix libraries i18n ardour_version')
10 gtkmmtests = env.Copy()
13 # this defines the version number of the GTK interface to ardour
18 gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
19 gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
20 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
21 gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
22 gtkardour.Append(CPPPATH="#/") # for top level svn_revision.h
23 #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
24 gtkardour.Append(PACKAGE=domain)
25 gtkardour.Append(POTFILE=domain + '.pot')
29 libraries['ardour_cp'],
30 libraries['gtkmm2ext'],
35 libraries['libgnomecanvas2'],
36 libraries['libgnomecanvasmm'],
38 libraries['sndfile-ardour'],
49 libraries['soundtouch'],
50 libraries['samplerate'],
54 gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
67 if gtkardour['DMALLOC']:
68 gtkardour.Merge([libraries['dmalloc']])
69 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
71 if gtkardour['FFT_ANALYSIS']:
72 gtkardour.Merge ([libraries['fftw3f']])
73 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
75 skipped_files=Split("""
79 audiounit_files=Split("""
83 gtkardour_files=Split("""
90 ardour_ui_dependents.cc
97 audio_region_editor.cc
98 automation_gain_line.cc
100 automation_pan_line.cc
101 automation_time_axis.cc
117 editor_audio_import.cc
120 editor_canvas_events.cc
122 editor_edit_groups.cc
123 editor_export_audio.cc
132 editor_region_list.cc
137 editor_selection_list.cc
138 editor_tempodisplay.cc
141 export_session_dialog.cc
142 export_region_dialog.cc
143 export_range_markers_dialog.cc
144 gain_automation_time_axis.cc
157 new_session_dialog.cc
160 pan_automation_time_axis.cc
169 redirect_automation_line.cc
170 redirect_automation_time_axis.cc
179 route_redirect_selection.cc
189 time_axis_view_item.cc
197 fft_analysis_files=Split("""
203 pixmap_files = glob.glob('pixmaps/*.xpm')
204 icon_files = glob.glob ('icons/*.png')
206 intl_files = gtkardour_files + glob.glob('*.h')
208 mtest_files=Split("""
217 itest_files=Split("""
221 stest_files=Split("""
231 vst_files = [ 'vst_pluginui.cc' ]
234 extra_sources += vst_files
235 gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
241 imageframe_socket_handler.cc
242 imageframe_time_axis.cc
243 imageframe_time_axis_group.cc
244 imageframe_time_axis_view.cc
247 marker_time_axis_view.cc
253 extra_sources += cmt_files
254 gtkardour.Append (CCFLAGS="-DWITH_CMT")
256 if gtkardour['AUDIOUNITS']:
257 extra_sources += audiounit_files
258 gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
259 gtkardour.Append(LINKFLAGS='-framework Carbon')
260 gtkardour.Merge([libraries['appleutility']])
262 if env['FFT_ANALYSIS']:
263 extra_sources += fft_analysis_files
265 intl_files += extra_sources
267 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
268 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
270 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
272 gtkardour.Append(CXXFLAGS=versionflag)
274 executable = 'ardour-' + ardour_version
276 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
277 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
279 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
280 itest = gtkardour.Program(target = 'itest', source = itest_files)
281 rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
282 tt = gtkmmtests.Program(target = 'tt', source = tt_files)
287 # null substitution just to avoid ardour.bindings being in svn
290 ardourbindings = env.SubstInFile ('ardour.bindings', 'ardour.bindings.in', SUBST_DICT = my_subst_dict);
292 my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
293 my_subst_dict['%LIBDIR%'] = env['LIBDIR']
294 my_subst_dict['%VERSION%'] = ardour_version
296 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
297 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
299 ardourdev = env.SubstInFile ('ardev_common.sh','ardev_common.sh.in', SUBST_DICT = my_subst_dict);
300 env.AddPostAction (ardourdev, Chmod ('$TARGET', 0755))
302 Default(ardourbindings)
308 # the library - into the library dir
309 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardourlib))
313 Default (env.VersionedExecutable ('tagged_executable', ardour))
319 # the executable - into the library dir
320 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardour))
321 # the script - into the bin dir
322 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
325 i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
327 # configuration files
328 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_dark.rc'))
329 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui_light.rc'))
330 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
331 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
332 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
334 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2'), 'splash.png'))
335 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'pixmaps'), pixmap_files))
336 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'icons'), icon_files))
338 env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
341 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
343 'i18n.h', 'gettext.h',
345 'ardev_common.sh.in',
347 'ardour2_ui_dark.rc', 'ardour2_ui_light.rc', 'splash.png',
348 'ardour.menus', 'ardour.bindings.in', 'ardour.colors',
358 glob.glob('po/*.po') + glob.glob('*.h')))
360 # generate a prototype full-featured ardour_ui.rc file
362 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
363 grep set_name $SOURCES | \
364 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
365 grep -v '\\.' | sort | uniq | \
366 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
367 fg[NORMAL] = { 0, 0, 0 }\\n\
368 fg[ACTIVE] = { 0, 0, 0 }\\n\
369 fg[SELECTED] = { 0, 0, 0 }\\n\
370 bg[NORMAL] = { 0, 0, 0 }\\n\
371 bg[ACTIVE] = { 0, 0, 0 }\\n\
372 bg[SELECTED] = { 0, 0, 0 }\\n\
373 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
374 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
375 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
376 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
378 awk '{ printf ("style \\"%s\\"\\n{\\n\
379 fg[NORMAL] = { 0, 0, 0 }\\n\
380 fg[ACTIVE] = { 0, 0, 0 }\\n\
381 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;