summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2009-12-23 18:12:23 +0100
committerJon Bergli Heier <snakebite@jvnv.net>2009-12-23 18:12:23 +0100
commit3a6edce17c3f01f17aa3b25053302c5c14bdd166 (patch)
treeea16d8de3dc3c4e24a164d150e7b3ff21c9c0b89 /SConstruct
parent1f0ef0bc2e7d0b99feb05e57f1c15a5a739c48fa (diff)
Added install target.
Reads the DESTDIR and PREFIX variables when given as arguments.
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct10
1 files changed, 9 insertions, 1 deletions
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