source: trunk/SConstruct @ 187

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

early versions of SConstruct build scripts

File size: 2.1 KB
Line 
1#cflags = '-std=gnu99 -pedantic -Wall'
2cflags = '-std=gnu99 -pedantic -Wall -ggdb'
3
4if True:
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# Executables
32reglookup = env.Program('src/reglookup.c')
33reglookup_recover = env.Program('src/reglookup-recover.c')
34
35# Documentation
36#  This only needs to be run during the release/packaging process
37man_fixup = "|sed 's/.SH DESCRIPTION/\\n.SH DESCRIPTION/'"
38man_builder = Builder(action='docbook2x-man --to-stdout $SOURCE'
39                      + man_fixup + '| gzip -9 > $TARGET',
40                      suffix = '.gz',
41                      src_suffix = '.docbook',
42                      prefix='man/man1/') # XXX: only works for .1.docbook files...
43env['BUILDERS']['ManPage'] = man_builder
44
45man_reglookup = env.ManPage('doc/reglookup.1.docbook')
46man_reglookup_recover = env.ManPage('doc/reglookup-recover.1.docbook')
47man_reglookup_timeline = env.ManPage('doc/reglookup-timeline.1.docbook')
48
49# User Friendly Targets
50env.Alias('libregfi', libregfi)
51env.Alias('reglookup', reglookup)
52env.Alias('reglookup-recover', reglookup_recover)
53env.Alias('bin', [reglookup_recover, reglookup])
54env.Alias('doc', [man_reglookup,man_reglookup_recover,man_reglookup_timeline])
55
56Default('bin', libregfi)
Note: See TracBrowser for help on using the repository browser.