build: Create ocarina.bin as a symlink to ocarina-player

I want to add in more ocarina-* commands, so the first step is making
the player its own command.

Signed-off-by: Bryan Schumaker <bjschuma@gmail.com>
This commit is contained in:
Bryan Schumaker 2012-05-27 17:37:25 -04:00
parent 30375bbdff
commit 62c3ef2684
2 changed files with 8 additions and 4 deletions

3
.gitignore vendored
View File

@ -2,6 +2,5 @@
*.swp
*.tar.gz
.sconsign.dblite
ocarina.bin
bin/
include/version.h
test_*

View File

@ -35,9 +35,14 @@ def directory(dirs):
objs.append(files)
return objs
def symlink(target, source, env):
import os
os.symlink(str(source[0]), str(target[0]))
SConscript(['include/Sconscript'])
ocarina=env.Program('ocarina.bin', directory(["libsaria", "ocarina"]))
Default([ocarina])
ocarina = env.Program('bin/ocarina-player', directory(["libsaria", "ocarina"]))
oc_link = env.Command("ocarina.bin", "bin/ocarina-player", symlink)
Default([ocarina, oc_link])
# Install Ocarina
scripts = os.listdir("scripts/")