Created
February 24, 2016 15:09
-
-
Save AbigailBuccaneer/96398670bcc79413bc70 to your computer and use it in GitHub Desktop.
Single SConstruct
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ touch libfoo.c | |
$ echo "int main(void) { return 0; }" > foo.c | |
$ cat SConstruct | |
env = Environment() | |
lib = env.Library('libfoo', 'libfoo.c') | |
program = env.Program('foo', LIBS=[lib]) | |
$ scons --tree=all | |
scons: Reading SConscript files ... | |
scons: done reading SConscript files. | |
scons: Building targets ... | |
gcc -o foo.o -c foo.c | |
gcc -o libfoo.o -c libfoo.c | |
ar rc libfoo.a libfoo.o | |
ranlib libfoo.a | |
gcc -o foo foo.o libfoo.a | |
+-. | |
+-SConstruct | |
+-foo | |
| +-foo.o | |
| | +-foo.c | |
| | +-/usr/bin/gcc | |
| +-/usr/bin/gcc | |
| +-libfoo.a | |
| +-libfoo.o | |
| | +-libfoo.c | |
| | +-/usr/bin/gcc | |
| +-/usr/bin/ar | |
| +-/usr/bin/ranlib | |
+-foo.c | |
+-foo.o | |
| +-foo.c | |
| +-/usr/bin/gcc | |
+-libfoo.a | |
| +-libfoo.o | |
| | +-libfoo.c | |
| | +-/usr/bin/gcc | |
| +-/usr/bin/ar | |
| +-/usr/bin/ranlib | |
+-libfoo.c | |
+-libfoo.o | |
+-libfoo.c | |
+-/usr/bin/gcc | |
scons: done building targets. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment