source: branches/client-library-split/SConstruct @ 103

Last change on this file since 103 was 103, checked in by simon, 5 years ago

map: make debug_level private, add load functions, code cleanup

  • Property svn:mime-type set to text/x-python
File size: 1.5 KB
Line 
1# scons build file
2
3env = Environment()
4env.MergeFlags(['-Wall -lm -std=c99 -lexpat'])
5
6if ARGUMENTS.get('optimize') in ('y', 'yes'):
7    env.Append(CCFLAGS = ['-O2', '-fomit-frame-pointer'])
8else:
9    env.Append(CCFLAGS = ['-g'])
10
11if ARGUMENTS.get('profile') in ('y', 'yes'):
12    env.Append(CCFLAGS = ['-pg'])
13    env.Append(LINKFLAGS = ['-pg'])
14
15env.ParseConfig('pkg-config --cflags --libs cairo')
16env.ParseConfig('pkg-config --cflags --libs glib-2.0')
17env.ParseConfig('pkg-config --cflags --libs gobject-2.0')
18
19conf = Configure(env)
20
21if not conf.CheckLibWithHeader('expat','expat.h','C'):
22    print 'Did not find expat, exiting!'
23    Exit(1)
24
25if not conf.CheckLibWithHeader('cairo','cairo.h','C'):
26    print 'Did not find cairo, exiting!'
27    Exit(1)
28
29if not conf.CheckLibWithHeader('glib-2.0','glib.h','C'):
30    print 'Did not find cairo, exiting!'
31    Exit(1)
32
33env = conf.Finish()
34
35SOURCES = [
36    'libmercator.c',
37    'osm05.c',
38    'renderer.c',
39    'ruleset.c',
40    'textpath.c',
41    'mlib.c',
42    'memphis-data-pool.c',
43    'memphis-map.c',
44    'memphis-rule-set.c',
45    'memphis-renderer.c'
46]
47
48Default(env.Program('memphis', source = ['main.c', SOURCES]))
49
50env.Program('testTextPath', source=['test/testTextPath.c','textpath.c'])
51env.Program('testSize', source=['test/testSize.c'])
52env.Program('testOSM', source=['test/testOSM.c','osm05.c','mlib.c'])
53env.Program('testRuleset', source=['test/testRuleset.c','ruleset.c','mlib.c'])
54
55#env.Program('testRuleset', source=['ruleset.c','testRuleset.c'])
56
57env.Program('tile-renderer', source = ['demos/tile-renderer.c', SOURCES])
Note: See TracBrowser for help on using the repository browser.