📄 linux下makefile的automake生成全攻略(2)__科技时代_新浪网.htm
字号:
GNU<BR>checking dependency style of gcc... gcc3<BR>configure:
creating ./config.status<BR>config.status: creating
Makefile<BR>config.status: executing depfiles commands<BR>$ ls
-l Makefile<BR>-rw-rw-r-- 1 yutao yutao 15035 Oct 15 10:40
Makefile</TD></TR></TBODY></TABLE>
<P>
<P><BR> 你可以看到,此时Makefile已经产生出来了。<BR><BR> 7、使用Makefile编译代码<BR><BR>
<P>
<P>
<TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#e6e4dd
border=1>
<TBODY>
<TR>
<TD>$ make<BR>if gcc -DPACKAGE_NAME="" -DPACKAGE_TARNAME=""
-DPACKAGE_VERSION="" -<BR><BR>DPACKAGE_STRING=""
-DPACKAGE_BUGREPORT="" -DPACKAGE="helloworld" -DVERSION="1.0"
<BR><BR>-I. -I. -g -O2 -MT helloworld.o -MD -MP -MF
".deps/helloworld.Tpo" \<BR>-c -o helloworld.o `test -f
'helloworld.c' || echo './'`helloworld.c; \<BR>then mv -f
".deps/helloworld.Tpo" ".deps/helloworld.Po"; \<BR>else rm -f
".deps/helloworld.Tpo"; exit 1; \<BR>fi<BR>gcc -g -O2 -o
helloworld helloworld.o </TD></TR></TBODY></TABLE>
<P>
<P><BR> 运行helloworld<BR><BR>
<P>
<P>
<TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#e6e4dd
border=1>
<TBODY>
<TR>
<TD>$ ./helloworld <BR>Hello, Linux World!</TD></TR></TBODY></TABLE>
<P>
<P><BR> 这样helloworld就编译出来了,你如果按上面的步骤来做的话,应该也会很容易地编译出正确的helloworld文件。你还可以试着使用一些其他的make命令,如make
clean,make install,make
dist,看看它们会给你什么样的效果。感觉如何?自己也能写出这么专业的Makefile,老板一定会对你刮目相看。<BR>
<P>
<P>
<P align=right><A style="FONT-SIZE: 14px"
href="http://tech.sina.com.cn/s/2004-10-19/1115443045.shtml">[上一页]</A> <A
href="http://tech.sina.com.cn/s/2004-10-19/1115443045.shtml">[1]</A> [2] <A
href="http://tech.sina.com.cn/s/2004-10-19/1115443047.shtml">[3]</A> <A
style="FONT-SIZE: 14px"
href="http://tech.sina.com.cn/s/2004-10-19/1115443047.shtml">[下一页]</A>
<P><!--NEWSZW_HZH_BEGIN-->
<TABLE cellSpacing=0 cellPadding=0 align=left border=0><!--
<table id="innerad" border=0 cellspacing=0 cellpadding=0 align=left style="display:none">
-->
<TBODY>
<TR>
<TD><!--画中画广告开始-->
<TABLE cellSpacing=0 cellPadding=0 align=left border=0>
<TBODY>
<TR>
<TD><!--科技新闻内页画中画开始--><!--65FF8A7AEF90-->
<OBJECT
codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0
height=300 width=360
classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="http://ad4.sina.com.cn/200411/02/4262_360x300_1028.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="opaque">
<EMBED
src="http://ad4.sina.com.cn/200411/02/4262_360x300_1028.swf"
quality=high WIDTH="360" HEIGHT="300"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT><!--nwy/2004-11-13/A--><!--科技新闻内页画中画结束--></TD></TR></TBODY></TABLE><!--画中画广告结束--></TD></TR>
<TR>
<TD><!-- 画中画下文字链广告(从上至下顺序为01,02,03,04文字,需加class=a01)-->
<TABLE cellSpacing=0 cellPadding=0 width=360 border=0>
<TBODY>
<TR>
<TD height=9></TD></TR>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=360
background=Linux下Makefile的automake生成全攻略(2)__科技时代_新浪网.files/xfrd_02.gif
border=0>
<TBODY>
<TR>
<TD height=45 rowSpan=2><IMG height=45
src="Linux下Makefile的automake生成全攻略(2)__科技时代_新浪网.files/xfrd_01.gif"
width=70 border=0></TD>
<TD style="PADDING-LEFT: 5px; PADDING-TOP: 4px"
width=286><!--F70BB90BB6BA--><!--nwy/uc/A-->
<SCRIPT language=JavaScript>
ad1= "魔镜教你穿透爱情";
link1= "http://sms.sina.com.cn/docs/c/xlmj.html";
//左上
ad2= "联想笔记本Y200热卖中";
link2= "http://noshow.adsina.allyes.com/main/adfclick?db=sina&bid=4120,19510,19538&cid=0,0,0&sid=19940&advid=56&camid=4340&show=ignore&url=http://www.lenovo2008.com/notebook/y200/?wodoopro=sinaitpiptext";
//右上
ad3= "最大的2G免费邮箱!";
link3= "http://noshow.adsina.allyes.com/main/adfclick?db=sina&bid=3633,17499,17523&cid=0,0,0&sid=17877&advid=1293&camid=3834&show=ignore&url=http://mail.sina.com.cn/freemail/index.html";
//左下
ad4= "不信你的IQ比我高!";
link4= "http://mms.sina.com.cn/mzjc/index.html";
//右下
//浏览器类型变量
var InternetExplorer = navigator.appName.indexOf("Microsoft") != -1;
//ie内容
function IEad(){
adCode = '<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" WIDTH="280" HEIGHT="40" id="ad_note" ALIGN=""><PARAM NAME=movie VALUE="http://image2.sina.com.cn/dy/zwyhzh/ad_note.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=wmode VALUE=transparent> <PARAM NAME=bgcolor VALUE=#FFFFFF> <param name="swLiveConnect" value="true"> '
+' <EMBED src="http://image2.sina.com.cn/dy/zwyhzh/ad_note.swf" quality=high wmode=transparent bgcolor=#FFFFFF WIDTH="280" HEIGHT="40" NAME="ad_note" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer" swLiveConnect="true"></EMBED></OBJECT>'
document.write(adCode);
document.getElementById('ad_note').SetVariable("ad1", ad1);
document.getElementById('ad_note').SetVariable("ad2", ad2);
document.getElementById('ad_note').SetVariable("ad3", ad3);
document.getElementById('ad_note').SetVariable("ad4", ad4);
document.getElementById('ad_note').SetVariable("link1", link1);
document.getElementById('ad_note').SetVariable("link2", link2);
document.getElementById('ad_note').SetVariable("link3", link3);
document.getElementById('ad_note').SetVariable("link4", link4);
}
//ns内容
function NSad(){
adCode = '<table width=286 border=0 cellpadding=0 cellspacing=0>'
+'<tr height=20><td width=143 style="padding-top:5px;padding-left:5px"> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> '
+'<a href='+ link1 +' class=a01 target=_blank>'+ ad1 +'</a>'
+'</td><td width=143 style="padding-top:5px;"> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> '
+'<a href='+ link2 +' class=a01 target=_blank>'+ ad2 +'</a>'
+'</td></tr>'
+'<tr height=20><td style="padding-left:5px"> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> '
+'<a href='+ link3 +' class=a01 target=_blank>'+ ad3 +'</a>'
+'</td><td> <img src=http://image2.sina.com.cn/dy/images/xfrd_04.gif width=7 height=7> '
+'<a href='+ link4 +' class=a01 target=_blank><SPAN ID="oSpan" UNSELECTABLE="on" >'+ ad4 +'</span></a></td></tr></table>'
document.write(adCode);
}
//主过程
if(InternetExplorer == true){
IEad();
}else{
NSad();
}
</SCRIPT>
</TD>
<TD width=4 rowSpan=2><IMG height=45
src="Linux下Makefile的automake生成全攻略(2)__科技时代_新浪网.files/xfrd_03.gif"
width=4></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><!--NEWSZW_HZH_END-->
<TABLE width="90%" align=center border=0>
<TBODY>
<TR></TR></TBODY></TABLE><BR clear=all>
<TABLE cellSpacing=0 cellPadding=0 width=565 border=0>
<TBODY>
<TR>
<TD class=f14 vAlign=top height=30> 点击此处查询<A
href="http://sinanews.chinasearch.com.cn/sinanews.exe?word=Linux"
target=_blank>全部<FONT color=red>Linux</FONT>新闻</A>
</TD></TR></TBODY></TABLE></P></SPAN></FONT></TD></TR></TBODY></TABLE></DIV><BR>
<TABLE cellSpacing=0 cellPadding=0 width=560 border=0>
<TBODY>
<TR>
<TD>
<TABLE cellSpacing=0 cellPadding=0 width=565 border=0>
<TBODY>
<TR>
<TD>
<FORM name=from_
action=http://mms.sina.com.cn/xmlmms/xmlmmsQue.php method=post
target=_blank><INPUT type=hidden
value=http://rss.sina.com.cn/mms/tech/79/0/25/2-1-443046.xml
name=xmlCfg> <INPUT type=hidden value=100001 name=sourceFrom>
<INPUT type=hidden value=442 name=from> <INPUT style="WIDTH: 120px" type=submit value=发送本新闻到手机 name=submit_>
</FORM></TD>
<TD align=right>【<A
href="http://comment.news.sina.com.cn/cgi-bin/comment/comment.cgi?channel=kj&newsid=443046">评论</A>】【<A
href="http://stat.sina.com.cn/cgi-bin/sms/edit_sms.cgi?title=Linux%CF%C2Makefile%B5%C4automake%C9%FA%B3%C9%C8%AB%B9%A5%C2%D4%282%29&url=tech.sina.com.cn/s/2004-10-19/1115443046.shtml">推荐</A>】【<A
href="javascript:doZoom(16)">大</A> <A
href="javascript:doZoom(14)">中</A> <A
href="javascript:doZoom(12)">小</A>】【<A
href="javascript:doPrint()">打印</A>】【<A
href="http://www.sina.com.cn/ddt/" target=_blank>下载点点通</A>】【<A
href="javascript:window.close()">关闭</A>】</TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE> <BR>
<TABLE cellSpacing=0 cellPadding=0 width=560 border=0>
<TBODY>
<TR>
<TD><!-- 正文底部小通栏 -->
<TABLE cellSpacing=0 cellPadding=0 width=585 align=center
border=0><TBODY>
<TR>
<TD><!--科技频道内页底部小通栏开始--><!--A88883414426-->
<OBJECT
codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0
height=50 width=585
classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="http://ad4.sina.com.cn/200411/10/4732_jindi-tech585tl-11.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="opaque">
<EMBED
src="http://ad4.sina.com.cn/200411/10/4732_jindi-tech585tl-11.swf"
quality=high WIDTH="585" HEIGHT="50"
TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT><!--yuxia/2004-11-15/B--><!--科技频道内页底部小通栏结束--></TD></TR>
<TR>
<TD height=5></TD></TR></TBODY></TABLE></TD></TR></TBODY></TABLE><BR>
<TABLE cellSpacing=0 cellPadding=0 width=560 border=0>
<TBODY>
<TR>
<TD>
<DIV id=PublicRelation1 style="DISPLAY: none" name="PublicRelation">
<TABLE>
<TBODY>
<TR>
<TD> </TD>
<TD class=f14>
<P><!--要求文字在17字以内!--><A
href="http://sms.sina.com.cn/docs/c/xlmj.html"
target=_blank>握住情运脉搏看魔镜指点!</A><!--nwy/sina-sms/A--> <A
href="http://sms.sina.com.cn/docs/c/xlmj.html"
target=_blank>魔镜教你穿透爱情的迷雾!</A><!--nwy/sina-sms/A-->
</P></TD></TR></TBODY></TABLE></DIV>
<SCRIPT>
//<!--广告发布-->
<!--
if (checkPubTime(getPubTime()))
{
PublicRelation1.style.display="";
}
-->
</SCRIPT>
</TD></TR></TBODY></TABLE></TD>
<TD width=1 bgColor=#747474 rowSpan=2></TD>
<TD vAlign=top width=129></TD></TR></TBODY></TABLE><!-- 右侧功能条 begin -->
<DIV id=toolBar style="DISPLAY: none; POSITION: absolute">
<TABLE cellSpacing=0 cellPadding=0 width=129 border=0>
<TBODY>
<TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -