source: trunk/SConstruct@ 190

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

more scons build improvements

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