Heavy-duty abstraction work to split type-specific classes into
[ardour.git] / gtk2_ardour / SConscript
index 9c9e1b5ce5157d05c386eee5b77c3c884042c731..43dd09cfb4d08ee0bc1b0104987c04e6b5428402 100644 (file)
@@ -15,155 +15,206 @@ gtkardour = env.Copy()
 domain = 'gtk_ardour'
 
 gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
+gtkardour.Append(CCFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
-gtkardour.Append(CCFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+gtkardour.Append(CXXFLAGS="-DLIBSIGC_DISABLE_DEPRECATED")
+#gtkardour.Append(CXXFLAGS="-DFLOWCANVAS_AA")
 gtkardour.Append(PACKAGE=domain)
 gtkardour.Append(POTFILE=domain + '.pot')
 
-gtkardour.Merge ( [libraries['ardour'],
-                   libraries['gtkmm2ext'],
-                   libraries['midi++2'],
-                   libraries['pbd3'],
-                   libraries['gtkmm2'],
-                   libraries['sigc2'],
-                   libraries['libgnomecanvasmm'],
-                   libraries['sysmidi'],
-                   libraries['sndfile'],
-                   libraries['lrdf'],
-                   libraries['glibmm2'],
-                   libraries['pangomm'],
-                   libraries['atkmm'],
-                   libraries['gdkmm2'],
-                   libraries['gtk2'],
-                   libraries['libgnomecanvas2'],
-                   libraries['xml'],
-                   libraries['soundtouch'],
-                   libraries['raptor'],
-                   libraries['samplerate'],
-                   libraries['jack']]
-              )
-
-if gtkardour['VST']:
-    gtkardour.Merge ([ libraries['fst']])
+gtkardour.Merge ([
+    libraries['ardour'],
+    libraries['ardour_cp'],
+    libraries['gtkmm2ext'],
+    libraries['midi++2'],
+    libraries['pbd'],
+    libraries['gtkmm2'],
+    libraries['glib2'],
+    libraries['libgnomecanvas2'],
+    libraries['libgnomecanvasmm'],
+    libraries['sysmidi'],
+    libraries['sndfile'],
+    libraries['flac'],
+    libraries['lrdf'],
+    libraries['glibmm2'],
+    libraries['pangomm'],
+    libraries['atkmm'],
+    libraries['gdkmm2'],
+    libraries['sigc2'],
+    libraries['gtk2'],
+    libraries['xml'],
+    libraries['xslt'],
+    libraries['soundtouch'],
+    libraries['samplerate'],
+    libraries['jack']
+])
+
+if gtkardour['DMALLOC']:
+       gtkardour.Merge([libraries['dmalloc']])
+       gtkardour.Append(CCFLAGS='-DUSE_DMALLOC')
+
+if gtkardour['FFT_ANALYSIS']:
+       gtkardour.Merge ([libraries['fftw3f']])
+       gtkardour.Append(CCFLAGS='-DFFT_ANALYSIS')
+
+skipped_files=Split("""
+connection_editor.cc
+""")
+
 
 gtkardour_files=Split("""
+about.cc
+actions.cc
 add_route_dialog.cc
 ardour_dialog.cc
-ardour_message.cc
-audio_clock.cc
-automation_gain_line.cc
-axis_view.cc
-default_keys.cc
-editing.cc
-gain_automation_time_axis.cc
-grouped_buttons.cc
-gtk-custom-hruler.c
-gtk-custom-ruler.c
-keyboard.cc
-keyboard_target.cc
-meter_bridge_strip.cc
-opts.cc
-pan_automation_time_axis.cc
-prompter.cc
-redirect_automation_line.cc
-redirect_automation_time_axis.cc
-route_redirect_selection.cc
-tempo_dialog.cc
-time_selection.cc
-version.cc
+ardour_ui.cc
+ardour_ui2.cc
 ardour_ui_dependents.cc
+ardour_ui_dialogs.cc
+ardour_ui_ed.cc
 ardour_ui_mixer.cc
+ardour_ui_options.cc
+audio_clock.cc
+route_time_axis.cc
+audio_time_axis.cc
+automation_gain_line.cc
+automation_line.cc
 automation_pan_line.cc
-curvetest.cc
-editor_scrub.cc
-ghostregion.cc
-imageframe_time_axis.cc
-imageframe_time_axis_view.cc
-imageframe_view.cc
-marker.cc
-marker_time_axis.cc
-marker_time_axis_view.cc
-marker_view.cc
-public_editor.cc
-region_gain_line.cc
-region_selection.cc
-selection.cc
-ardour_ui_ed.cc
-canvas-ruler.c
+automation_time_axis.cc
+axis_view.cc
+canvas-imageframe.c
 canvas-simpleline.c
+simpleline.cc
 canvas-simplerect.c
+simplerect.cc
 canvas-waveview.c
+color_manager.cc
+crossfade_edit.cc
+crossfade_view.cc
+curvetest.cc
+editing.cc
+editor.cc
+editor_actions.cc
+editor_audio_import.cc
 editor_audiotrack.cc
+editor_canvas.cc
 editor_canvas_events.cc
 editor_cursors.cc
+editor_edit_groups.cc
 editor_export_audio.cc
-editor_keys.cc
-editor_nudge.cc
-editor_timefx.cc
-imageframe_time_axis_group.cc
-send_ui.cc
-time_axis_view.cc
-editor_markers.cc
-editor_tempodisplay.cc
-main.cc
-panner2d.cc
-region_editor.cc
-streamview.cc
-utils.cc
-automation_time_axis.cc
-connection_editor.cc
-crossfade_edit.cc
-crossfade_view.cc
 editor_hscroller.cc
-editor_mixer.cc
-imageframe_socket_handler.cc
-location_ui.cc
-route_ui.cc
-time_axis_view_item.cc
-visual_time_axis.cc
-ardour_ui.cc
-ardour_ui2.cc
-ardour_ui_dialogs.cc
-audio_time_axis.cc
-automation_line.cc
-canvas-imageframe.cc
-about.cc
-editor.cc
-editor_edit_groups.cc
 editor_imageframe.cc
 editor_keyboard.cc
+editor_keys.cc
+editor_markers.cc
+editor_mixer.cc
 editor_mouse.cc
+editor_nudge.cc
 editor_ops.cc
 editor_region_list.cc
 editor_route_list.cc
 editor_rulers.cc
+editor_scrub.cc
 editor_selection_list.cc
+editor_tempodisplay.cc
+editor_timefx.cc
 export_dialog.cc
+export_session_dialog.cc
+export_region_dialog.cc
+export_range_markers_dialog.cc
+gain_automation_time_axis.cc
 gain_meter.cc
+ghostregion.cc
+grouped_buttons.cc
+gtk-custom-hruler.c
+gtk-custom-ruler.c
+imageframe.cc
+imageframe_socket_handler.cc
+imageframe_time_axis.cc
+imageframe_time_axis_group.cc
+imageframe_time_axis_view.cc
+imageframe_view.cc
 io_selector.cc
-library_ui.cc
-meter_bridge.cc
+keyboard.cc
+location_ui.cc
+main.cc
+marker.cc
+marker_time_axis.cc
+marker_time_axis_view.cc
+marker_view.cc
 mixer_strip.cc
 mixer_ui.cc
 new_session_dialog.cc
 option_editor.cc
+opts.cc
+pan_automation_time_axis.cc
+panner2d.cc
 panner_ui.cc
 playlist_selector.cc
 plugin_selector.cc
 plugin_ui.cc
+prompter.cc
+public_editor.cc
+redirect_automation_line.cc
+redirect_automation_time_axis.cc
 redirect_box.cc
-regionview.cc
+audio_region_editor.cc
+region_gain_line.cc
+region_selection.cc
+region_view.cc
+audio_region_view.cc
 route_params_ui.cc
+route_redirect_selection.cc
+route_ui.cc
+selection.cc
+sfdb_ui.cc
+send_ui.cc
+streamview.cc
+audio_streamview.cc
+tape_region_view.cc
+tempo_dialog.cc
+time_axis_view.cc
+time_axis_view_item.cc
+time_selection.cc
+utils.cc
+version.cc
+visual_time_axis.cc
+waveview.cc
+""")
+
+
+fft_analysis_files=Split("""
+analysis_window.cc
+fft_graph.cc
+fft_result.cc
+""")
+
+pixmap_files=glob.glob('pixmaps/*.xpm')
+
+intl_files = gtkardour_files + glob.glob('*.h')
+
+mtest_files=Split("""
+mtest.cc
+""")
+
+itest_files=Split("""
+itest.cc
 """)
 
 extra_sources = []
+
 vst_files = [ 'vst_pluginui.cc' ]
 
 if env['VST']:
-   extra_sources += vst_files
+       extra_sources += vst_files
+       gtkardour.Append (CCFLAGS="-DVST_SUPPORT", CPPPATH="#libs/fst")
+  
+if env['FFT_ANALYSIS']:
+       extra_sources += fft_analysis_files
+
+intl_files += extra_sources
 
 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
-gtkardour.Append(CXXFLAGS="-DDATA_DIR=\\\""+final_prefix+"/share\\\"")
 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
 
 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
@@ -175,30 +226,58 @@ gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
 executable = 'ardour.bin'
 
 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
+ardourlib = gtkardour.SharedLibrary(target = 'ardourgtk', source = gtkardour_files + extra_sources)
 
-Default(ardour)
+mtest = gtkardour.Program(target = 'mtest', source = mtest_files)
+itest = gtkardour.Program(target = 'itest', source = itest_files)
 
-if env['VERSIONED']:
-    Default (env.VersionedExecutable ('tagged_executable', ardour))
+my_subst_dict = { }
+my_subst_dict['%INSTALL_PREFIX%'] = install_prefix
 
-if env['NLS']:
-    i18n (gtkardour, gtkardour_files + extra_sources, env)
+ardoursh = env.SubstInFile ('ardour.sh','ardour.sh.in', SUBST_DICT = my_subst_dict);
+env.AddPostAction (ardoursh, Chmod ('$TARGET', 0755))
 
-#install
+if env['VST']:
+       Default(ardourlib)
+       # the library - into the library dir
+       env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardourlib))
+else:
+
+       if env['VERSIONED']:
+               Default (env.VersionedExecutable ('tagged_executable', ardour))
+       else:
+               Default(ardour)
 
+        #install
 
-env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour', ardour))
-env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_ui.rc'))
-env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour'), 'splash.ppm'))
+       # the executable - into the library dir
+       env.Alias('install', env.Install(os.path.join(install_prefix, 'lib/ardour2'), ardour))
+       # the script - into the bin dir
+       env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour2', ardoursh))
+
+if env['NLS']:
+       i18n (gtkardour, gtkardour_files+skipped_files+fft_analysis_files, env)
+    
+# configuration files
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour2_ui.rc'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.menus'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.bindings'))
+env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour2'), 'ardour.colors'))
+# data files
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2'), 'splash.ppm'))
+env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour2/pixmaps'), pixmap_files))
 
+               
 #dist
 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
                                       [ 'SConscript',
                                         'i18n.h', 'gettext.h',
-                                        'editor_xpms', 'misc_xpms', 'transport_xpms',
-                                        'ardour_ui.rc', 'splash.ppm'
+                                       'ardour.sh.in',
+                                        'ardour2_ui.rc', 'splash.ppm',
+                                        'ardour.menus', 'ardour.bindings', 'ardour.colors',
+                                       'editor_xpms'
                                         ] +
-                                      gtkardour_files + vst_files +
+                                      gtkardour_files + vst_files + pixmap_files +
                                       glob.glob('po/*.po') + glob.glob('*.h')))
 
 # generate a prototype full-featured ardour_ui.rc file