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(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
20 gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
21 gtkardour.Append(PACKAGE=domain)
22 gtkardour.Append(POTFILE=domain + '.pot')
26 libraries['gtkmm2ext'],
27 libraries['flowcanvas'],
31 libraries['libgnomecanvas2'],
32 libraries['libgnomecanvasmm'],
43 libraries['soundtouch'],
44 libraries['samplerate'],
49 gtkardour.Merge ([ libraries['fst']])
51 gtkardour_files=Split("""
59 ardour_ui_dependents.cc
65 automation_gain_line.cc
67 automation_pan_line.cc
68 automation_time_axis.cc
87 editor_canvas_events.cc
90 editor_export_audio.cc
100 editor_region_list.cc
104 editor_selection_list.cc
105 editor_tempodisplay.cc
108 gain_automation_time_axis.cc
114 imageframe_socket_handler.cc
115 imageframe_time_axis.cc
116 imageframe_time_axis_group.cc
117 imageframe_time_axis_view.cc
126 marker_time_axis_view.cc
129 meter_bridge_strip.cc
132 new_session_dialog.cc
135 pan_automation_time_axis.cc
143 redirect_automation_line.cc
144 redirect_automation_time_axis.cc
151 route_redirect_selection.cc
159 time_axis_view_item.cc
166 mtest_files=Split("""
171 vst_files = [ 'vst_pluginui.cc' ]
174 extra_sources += vst_files
176 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
177 gtkardour.Append(CXXFLAGS="-DDATA_DIR=\\\""+final_prefix+"/share\\\"")
178 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
180 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
182 gtkardour.Append(CXXFLAGS=versionflag)
184 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
186 executable = 'ardour.bin'
188 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
189 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
194 Default (env.VersionedExecutable ('tagged_executable', ardour))
197 i18n (gtkardour, gtkardour_files + extra_sources, env)
202 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour', ardour))
203 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_ui.rc'))
204 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour'), 'splash.ppm'))
207 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
209 'i18n.h', 'gettext.h',
210 'editor_xpms', 'misc_xpms', 'transport_xpms',
211 'ardour_ui.rc', 'splash.ppm'
213 gtkardour_files + vst_files +
214 glob.glob('po/*.po') + glob.glob('*.h')))
216 # generate a prototype full-featured ardour_ui.rc file
218 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
219 grep set_name $SOURCES | \
220 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
221 grep -v '\\.' | sort | uniq | \
222 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
223 fg[NORMAL] = { 0, 0, 0 }\\n\
224 fg[ACTIVE] = { 0, 0, 0 }\\n\
225 fg[SELECTED] = { 0, 0, 0 }\\n\
226 bg[NORMAL] = { 0, 0, 0 }\\n\
227 bg[ACTIVE] = { 0, 0, 0 }\\n\
228 bg[SELECTED] = { 0, 0, 0 }\\n\
229 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
230 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
231 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
232 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
234 awk '{ printf ("style \\"%s\\"\\n{\\n\
235 fg[NORMAL] = { 0, 0, 0 }\\n\
236 fg[ACTIVE] = { 0, 0, 0 }\\n\
237 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;