]> git.donarmstrong.com Git - lilypond.git/blob - lily/SConscript
New file.
[lilypond.git] / lily / SConscript
1 # -*-python-*-
2
3 import glob
4 import os
5
6 here = os.getcwd ()
7 reldir = str (Dir ('.').srcnode ())
8 os.chdir (reldir)
9 sources = glob.glob ('*.cc') + ['parser.yy', 'lexer.ll']
10 os.chdir (here)
11
12 name = 'lyparser'
13
14 Import ('env')
15 e = env.Copy ()
16
17 e.Append (YACCFLAGS = '-d')
18 outdir = os.path.join (env['build'], reldir, env['out'])
19 e.Append (CPPPATH = [outdir, '#/lily/include', '#/flower/include'])
20 e.Depends ('lexer.cc', 'parser.cc')
21 e.Depends ('my-lily-lexer.o', 'parser.cc')
22 e.Depends ('my-lily-parser.o', 'parser.cc')
23
24 # some stuff here from lily-as-lib
25 if not os.path.exists ('main.cc'):
26         if env['static']:
27                 e.Library (name, sources) 
28         if not env['static'] or env['shared']:
29                 e.SharedLibrary (name, sources)
30 else:
31         #e.Append (LIBS = ['lygui', 'lyparser', 'lily', 'flower'])
32         e.Append (LIBS = ['flower'])
33         e.ParseConfig ('guile-config link')
34         name = 'lilypond-bin'
35         lily = e.Program (name, sources)
36         env.Install (env['bindir'], lily)
37         env.Alias ('install', env['bindir'])