Advertisement

SCons编译程序

阅读量:

编译

重定义目标输出文件名称

复制代码
    admin@DESKTOP-NQU1HUV C:\Users\admin\Desktop\scons\day3
    $ scons
    scons: Reading SConscript files ...
    Finished calling Program()
    scons: done reading SConscript files.
    scons: Building targets ...
    gcc -o hello.o -c hello.c
    gcc -o hello.exe hello.o
    gcc -o new_hello.exe hello.o
    scons: done building targets.
    
    admin@DESKTOP-NQU1HUV C:\Users\admin\Desktop\scons\day3
    $ ls
    SConstruct  hello.c  hello.exe  hello.o  new_hello.exe

可以看到有两份输出结果,并且这些结果分别由默认程序 hello.exe 和自定义程序 new_hello.exe 执行生成。

编译多文件

在实际工程中,并不局限

全部评论 (0)

还没有任何评论哟~