source: trunk/SConstruct @ 189

Last change on this file since 189 was 189, checked in by tim, 15 years ago

additional work on new build system

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