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'],
33 libraries['libgnomecanvas2'],
34 libraries['libgnomecanvasmm'],
47 libraries['soundtouch'],
48 libraries['samplerate'],
52 if gtkardour['DMALLOC']:
53 gtkardour.Merge([libraries['dmalloc']])
54 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
56 if gtkardour['FFT_ANALYSIS']:
57 gtkardour.Merge ([libraries['fftw3f']])
58 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
60 skipped_files=Split("""
64 coreaudio_files=Split("""
68 gtkardour_files=Split("""
75 ardour_ui_dependents.cc
83 automation_gain_line.cc
85 automation_pan_line.cc
86 automation_time_axis.cc
101 editor_audio_import.cc
104 editor_canvas_events.cc
106 editor_edit_groups.cc
107 editor_export_audio.cc
117 editor_region_list.cc
121 editor_selection_list.cc
122 editor_tempodisplay.cc
125 export_session_dialog.cc
126 export_region_dialog.cc
127 export_range_markers_dialog.cc
128 gain_automation_time_axis.cc
135 imageframe_socket_handler.cc
136 imageframe_time_axis.cc
137 imageframe_time_axis_group.cc
138 imageframe_time_axis_view.cc
147 marker_time_axis_view.cc
151 new_session_dialog.cc
154 pan_automation_time_axis.cc
162 redirect_automation_line.cc
163 redirect_automation_time_axis.cc
165 audio_region_editor.cc
171 route_redirect_selection.cc
181 time_axis_view_item.cc
189 fft_analysis_files=Split("""
195 pixmap_files=glob.glob('pixmaps/*.xpm')
197 intl_files = gtkardour_files + glob.glob('*.h')
199 mtest_files=Split("""
203 itest_files=Split("""
209 vst_files = [ 'vst_pluginui.cc' ]
212 extra_sources += vst_files
213 gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
215 if gtkardour['COREAUDIO']:
216 extra_sources += coreaudio_files
217 gtkardour.Append(CCFLAGS='-DHAVE_COREAUDIO')
218 gtkardour.Merge([libraries['appleutility']])
220 if env['FFT_ANALYSIS']:
221 extra_sources += fft_analysis_files
223 intl_files += extra_sources
225 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
226 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
228 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
230 gtkardour.Append(CXXFLAGS=versionflag)
232 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
234 executable = 'ardour.bin'
236 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
237 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
239 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
240 itest = gtkardour.Program(target = 'itest', source = itest_files)
243 my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
245 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
246 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
250 # the library - into the library dir
251 env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardourlib))
255 Default (env.VersionedExecutable ('tagged_executable', ardour))
261 # the executable - into the library dir
262 env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardour))
263 # the script - into the bin dir
264 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
267 i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
269 # configuration files
270 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
271 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
272 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
273 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
275 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
276 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
280 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
282 'i18n.h', 'gettext.h',
284 'ardour2_ui.rc', 'splash.ppm',
285 'ardour.menus', 'ardour.bindings', 'ardour.colors',
288 gtkardour_files + vst_files + pixmap_files +
289 glob.glob('po/*.po') + glob.glob('*.h')))
291 # generate a prototype full-featured ardour_ui.rc file
293 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
294 grep set_name $SOURCES | \
295 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
296 grep -v '\\.' | sort | uniq | \
297 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
298 fg[NORMAL] = { 0, 0, 0 }\\n\
299 fg[ACTIVE] = { 0, 0, 0 }\\n\
300 fg[SELECTED] = { 0, 0, 0 }\\n\
301 bg[NORMAL] = { 0, 0, 0 }\\n\
302 bg[ACTIVE] = { 0, 0, 0 }\\n\
303 bg[SELECTED] = { 0, 0, 0 }\\n\
304 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
305 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
306 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
307 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
309 awk '{ printf ("style \\"%s\\"\\n{\\n\
310 fg[NORMAL] = { 0, 0, 0 }\\n\
311 fg[ACTIVE] = { 0, 0, 0 }\\n\
312 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;