scons - a software construction tool

Netkiller Developer 手札

November 15, 2008

MrNeo Chan陈景峰

 


中国广东省深圳市宝安区龙华镇
518109
+86 755 29812080
+86 755 29812080

 

 

文档最近一次更新于 Wed Feb 1 08:42:08 UTC 2012

 

版权 © 2008, 2009, 2010, 2011, 2012 Netkiller(Neo Chan). All rights reserved.

版权声明

转载请与作者联系,转载时请务必标明文章原始出处和作者信息及本声明。

文档出处:
http://netkiller.sourceforge.net
http://netkiller.github.com

 

Tue Dec 6 17:22:53 CST 2011

 

2. scons - a software construction tool

http://www.scons.org/

创建一个hello.c测试文件

		
#include<stdio.h>

main()
{
    printf("Hello World!\n");
}
		
		

创建SConstruct文件(相当于Makefile)

$ cat SConstruct
Program('hello.c')
		

开始编译

$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
gcc -o hello.o -c hello.c
gcc -o hello hello.o
scons: done building targets.
		

编译后产生的文件,尝试运行hello程序

$ ls
hello  hello.c  hello.o  SConstruct

$ ./hello 
Hello World!
		

下面操作想当于 make clean

$ scons -c
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Cleaning targets ...
Removed hello.o
Removed hello
scons: done cleaning targets.

$ ls
hello.c  SConstruct 		
		
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值