source: trunk/SConstruct @ 202

Last change on this file since 202 was 201, checked in by tim, 14 years ago

changed symbol visibility to hidden by default and explicitly exported API functions

File size: 2.0 KB
Line 
1#cflags = '-std=gnu99 -pedantic -Wall'
2cflags = '-std=gnu99 -pedantic -Wall -fvisibility=hidden -ggdb'
3
4
5lib_src = ['lib/regfi.c',
6           'lib/winsec.c',
7           'lib/range_list.c',
8           'lib/lru_cache.c',
9           'lib/void_stack.c']
10
11env = Environment(CFLAGS=cflags,
12                  CPPPATH=['include', '/usr/local/include'],
13                  LIBPATH=['lib', '/usr/local/lib'],
14                  LIBS=['m', 'pthread', 'regfi', 'talloc'])
15
16
17# Libraries
18libregfi_static = env.Library(lib_src)
19libregfi = env.SharedLibrary(lib_src, LIBS=['m','pthread'])
20
21
22# Executables
23reglookup = env.Program(['src/reglookup.c'])
24reglookup_recover = env.Program(['src/reglookup-recover.c'])
25
26
27# Documentation
28#  This only needs to be run during the release/packaging process
29man_fixup = "|sed 's/.SH DESCRIPTION/\\n.SH DESCRIPTION/'"
30man_builder = Builder(action='docbook2x-man --to-stdout $SOURCE'
31                      + man_fixup + '| gzip -9 > $TARGET',
32                      suffix = '.gz',
33                      src_suffix = '.docbook')
34env['BUILDERS']['ManPage'] = man_builder
35
36man_reglookup = env.ManPage('doc/reglookup.1.docbook')
37man_reglookup_recover = env.ManPage('doc/reglookup-recover.1.docbook')
38man_reglookup_timeline = env.ManPage('doc/reglookup-timeline.1.docbook')
39
40
41# Installation
42prefix='/usr/local/'
43env.Install(prefix+'bin', [reglookup, reglookup_recover, 'bin/reglookup-timeline'])
44env.Install(prefix+'lib', [libregfi, libregfi_static])
45env.Install(prefix+'include/regfi', Glob('include/*.h'))
46env.Install(prefix+'man/man1', [man_reglookup, man_reglookup_recover,
47                                man_reglookup_timeline])
48
49
50# User Friendly Targets
51env.Alias('libregfi', libregfi)
52env.Alias('reglookup', reglookup)
53env.Alias('reglookup-recover', reglookup_recover)
54env.Alias('bin', [reglookup_recover, reglookup])
55env.Alias('doc', [man_reglookup,man_reglookup_recover,man_reglookup_timeline])
56env.Alias('install', [prefix+'bin',
57                      prefix+'lib',
58                      prefix+'include/regfi',
59                      prefix+'man'])
60
61Default('bin', libregfi)
Note: See TracBrowser for help on using the repository browser.