initial changes to get about.cc compiled
[ardour.git] / gtk2_ardour / SConscript
1 # -*- python -*-
2
3 import os
4 import os.path
5 import glob
6
7 Import('env install_prefix final_prefix config_prefix libraries i18n version')
8
9 gtkardour = env.Copy()
10
11 #
12 # this defines the version number of the GTK interface to ardour
13 #
14
15 domain = 'gtk_ardour'
16
17 gtkardour.Append(DOMAIN=domain, MAJOR=1,MINOR=0,MICRO=2)
18 gtkardour.Append(CXXFLAGS="-DPACKAGE=\\\"" + domain + "\\\"")
19 gtkardour.Append(PACKAGE=domain)
20 gtkardour.Append(POTFILE=domain + '.pot')
21
22 gtkardour.Merge ( [libraries['ardour'],
23                    libraries['gtkmm2ext'],
24                    libraries['midi++2'],
25                    libraries['pbd3'],
26                    libraries['gtkmm2'],
27                    libraries['sigc2'],
28                    libraries['libgnomecanvasmm'],
29                    libraries['sysmidi'],
30                    libraries['sndfile'],
31                    libraries['lrdf'],
32                    libraries['glibmm2'],
33                    libraries['pangomm'],
34                    libraries['atkmm'],
35                    libraries['gdkmm2'],
36                    libraries['gtk2'],
37                    libraries['libgnomecanvas2'],
38                    libraries['xml'],
39                    libraries['soundtouch'],
40                    libraries['raptor'],
41                    libraries['samplerate'],
42                    libraries['jack']]
43               )
44
45 if gtkardour['VST']:
46     gtkardour.Merge ([ libraries['fst']])
47
48 gtkardour_files=Split("""
49 add_route_dialog.cc
50 ardour_dialog.cc
51 ardour_message.cc
52 audio_clock.cc
53 automation_gain_line.cc
54 axis_view.cc
55 default_keys.cc
56 editing.cc
57 gain_automation_time_axis.cc
58 grouped_buttons.cc
59 gtk-custom-hruler.c
60 gtk-custom-ruler.c
61 keyboard.cc
62 keyboard_target.cc
63 meter_bridge_strip.cc
64 opts.cc
65 pan_automation_time_axis.cc
66 prompter.cc
67 redirect_automation_line.cc
68 redirect_automation_time_axis.cc
69 route_redirect_selection.cc
70 tempo_dialog.cc
71 time_selection.cc
72 version.cc
73 ardour_ui_dependents.cc
74 ardour_ui_mixer.cc
75 automation_pan_line.cc
76 curvetest.cc
77 editor_scrub.cc
78 ghostregion.cc
79 gtkscrolledwindow.c
80 imageframe_time_axis.cc
81 imageframe_time_axis_view.cc
82 imageframe_view.cc
83 marker.cc
84 marker_time_axis.cc
85 marker_time_axis_view.cc
86 marker_view.cc
87 public_editor.cc
88 region_gain_line.cc
89 region_selection.cc
90 selection.cc
91 ardour_ui_ed.cc
92 canvas-ruler.c
93 canvas-simpleline.c
94 canvas-simplerect.c
95 canvas-waveview.c
96 editor_audiotrack.cc
97 editor_canvas_events.cc
98 editor_cursors.cc
99 editor_export_audio.cc
100 editor_keys.cc
101 editor_nudge.cc
102 editor_timefx.cc
103 imageframe_time_axis_group.cc
104 send_ui.cc
105 time_axis_view.cc
106 editor_markers.cc
107 editor_tempodisplay.cc
108 main.cc
109 panner2d.cc
110 region_editor.cc
111 streamview.cc
112 utils.cc
113 automation_time_axis.cc
114 connection_editor.cc
115 crossfade_edit.cc
116 crossfade_view.cc
117 editor_hscroller.cc
118 editor_mixer.cc
119 imageframe_socket_handler.cc
120 location_ui.cc
121 route_ui.cc
122 time_axis_view_item.cc
123 visual_time_axis.cc
124 ardour_ui.cc
125 ardour_ui2.cc
126 ardour_ui_dialogs.cc
127 audio_time_axis.cc
128 automation_line.cc
129 canvas-imageframe.cc
130 about.cc
131 editor.cc
132 editor_edit_groups.cc
133 editor_imageframe.cc
134 editor_keyboard.cc
135 editor_mouse.cc
136 editor_ops.cc
137 editor_region_list.cc
138 editor_route_list.cc
139 editor_rulers.cc
140 editor_selection_list.cc
141 export_dialog.cc
142 gain_meter.cc
143 io_selector.cc
144 library_ui.cc
145 meter_bridge.cc
146 mixer_strip.cc
147 mixer_ui.cc
148 new_session_dialog.cc
149 option_editor.cc
150 panner_ui.cc
151 playlist_selector.cc
152 plugin_selector.cc
153 plugin_ui.cc
154 redirect_box.cc
155 regionview.cc
156 route_params_ui.cc
157 """)
158
159 extra_sources = []
160 vst_files = [ 'vst_pluginui.cc' ]
161
162 if env['VST']:
163    extra_sources += vst_files
164
165 gtkardour.Append(CCFLAGS="-D_REENTRANT -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE")
166 gtkardour.Append(CXXFLAGS="-DDATA_DIR=\\\""+final_prefix+"/share\\\"")
167 gtkardour.Append(CXXFLAGS="-DLOCALEDIR=\\\""+final_prefix+"/share/locale\\\"")
168
169 versionflag = '-DVERSIONSTRING=\\\"' + env['VERSION'] + '\\\"'
170
171 gtkardour.Append(CXXFLAGS=versionflag)
172
173 gtkardour.VersionBuild(['version.cc','version.h'], 'SConscript')
174
175 executable = 'ardour.bin'
176
177 ardour = gtkardour.Program(target = executable, source = gtkardour_files + extra_sources)
178
179 Default(ardour)
180
181 if env['VERSIONED']:
182     Default (env.VersionedExecutable ('tagged_executable', ardour))
183
184 if env['NLS']:
185     i18n (gtkardour, gtkardour_files + extra_sources, env)
186
187 #install
188
189
190 env.Alias('install', env.InstallAs(os.path.join(install_prefix, 'bin')+'/ardour', ardour))
191 env.Alias('install', env.Install(os.path.join(config_prefix, 'ardour'), 'ardour_ui.rc'))
192 env.Alias('install', env.Install(os.path.join(install_prefix, 'share/ardour'), 'splash.ppm'))
193
194 #dist
195 env.Alias ('tarball', env.Distribute (env['DISTTREE'],
196                                       [ 'SConscript',
197                                         'i18n.h', 'gettext.h',
198                                         'editor_xpms', 'misc_xpms', 'transport_xpms',
199                                         'ardour_ui.rc', 'splash.ppm'
200                                         ] +
201                                       gtkardour_files + vst_files +
202                                       glob.glob('po/*.po') + glob.glob('*.h')))
203
204 # generate a prototype full-featured ardour_ui.rc file
205
206 env.Alias ('protorc', env.Command ('proto.rc', gtkardour_files, """
207      grep set_name $SOURCES | \
208 sed 's/.*("\([a-zA-Z_][a-zA-Z_]*\)").*/\\1/' | \
209 grep -v '\\.' | sort | uniq | \
210 awk '/\\./ {} { printf ("style \\"%s\\"\\n{\\n\
211   fg[NORMAL] =   { 0, 0, 0 }\\n\
212   fg[ACTIVE] =   { 0, 0, 0 }\\n\
213   fg[SELECTED] = { 0, 0, 0 }\\n\
214   bg[NORMAL] =   { 0, 0, 0 }\\n\
215   bg[ACTIVE] =   { 0, 0, 0 }\\n\
216   bg[SELECTED] = { 0, 0, 0 }\\n\
217 }\\nwidget \\"*%s\\" style \\"%s\\"\\nwidget \\"*%s*\\" style \\"%s\\"\\n\\n", \
218   $$0, $$0, $$0, $$0, $$0) }' > $TARGET && \
219      grep 'color_map\[[a-zA-Z_][a-zA-Z]*\]' $SOURCES | \
220  sed 's/.*\[\([a-zA-Z_][a-zA-Z_]*\)].*/\\1/'| \
221  sort | uniq | \
222  awk '{ printf ("style \\"%s\\"\\n{\\n\
223   fg[NORMAL] =   { 0, 0, 0 }\\n\
224   fg[ACTIVE] =   { 0, 0, 0 }\\n\
225 }\\nwidget \\"*%s\\" style \\"%s\\"\\n \\n\\n", $$0, $$0, $$0) }' >> $TARGET ;
226 """
227 ))