source: trunk/SConstruct @ 191

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

updated scons build scripts to handle MinGW
added binaries for MinGW build dependencies

File size: 1.9 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+'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', prefix+'lib', prefix+'man'])
57
58Default('bin', libregfi)
Note: See TracBrowser for help on using the repository browser.