📄 linux下makefile的automake生成全攻略(2)__科技时代_新浪网.htm
字号:
function setBaseCookie(shrink, _sp_mpid){if (("undefined"==_sp_mpid)||(""==_sp_mpid)){return; } var ckTmp=_S_gsSINAUID();var sudsid=_S_gsSINAPUID();var ckValue=_S_gEnvInfo();var unStr=_S_gUniproUN();var uidStr=_S_gUniproUNid();var envStr="UNIPROINFO="+ckValue+"||un:"+unStr+"||uid:"+uidStr+";";var refUrl=_S_PWD_.referrer;var cPageStr=_S_gPageInfo(_sp_mpid,refUrl);var lbStr=sudsid+"|*|"+cPageStr;lbStr=envStr+"UNIPROPATH="+lbStr+";";_S_p2Bcn(lbStr,cp_rf);}function shrinkCookie(p1,p2,p3,p4,p5){try {metaList=_S_gMeta("sinachannel");if(""!=metaList) {setBaseCookie(1, metaList);} else{setBaseCookie(1, _S_CID_+_S_DPID_); } } catch(e){}}function _S_isExistsFreshMeta(){ var _s_head_=_S_PWD_.documentElement.innerHTML.substring(0,1024); var reg=new RegExp("<meta\\s*http-equiv\\s*=((\\s*refresh\\s*)|(\'refresh\')|(\"refresh\"))\s*content\s*=","ig"); return reg.test(_s_head_); }function _S_performAfterSeconds(){try{if((_S_PW_.document.body.scrollHeight>=600) && (_S_PW_.document.body.scrollWidth>=700)){if(! _S_isExistsFreshMeta()){ shrinkCookie(); }}}catch(e){}}function _S_isIFrameSelf(){if(_S_PW_.top ==_S_PW_){ return false; }else{try{if ((_S_PW_.frameElement.width>=700) && (_S_PW_.frameElement.height>=600)) { return false; }else{ return true; } }catch(e){ window.setTimeout("_S_performAfterSeconds();",_S_IFrameTimeOut); return true;}}}try {if(!_S_isIFrameSelf()){ if(! _S_isExistsFreshMeta()){ shrinkCookie(); }}}catch(e){}--></SCRIPT>
<!-- SUDS_CODE_END -->
<CENTER><!--导航start-->
<STYLE>.h3 {
FONT-SIZE: 7px; COLOR: #ffbd00
}
</STYLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
<TBODY>
<TR>
<TD>
<SCRIPT>
function getCookie(name) {
var search;
search = name + "="
offset = document.cookie.indexOf(search)
if (offset != -1) {
offset += search.length ;
end = document.cookie.indexOf(";", offset) ;
if (end == -1)
end = document.cookie.length;
return document.cookie.substring(offset, end);
}
else
return "";
}
function unipro_clearCookie(name ) {
document.cookie=name+"=; " + "domain=sina.com.cn; path=/; ";
//bites = document.cookie.split("; ");
}
function getMobileNum(ckName){
var userInfo = getCookie(ckName).split(":");
return userInfo[2];
}
function unipro_UniProLogout() {
unipro_clearCookie("SINAPRO");
unipro_clearCookie("SINA-AVATAR");
unipro_clearCookie("SINAPROC");
unipro_clearCookie("nick");
unipro_clearCookie("SINA_NU");
unipro_clearCookie("SINA_OU");
unipro_clearCookie("appmask");
unipro_clearCookie("gender");
unipro_clearCookie("UNIPROTM");
unipro_clearCookie("UNIPROU");
unipro_clearCookie("SINA_USER");
unipro_clearCookie("SMS_COOKIE");
return true;
}
function getUniproUrl_stand(){
window.location='http://unipro.sina.com.cn/';
return false;
}
function getUniproUrl_welcome(){
unipro_UniProLogout();
window.location='http://unipro.sina.com.cn';
return false;
}
function print_stand_unipro_head()
{
document.write("<table border=0 cellpadding=0 cellspacing=0><tr align=center><td><a href=http://www.sina.com.cn class=a01>首页</a></td><td width=14></td><td><a href=http://news.sina.com.cn class=a01>新闻</a></td><td width=14></td><td><a href=http://sports.sina.com.cn class=a01>体育</a></td><td width=14></td><td><a href=http://ent.sina.com.cn class=a01>娱乐</a></td><td width=14></td><td><a href=http://bn.sina.com.cn/ class=a01>视频</a></td><td width=14></td><td><a href=http://finance.sina.com.cn/ class=a01>财经</a></td><td width=14></td><td><a href=http://tech.sina.com.cn/ class=a01>科技</a></td><td width=14></td><td><a href=http://auto.sina.com.cn/ class=a01>汽车</a></td><td width=14></td><td><a href=http://house.sina.com.cn/ class=a01><font color=red>房产</font></a></td><td width=14></td><td><a href=http://games.sina.com.cn class=a01>游戏</a></td><td width=14></td><td><a href=http://eladies.sina.com.cn/ class=a01>女性</a></td><td width=14></td><td><a href=http://book.sina.com.cn/ class=a01>读书</a><td width=14></td><td><a href=http://y.sina.com.cn/ class=a01>校园</a></td><td width=14></td><td><a href=http://weather.sina.com.cn/ class=a01>天气</a></td><td width=14></td><td><a href=http://sms.sina.com.cn class=a01>短信</a></td><td width=14></td><td><a href=http://mail.sina.com.cn class=a01>邮箱</a></td><td width=14></td><td><a href=http://search.sina.com.cn class=a01>搜索</a></td><td width=14></td><td><a href=http://news.sina.com.cn/guide/ class=a01>导航</font></td><td width=14></td></tr></table>");
document.write("</td><td align=right>");
document.write("<table height=25 border=0 cellpadding=0 cellspacing=0>");
document.write("<tr><td><td align=right> <a href=# onClick='return getUniproUrl_stand()'><img src=http://image2.sina.com.cn/IT/unipro/41/txz_button01.gif width=65 height=19 border=0 align=absmiddle></a></td></tr>");
document.write("</table>");
}
function print_stand_unipro_welcome()
{
var unipro_login_nickname = getCookie( "nick" );
var unipro_login_pos = unipro_login_nickname.indexOf( "(" );
if ( unipro_login_pos != -1 )
{
unipro_login_nickname = unipro_login_nickname.substr( 0, unipro_login_pos );
}
document.write("<table border=0 cellpadding=0 cellspacing=0><tr align=center><td><a href=http://www.sina.com.cn class=a01>首页</a></td><td width=14></td><td><a href=http://news.sina.com.cn class=a01>新闻</a></td><td width=14></td><td><a href=http://sports.sina.com.cn class=a01>体育</a></td><td width=14></td><td><a href=http://ent.sina.com.cn class=a01>娱乐</a></td><td width=14></td><td><a href=http://bn.sina.com.cn/ class=a01>视听</a></td><td width=14></td><td><a href=http://finance.sina.com.cn/ class=a01>财经</a></td><td width=14></td><td><a href=http://tech.sina.com.cn/ class=a01>科技</a></td><td width=14></td><td><a href=http://auto.sina.com.cn/ class=a01>汽车</a></td><td width=14></td><td><a href=http://house.sina.com.cn/ class=a01><font color=red>房产</font></a></td><td width=14></td><td><a href=http://games.sina.com.cn class=a01>游戏</a></td><td width=14></td><td><a href=http://weather.sina.com.cn/ class=a01>天气</a></td><td width=14></td><td><a href=http://sms.sina.com.cn class=a01>短信</a></td><td width=14></td><td><a href=http://mail.sina.com.cn class=a01>邮箱</a></td><td width=14></td><td><a href=http://search.sina.com.cn class=a01>搜索</a></td><td width=14></td><td><a href=http://news.sina.com.cn/guide/ class=a01>导航</font></td><td width=14></td></tr></table>");
document.write("</td><td align=right>");
document.write("<table border=0 cellpadding=0 cellspacing=0>");
document.write("<tr>");
if ( unipro_login_nickname!="" && unipro_login_nickname!="null" && unipro_login_nickname!=null && unipro_login_nickname!="undefined" ) {
document.write("<td align=right> "+unipro_login_nickname+"</td><td width=4></td><td><a href=# onClick='return getUniproUrl_welcome()'><font color=#0000ff>安全退出</font></a>");
} else {
document.write( "<td align=right> 新浪过客" +"</td><td width=4></td><td><a href=# onClick='return getUniproUrl_welcome()'><font color=#0000ff>安全退出</font></a>");
}
document.write("</td></tr>");
document.write("</table>");
}
</SCRIPT>
<SCRIPT language=javascript>
if (getCookie("SINAPRO") == "") {
print_stand_unipro_head();
} else {
print_stand_unipro_welcome();
}
</SCRIPT>
</TD></TR></TBODY></TABLE><!--导航end--><!--头部结束--><!--科技新闻内页顶部通栏开始-->
<OBJECT
codeBase=http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0
height=80 width=750 classid=clsid:D27CDB6E-AE6D-11cf-96B8-444553540000><PARAM NAME="movie" VALUE="http://ad4.sina.com.cn/sina/game/sinagame75080.swf"><PARAM NAME="quality" VALUE="high"><PARAM NAME="wmode" VALUE="opaque">
<EMBED src="http://ad4.sina.com.cn/sina/game/sinagame75080.swf" quality=high
WIDTH="750" HEIGHT="80" TYPE="application/x-shockwave-flash"
PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></EMBED>
</OBJECT><!--nwy/sina游戏社区/A-->
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
<TBODY>
<TR>
<TD width=150 height=34><A href="http://tech.sina.com.cn/"><IMG height=34
alt=科技时代
src="Linux下Makefile的automake生成全攻略(2)__科技时代_新浪网.files/sina_kjsd.gif"
width=134 border=0></A></TD>
<TD vAlign=bottom width=440><FONT color=#0000ff><A class=a02
href="http://home.sina.com.cn/">新浪首页</A> > <A class=a02
href="http://tech.sina.com.cn/">科技时代</A> > <FONT class=a02></FONT>>
正文</FONT></TD>
<TD vAlign=bottom align=right width=150><A href="http://www.yesky.com/"
target=_blank><IMG height=28
src="Linux下Makefile的automake生成全攻略(2)__科技时代_新浪网.files/1_2-50-629_20030324133833.gif"
border=0></A></TD>
<TD width=10></TD></TR></TBODY></TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
<TBODY>
<TR>
<TD height=8></TD></TR>
<TR>
<TD bgColor=#747474 height=1><IMG height=1
src="Linux下Makefile的automake生成全攻略(2)__科技时代_新浪网.files/c.gif"
width=1></TD></TR></TBODY></TABLE>
<DIV id=outer style="WIDTH: 750px; POSITION: relative">
<TABLE cellSpacing=0 cellPadding=0 width=750 border=0>
<TBODY>
<TR>
<TD vAlign=top align=middle width=620 bgColor=#edf0f5 rowSpan=2><BR>
<DIV id=article>
<TABLE cellSpacing=0 cellPadding=0 width=560 border=0>
<TBODY>
<TR>
<TH class=f24><FONT color=#05006c>
<H1>Linux下Makefile的automake生成全攻略(2)</H1></FONT></TH></TR>
<TR>
<TD>
<HR SIZE=1 bgcolor="#d9d9d9">
</TD></TR>
<TR>
<TD align=middle height=20>http://www.sina.com.cn
2004年10月19日 11:15 <FONT color=#a20010>天极yesky</FONT></TD></TR>
<TR>
<TD height=15></TD></TR>
<TR>
<TD class=l17><FONT class=f14 id=zoom><!-- 正文内部文字导航 : begin --><!-- 正文内部文字导航 : end -->
<P> 文/余涛</P>
<P> <SELECT style="FONT-SIZE: 14px"
onchange=javascript:window.location=(this.options[this.selectedIndex].value);
name=pageNavBar> <OPTION
value=http://tech.sina.com.cn/s/2004-10-19/1115443045.shtml>第1页:Linux下Makefile的automake生成全攻略<OPTION
value=http://tech.sina.com.cn/s/2004-10-19/1115443046.shtml
selected>第2页:Linux下Makefile的automake生成全攻略(2)<OPTION
value=http://tech.sina.com.cn/s/2004-10-19/1115443047.shtml>第3页:Linux下Makefile的automake生成全攻略(3)</OPTION></SELECT>
<P></SPAN>
<P>
<P><SPAN
class=f14>4、新建Makefile.am<BR><BR> 新建Makefile.am文件,命令:<BR><BR>
<P>
<P>
<TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#e6e4dd
border=1>
<TBODY>
<TR>
<TD>$ vi Makefile.am</TD></TR></TBODY></TABLE>
<P>
<P><BR> 内容如下:<BR><BR>
<P>
<P>
<TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#e6e4dd
border=1>
<TBODY>
<TR>
<TD>AUTOMAKE_OPTIONS=foreign<BR>bin_PROGRAMS=helloworld<BR>helloworld_SOURCES=helloworld.c</TD></TR></TBODY></TABLE>
<P>
<P><BR> automake会根据你写的Makefile.am来自动生成Makefile.in。<BR><BR> Makefile.am中定义的宏和目标,会指导automake生成指定的代码。例如,宏bin_PROGRAMS将导致编译和连接的目标被生成。<BR><BR> 5、运行automake<BR><BR> 命令:<BR><BR>
<P>
<P>
<TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#e6e4dd
border=1>
<TBODY>
<TR>
<TD>$ automake --add-missing<BR>configure.in: installing
`./install-sh'<BR>configure.in: installing
`./mkinstalldirs'<BR>configure.in: installing
`./missing'<BR>Makefile.am: installing
`./depcomp'</TD></TR></TBODY></TABLE>
<P>
<P><BR> automake会根据Makefile.am文件产生一些文件,包含最重要的Makefile.in。<BR><BR> 6、执行configure生成Makefile<BR><BR>
<P>
<P>
<TABLE borderColor=#ffcc66 width="90%" align=center bgColor=#e6e4dd
border=1>
<TBODY>
<TR>
<TD>$ ./configure <BR>checking for a BSD-compatible install...
/usr/bin/install -c<BR>checking whether build environment is
sane... yes<BR>checking for gawk... gawk<BR>checking whether
make sets $(MAKE)... yes<BR>checking for gcc...
gcc<BR>checking for C compiler default output...
a.out<BR>checking whether the C compiler works...
yes<BR>checking whether we are cross compiling...
no<BR>checking for suffix of executables... <BR>checking for
suffix of object files... o<BR>checking whether we are using
the GNU C compiler... yes<BR>checking whether gcc accepts
-g... yes<BR>checking for gcc option to accept ANSI C... none
needed<BR>checking for style of include used by make...
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -