Created
February 24, 2016 15:10
-
-
Save AbigailBuccaneer/b73f97b457f0179e6bb3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Import('env', 'lib') | |
env = env.Clone() | |
program = env.Program('foo', 'foo.c', LIBS=[lib]) |
This file contains hidden or 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
env = Environment() | |
lib = env.Library('libfoo', 'libfoo.c') | |
Export('env', 'lib') | |
SConscript('SConscript') |
This file contains hidden or 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
$ 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 | |
+-. | |
+-SConscript | |
+-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