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(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
19 gtkardour.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
20 gtkardour.Append(PACKAGE=domain)
21 gtkardour.Append(POTFILE=domain + '.pot')
25 libraries['gtkmm2ext'],
29 libraries['libgnomecanvasmm'],
39 libraries['libgnomecanvas2'],
41 libraries['soundtouch'],
43 libraries['samplerate'],
48 gtkardour.Merge ([ libraries['fst']])
50 gtkardour_files=Split("""
55 automation_gain_line.cc
59 gain_automation_time_axis.cc
67 pan_automation_time_axis.cc
69 redirect_automation_line.cc
70 redirect_automation_time_axis.cc
71 route_redirect_selection.cc
75 ardour_ui_dependents.cc
77 automation_pan_line.cc
81 imageframe_time_axis.cc
82 imageframe_time_axis_view.cc
86 marker_time_axis_view.cc
98 editor_canvas_events.cc
100 editor_export_audio.cc
104 imageframe_time_axis_group.cc
108 editor_tempodisplay.cc
114 automation_time_axis.cc
120 imageframe_socket_handler.cc
123 time_axis_view_item.cc
133 editor_edit_groups.cc
138 editor_region_list.cc
141 editor_selection_list.cc
149 new_session_dialog.cc
160 mtest_files=Split("""
165 vst_files = [ 'vst_pluginui.cc' ]
168 extra_sources += vst_files
170 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
171 gtkardour.Append(CXXFLAGS="-DDATA_DIR=\\\""+final_prefix+"/share\\\"")
172 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
174 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
176 gtkardour.Append(CXXFLAGS=versionflag)
178 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
180 executable = 'ardour.bin'
182 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
183 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
188 Default (env.VersionedExecutable ('tagged_executable', ardour))
191 i18n (gtkardour, gtkardour_files + extra_sources, env)
196 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour', ardour))
197 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_ui.rc'))
198 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour'), 'splash.ppm'))
201 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
203 'i18n.h', 'gettext.h',
204 'editor_xpms', 'misc_xpms', 'transport_xpms',
205 'ardour_ui.rc', 'splash.ppm'
207 gtkardour_files + vst_files +
208 glob.glob('po/*.po') + glob.glob('*.h')))
210 # generate a prototype full-featured ardour_ui.rc file
212 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
213 grep set_name $SOURCES | \
214 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
215 grep -v '\\.' | sort | uniq | \
216 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
217 fg[NORMAL] = { 0, 0, 0 }\\n\
218 fg[ACTIVE] = { 0, 0, 0 }\\n\
219 fg[SELECTED] = { 0, 0, 0 }\\n\
220 bg[NORMAL] = { 0, 0, 0 }\\n\
221 bg[ACTIVE] = { 0, 0, 0 }\\n\
222 bg[SELECTED] = { 0, 0, 0 }\\n\
223 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
224 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
225 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
226 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
228 awk '{ printf ("style \\"%s\\"\\n{\\n\
229 fg[NORMAL] = { 0, 0, 0 }\\n\
230 fg[ACTIVE] = { 0, 0, 0 }\\n\
231 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;