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(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
19 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
20 gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
21 #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
22 gtkardour.Append(PACKAGE=domain)
23 gtkardour.Append(POTFILE=domain + '.pot')
27 libraries['ardour_cp'],
28 libraries['gtkmm2ext'],
29 # libraries['flowcanvas'],
34 libraries['libgnomecanvas2'],
35 libraries['libgnomecanvasmm'],
48 libraries['soundtouch'],
49 libraries['samplerate'],
53 if gtkardour['DMALLOC']:
54 gtkardour.Merge([libraries['dmalloc']])
55 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
57 if gtkardour['FFT_ANALYSIS']:
58 gtkardour.Merge ([libraries['fftw3f']])
59 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
61 skipped_files=Split("""
65 gtkardour_files=Split("""
72 ardour_ui_dependents.cc
79 automation_gain_line.cc
81 automation_pan_line.cc
82 automation_time_axis.cc
97 editor_audio_import.cc
100 editor_canvas_events.cc
102 editor_edit_groups.cc
103 editor_export_audio.cc
113 editor_region_list.cc
117 editor_selection_list.cc
118 editor_tempodisplay.cc
121 export_session_dialog.cc
122 export_region_dialog.cc
123 export_range_markers_dialog.cc
124 gain_automation_time_axis.cc
131 imageframe_socket_handler.cc
132 imageframe_time_axis.cc
133 imageframe_time_axis_group.cc
134 imageframe_time_axis_view.cc
142 marker_time_axis_view.cc
145 meter_bridge_strip.cc
148 new_session_dialog.cc
151 pan_automation_time_axis.cc
159 redirect_automation_line.cc
160 redirect_automation_time_axis.cc
167 route_redirect_selection.cc
176 time_axis_view_item.cc
184 fft_analysis_files=Split("""
190 pixmap_files=glob.glob('pixmaps/*.xpm')
192 intl_files = gtkardour_files + glob.glob('*.h')
194 mtest_files=Split("""
198 itest_files=Split("""
204 vst_files = [ 'vst_pluginui.cc' ]
207 extra_sources += vst_files
208 gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
210 if env['FFT_ANALYSIS']:
211 extra_sources += fft_analysis_files
213 intl_files += extra_sources
215 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
216 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
218 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
220 gtkardour.Append(CXXFLAGS=versionflag)
222 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
224 executable = 'ardour.bin'
226 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
227 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
229 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
230 itest = gtkardour.Program(target = 'itest', source = itest_files)
233 my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
235 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
236 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
240 # the library - into the library dir
241 env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardourlib))
245 Default (env.VersionedExecutable ('tagged_executable', ardour))
251 # the executable - into the library dir
252 env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardour))
253 # the script - into the bin dir
254 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
257 Export('gtkardour', 'intl_files')
258 SConscript ('po/SConscript')
260 # configuration files
261 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
262 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
263 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
264 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
266 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
267 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
271 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
273 'i18n.h', 'gettext.h',
275 'ardour2_ui.rc', 'splash.ppm',
276 'ardour.menus', 'ardour.bindings', 'ardour.colors',
279 gtkardour_files + vst_files + pixmap_files +
280 glob.glob('po/*.po') + glob.glob('*.h')))
282 # generate a prototype full-featured ardour_ui.rc file
284 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
285 grep set_name $SOURCES | \
286 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
287 grep -v '\\.' | sort | uniq | \
288 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
289 fg[NORMAL] = { 0, 0, 0 }\\n\
290 fg[ACTIVE] = { 0, 0, 0 }\\n\
291 fg[SELECTED] = { 0, 0, 0 }\\n\
292 bg[NORMAL] = { 0, 0, 0 }\\n\
293 bg[ACTIVE] = { 0, 0, 0 }\\n\
294 bg[SELECTED] = { 0, 0, 0 }\\n\
295 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
296 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
297 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
298 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
300 awk '{ printf ("style \\"%s\\"\\n{\\n\
301 fg[NORMAL] = { 0, 0, 0 }\\n\
302 fg[ACTIVE] = { 0, 0, 0 }\\n\
303 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;