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(CXXFLAGS="-DGLIBMM_DISABLE_DEPRECATED")
23 gtkardour.Append(CXXFLAGS="-DGDKMM_DISABLE_DEPRECATED")
24 gtkardour.Append(CXXFLAGS="-DGTKMM_DISABLE_DEPRECATED")
25 gtkardour.Append(CPPPATH="#/") # for top level svn_revision.h
26 #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
27 gtkardour.Append(PACKAGE=domain)
28 gtkardour.Append(POTFILE=domain + '.pot')
32 libraries['ardour_cp'],
33 libraries['gtkmm2ext'],
38 libraries['libgnomecanvas2'],
39 libraries['libgnomecanvasmm'],
41 libraries['sndfile-ardour'],
53 libraries['soundtouch'],
54 libraries['samplerate'],
58 gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
71 if gtkardour['DMALLOC']:
72 gtkardour.Merge([libraries['dmalloc']])
73 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
75 if gtkardour['FFT_ANALYSIS']:
76 gtkardour.Merge ([libraries['fftw3f']])
77 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
79 skipped_files=Split("""
83 audiounit_files=Split("""
87 gtkardour_files=Split("""
94 ardour_ui_dependents.cc
102 automation_gain_line.cc
104 automation_pan_line.cc
105 automation_time_axis.cc
121 editor_audio_import.cc
124 editor_canvas_events.cc
126 editor_edit_groups.cc
127 editor_export_audio.cc
137 editor_region_list.cc
142 editor_selection_list.cc
143 editor_tempodisplay.cc
146 export_session_dialog.cc
147 export_region_dialog.cc
148 export_range_markers_dialog.cc
149 gain_automation_time_axis.cc
155 imageframe_socket_handler.cc
156 imageframe_time_axis.cc
157 imageframe_time_axis_group.cc
158 imageframe_time_axis_view.cc
167 marker_time_axis_view.cc
171 new_session_dialog.cc
174 pan_automation_time_axis.cc
183 redirect_automation_line.cc
184 redirect_automation_time_axis.cc
186 audio_region_editor.cc
192 route_redirect_selection.cc
202 time_axis_view_item.cc
210 fft_analysis_files=Split("""
216 pixmap_files = glob.glob('pixmaps/*.xpm')
217 icon_files = glob.glob ('icons/*.png')
219 intl_files = gtkardour_files + glob.glob('*.h')
221 mtest_files=Split("""
230 itest_files=Split("""
234 stest_files=Split("""
244 vst_files = [ 'vst_pluginui.cc' ]
247 extra_sources += vst_files
248 gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
250 if gtkardour['AUDIOUNITS']:
251 extra_sources += audiounit_files
252 gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
253 gtkardour.Append(LINKFLAGS='-framework Carbon')
254 gtkardour.Merge([libraries['appleutility']])
256 if env['FFT_ANALYSIS']:
257 extra_sources += fft_analysis_files
259 intl_files += extra_sources
261 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
262 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
264 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
266 gtkardour.Append(CXXFLAGS=versionflag)
268 executable = 'ardour-' + ardour_version
270 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
271 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
273 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
274 itest = gtkardour.Program(target = 'itest', source = itest_files)
275 rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
276 tt = gtkmmtests.Program(target = 'tt', source = tt_files)
281 # null substitution just to avoid ardour.bindings being in svn
284 ardourbindings = env.SubstInFile ('ardour.bindings', 'ardour.bindings.in', SUBST_DICT = my_subst_dict);
286 my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
287 my_subst_dict['%LIBDIR%'] = env['LIBDIR']
288 my_subst_dict['%VERSION%'] = ardour_version
290 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
291 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
293 ardourdev = env.SubstInFile ('ardev_common.sh','ardev_common.sh.in', SUBST_DICT = my_subst_dict);
294 env.AddPostAction (ardourdev, Chmod ('$TARGET', 0755))
296 Default(ardourbindings)
302 # the library - into the library dir
303 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardourlib))
307 Default (env.VersionedExecutable ('tagged_executable', ardour))
313 # the executable - into the library dir
314 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardour))
315 # the script - into the bin dir
316 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
319 i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
321 # configuration files
322 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
323 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
324 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
325 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
327 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2'), 'splash.png'))
328 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'pixmaps'), pixmap_files))
329 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'icons'), icon_files))
331 env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
334 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
336 'i18n.h', 'gettext.h',
338 'ardev_common.sh.in',
340 'ardour2_ui.rc', 'splash.png',
341 'ardour.menus', 'ardour.bindings.in', 'ardour.colors',
351 glob.glob('po/*.po') + glob.glob('*.h')))
353 # generate a prototype full-featured ardour_ui.rc file
355 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
356 grep set_name $SOURCES | \
357 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
358 grep -v '\\.' | sort | uniq | \
359 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
360 fg[NORMAL] = { 0, 0, 0 }\\n\
361 fg[ACTIVE] = { 0, 0, 0 }\\n\
362 fg[SELECTED] = { 0, 0, 0 }\\n\
363 bg[NORMAL] = { 0, 0, 0 }\\n\
364 bg[ACTIVE] = { 0, 0, 0 }\\n\
365 bg[SELECTED] = { 0, 0, 0 }\\n\
366 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
367 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
368 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
369 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
371 awk '{ printf ("style \\"%s\\"\\n{\\n\
372 fg[NORMAL] = { 0, 0, 0 }\\n\
373 fg[ACTIVE] = { 0, 0, 0 }\\n\
374 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;