7 Import('env install_prefix final_prefix config_prefix libraries i18n ardour_version')
10 gtkmmtests = env.Copy()
13 # this defines the version number of the GTK interface to ardour
18 gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
19 gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
20 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
21 gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
22 gtkardour.Append(CPPPATH="#/") # for top level svn_revision.h
23 #gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
24 gtkardour.Append(PACKAGE=domain)
25 gtkardour.Append(POTFILE=domain + '.pot')
29 libraries['ardour_cp'],
30 libraries['gtkmm2ext'],
35 libraries['libgnomecanvas2'],
36 libraries['libgnomecanvasmm'],
38 libraries['sndfile-ardour'],
50 libraries['soundtouch'],
51 libraries['samplerate'],
55 gtkmmtests.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
68 if gtkardour['DMALLOC']:
69 gtkardour.Merge([libraries['dmalloc']])
70 gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
72 if gtkardour['FFT_ANALYSIS']:
73 gtkardour.Merge ([libraries['fftw3f']])
74 gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
76 skipped_files=Split("""
80 audiounit_files=Split("""
84 gtkardour_files=Split("""
91 ardour_ui_dependents.cc
99 automation_gain_line.cc
101 automation_pan_line.cc
102 automation_time_axis.cc
118 editor_audio_import.cc
121 editor_canvas_events.cc
123 editor_edit_groups.cc
124 editor_export_audio.cc
134 editor_region_list.cc
139 editor_selection_list.cc
140 editor_tempodisplay.cc
143 export_session_dialog.cc
144 export_region_dialog.cc
145 export_range_markers_dialog.cc
146 gain_automation_time_axis.cc
152 imageframe_socket_handler.cc
153 imageframe_time_axis.cc
154 imageframe_time_axis_group.cc
155 imageframe_time_axis_view.cc
164 marker_time_axis_view.cc
168 new_session_dialog.cc
171 pan_automation_time_axis.cc
180 redirect_automation_line.cc
181 redirect_automation_time_axis.cc
183 audio_region_editor.cc
189 route_redirect_selection.cc
199 time_axis_view_item.cc
207 fft_analysis_files=Split("""
213 pixmap_files = glob.glob('pixmaps/*.xpm')
214 icon_files = glob.glob ('icons/*.png')
216 intl_files = gtkardour_files + glob.glob('*.h')
218 mtest_files=Split("""
227 itest_files=Split("""
231 stest_files=Split("""
241 vst_files = [ 'vst_pluginui.cc' ]
244 extra_sources += vst_files
245 gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
247 if gtkardour['AUDIOUNITS']:
248 extra_sources += audiounit_files
249 gtkardour.Append(CCFLAGS='-DHAVE_AUDIOUNITS')
250 gtkardour.Append(LINKFLAGS='-framework Carbon')
251 gtkardour.Merge([libraries['appleutility']])
253 if env['FFT_ANALYSIS']:
254 extra_sources += fft_analysis_files
256 intl_files += extra_sources
258 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
259 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
261 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
263 gtkardour.Append(CXXFLAGS=versionflag)
265 executable = 'ardour-' + ardour_version
267 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
268 ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
270 mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
271 itest = gtkardour.Program(target = 'itest', source = itest_files)
272 rcu = gtkardour.Program(target = 'rcu', source = rcu_files)
273 tt = gtkmmtests.Program(target = 'tt', source = tt_files)
276 my_subst_dict['%INSTALL_PREFIX%'] = final_prefix
277 my_subst_dict['%LIBDIR%'] = env['LIBDIR']
278 my_subst_dict['%VERSION%'] = ardour_version
280 ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
281 env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
283 ardourdev = env.SubstInFile ('ardev_common.sh','ardev_common.sh.in', SUBST_DICT = my_subst_dict);
284 env.AddPostAction (ardourdev, Chmod ('$TARGET', 0755))
291 # the library - into the library dir
292 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardourlib))
296 Default (env.VersionedExecutable ('tagged_executable', ardour))
302 # the executable - into the library dir
303 env.Alias('install', env.Install(os.path.join(install_prefix, env['LIBDIR'], 'ardour2'), ardour))
304 # the script - into the bin dir
305 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
308 i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
310 # configuration files
311 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
312 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
313 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
314 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
316 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2'), 'splash.png'))
317 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'pixmaps'), pixmap_files))
318 env.Alias('install', env.Install(os.path.join(install_prefix, 'share', 'ardour2', 'icons'), icon_files))
320 env.Alias ('version', gtkardour.VersionBuild(['version.cc','version.h'], []))
323 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
325 'i18n.h', 'gettext.h',
327 'ardev_common.sh.in',
328 'ardour2_ui.rc', 'splash.png',
329 'ardour.menus', 'ardour.bindings', 'ardour.colors',
339 glob.glob('po/*.po') + glob.glob('*.h')))
341 # generate a prototype full-featured ardour_ui.rc file
343 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
344 grep set_name $SOURCES | \
345 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
346 grep -v '\\.' | sort | uniq | \
347 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
348 fg[NORMAL] = { 0, 0, 0 }\\n\
349 fg[ACTIVE] = { 0, 0, 0 }\\n\
350 fg[SELECTED] = { 0, 0, 0 }\\n\
351 bg[NORMAL] = { 0, 0, 0 }\\n\
352 bg[ACTIVE] = { 0, 0, 0 }\\n\
353 bg[SELECTED] = { 0, 0, 0 }\\n\
354 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
355 $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
356 grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
357 sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
359 awk '{ printf ("style \\"%s\\"\\n{\\n\
360 fg[NORMAL] = { 0, 0, 0 }\\n\
361 fg[ACTIVE] = { 0, 0, 0 }\\n\
362 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;