source: trunk/SConstruct @ 194

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

small fix for header installation

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