Absolute Path Names

Of course, you can always specify an absolute path name for a file--for example:

       env = Environment()
       env.Program('prog', ['main.c', '/usr/joe/lib/foo1.c', 'foo2.c'])
    

Which, when executed, would yield:

       % scons -Q
       cc -c -o src/prog/foo2.o src/prog/foo2.c
       cc -c -o src/prog/main.o src/prog/main.c
       cc -c -o /usr/joe/lib/foo1.o /usr/joe/lib/foo1.c
       cc -o src/prog/prog src/prog/main.o /usr/joe/lib/foo1.o src/prog/foo2.o
    

(As was the case with top-relative path names, notice that the /usr/joe/lib/foo1.o object file is built in the same directory as its source file. See the chapter called Separating Source and Build Directories, below, for information about how to build the object file in a different subdirectory.)