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("""
57 ardour_ui_dependents.cc
63 automation_gain_line.cc
65 automation_pan_line.cc
66 automation_time_axis.cc
82 editor_canvas_events.cc
85 editor_export_audio.cc
99 editor_selection_list.cc
100 editor_tempodisplay.cc
103 gain_automation_time_axis.cc
109 imageframe_socket_handler.cc
110 imageframe_time_axis.cc
111 imageframe_time_axis_group.cc
112 imageframe_time_axis_view.cc
122 marker_time_axis_view.cc
125 meter_bridge_strip.cc
128 new_session_dialog.cc
131 pan_automation_time_axis.cc
139 redirect_automation_line.cc
140 redirect_automation_time_axis.cc
147 route_redirect_selection.cc
154 time_axis_view_item.cc
161 mtest_files=Split("""
166 vst_files = [ 'vst_pluginui.cc' ]
169 extra_sources += vst_files
171 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
172 gtkardour.Append(CXXFLAGS="-DDATA_DIR=\\\""+final_prefix+"/share\\\"")
173 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
175 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
177 gtkardour.Append(CXXFLAGS=versionflag)
179 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
181 executable = 'ardour.bin'
183 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
184 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
189 Default (env.VersionedExecutable ('tagged_executable', ardour))
192 i18n (gtkardour, gtkardour_files + extra_sources, env)
197 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour', ardour))
198 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_ui.rc'))
199 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour'), 'splash.ppm'))
202 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
204 'i18n.h', 'gettext.h',
205 'editor_xpms', 'misc_xpms', 'transport_xpms',
206 'ardour_ui.rc', 'splash.ppm'
208 gtkardour_files + vst_files +
209 glob.glob('po/*.po') + glob.glob('*.h')))
211 # generate a prototype full-featured ardour_ui.rc file
213 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
214 grep set_name $SOURCES | \
215 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
216 grep -v '\\.' | sort | uniq | \
217 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
218 fg[NORMAL] = { 0, 0, 0 }\\n\
219 fg[ACTIVE] = { 0, 0, 0 }\\n\
220 fg[SELECTED] = { 0, 0, 0 }\\n\
221 bg[NORMAL] = { 0, 0, 0 }\\n\
222 bg[ACTIVE] = { 0, 0, 0 }\\n\
223 bg[SELECTED] = { 0, 0, 0 }\\n\
224 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
225 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
226 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
227 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
229 awk '{ printf ("style \\"%s\\"\\n{\\n\
230 fg[NORMAL] = { 0, 0, 0 }\\n\
231 fg[ACTIVE] = { 0, 0, 0 }\\n\
232 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;