Added install target

This commit is contained in:
Dan Hirsch 2013-10-29 17:35:37 -04:00
parent cccb5f09ec
commit 64b5e307d2
2 changed files with 40 additions and 3 deletions

View file

@ -3,6 +3,12 @@ Import('env')
bindings = []
dist_headers = [
"hammer.h",
"allocator.h",
"glue.h"
]
parsers = ['parsers/%s.c'%s for s in
['action',
'and',
@ -55,13 +61,14 @@ tests = ['t_benchmark.c',
libhammer_shared = env.SharedLibrary('hammer', parsers + backends + misc_hammer_parts)
libhammer_static = env.StaticLibrary('hammer', parsers + backends + misc_hammer_parts)
env.Install("$libpath", [libhammer_static, libhammer_shared])
env.Install("$incpath", dist_headers)
testenv = env.Clone()
testenv.ParseConfig('pkg-config --cflags --libs glib-2.0')
testenv.Append(LIBS=['hammer'], LIBPATH=['.'])
testenv.Program('test_suite', tests + ['test_suite.c'])
Export("libhammer_static libhammer_shared")
for b in bindings: