From 3a6edce17c3f01f17aa3b25053302c5c14bdd166 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Wed, 23 Dec 2009 18:12:23 +0100 Subject: Added install target. Reads the DESTDIR and PREFIX variables when given as arguments. --- SConstruct | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 31244fb..1b0395b 100644 --- a/SConstruct +++ b/SConstruct @@ -33,6 +33,14 @@ ui_builder = Builder(action = build_ui) env['BUILDERS']['walls_ui'] = ui_builder env.walls_ui('walls_ui.h', 'walls.ui') -env.Program('walls', Glob('*.c')) +walls = env.Program('walls', Glob('*.c')) + +destdir = ARGUMENTS.get('DESTDIR', '') +prefix = ARGUMENTS.get('PREFIX', '/usr/local') + +final_dest = destdir + prefix + '/bin' + +env.Install(final_dest, walls) +env.Alias('install', final_dest) # vim: syn=python -- cgit v1.2.3