⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uclinux下sqlite嵌入式数据库移植全攻略(3).htm

📁 在嵌入式操作系统uclinux下应用的数据库sqlite
💻 HTM
📖 第 1 页 / 共 4 页
字号:
</table>

<div id="outer" style="position:relative;width:750px;">
<table width=750 border=0 cellspacing=0 cellpadding=0>
<tr><td width=620 valign=top align=center rowspan=2 bgcolor=#EDF0F5>
<br>
	<div id=article>
	<table width=560 border=0 cellspacing=0 cellpadding=0>
	<tr><th class=f24><font color=#05006C><h1>ucLinux下sqlite嵌入式数据库移植全攻略(3)</h1></font></th></tr>
	<tr><td height=><hr size=1 bgcolor=#d9d9d9></td></tr>
	<tr><td height=20 align=center>http://www.sina.com.cn 2004年12月17日&nbsp;08:40 <font color=#A20010>天极yesky</font></td></tr>
	<tr><td height=15></td></tr>
	<tr><td class=l17><font id="zoom" class=f14>

<!-- 正文内部文字导航 : begin -->

<!-- 正文内部文字导航 : end -->



<p>  文/余涛</p>

	<p>
<p><span class=f14>  <b>二、在sqlite下增加Makefile文件</b><br><br>  在sqlite目录下应该没有Makefile文件,而只是有一个sqlite/Makefile.linux-gcc文件。我们要移植sqlite到uclinux,那么就要自己写一个合适的Makefile。<br><br>  内容如下:<br><br><p>
<p>
<table borderColor=#ffcc66 width="90%" align=center bgColor=#d8d8d1 border=1>
<tbody>
<tr>
<td>===========Makefile内容开始===========<br>#!/usr/make<br>#<br># Makefile for SQLITE<br>#<br># This is a template makefile for SQLite. Most people prefer to<br># use the autoconf generated "configure" script to generate the<br># makefile automatically. But that does not work for everybody<br># and in every situation. If you are having problems with the<br># "configure" script, you might want to try this makefile as an<br># alternative. Create a copy of this file, edit the parameters<br># below and type "make".<br>#<br><br>#### The toplevel directory of the source tree. This is the directory<br># that contains this "Makefile.in" and the "configure.in" script.<br>#<br>TOP = .<br><br>#### C Compiler and options for use in building executables that<br># will run on the platform that is doing the build.<br>#<br>BCC = gcc -g -O2<br>#BCC = /opt/ancic/bin/c89 -0<br><br>#### If the target operating system supports the "usleep()" system<br># call, then define the HAVE_USLEEP macro for all C modules.<br>#<br>#USLEEP = <br>USLEEP = -DHAVE_USLEEP=1<br><br>#### If you want the SQLite library to be safe for use within a <br># multi-threaded program, then define the following macro<br># appropriately:<br>#<br>#THREADSAFE = -DTHREADSAFE=1<br>THREADSAFE = -DTHREADSAFE=0<br><br>#### Specify any extra linker options needed to make the library<br># thread safe<br>#<br>#THREADLIB = -lpthread<br>THREADLIB = <br><br>#### Leave MEMORY_DEBUG undefined for maximum speed. Use MEMORY_DEBUG=1<br># to check for memory leaks. Use MEMORY_DEBUG=2 to print a log of all<br># malloc()s and free()s in order to track down memory leaks.<br># <br># SQLite uses some expensive assert() statements in the inner loop.<br># You can make the library go almost twice as fast if you compile<br># with -DNDEBUG=1<br>#<br>#OPTS = -DMEMORY_DEBUG=2<br>#OPTS = -DMEMORY_DEBUG=1<br>#OPTS = -DNDEBUG=1<br>OPTS = -DMEMORY_DEBUG=1<br><br>#### The suffix to add to executable files. ".exe" for windows.<br># Nothing for unix.<br>#<br>#EXE = .exe<br>EXE =<br><br>#### C Compile and options for use in building executables that <br># will run on the target platform. This is usually the same<br># as BCC, unless you are cross-compiling.<br>#<br>TCC = $(CROSS)gcc<br>FLTFLAGS += -s 12000<br>#TCC = gcc -g -O0 -Wall<br>#TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage<br>#TCC = /opt/mingw/bin/i386-mingw32-gcc -O6<br>#TCC = /opt/ansic/bin/c89 -O +z -Wl,-a,archive<br><br>#### Tools used to build a static library.<br>#<br>AR = $(CROSS)ar cr<br>#AR = /opt/mingw/bin/i386-mingw32-ar cr<br>RANLIB = $(CROSS)ranlib<br>#RANLIB = /opt/mingw/bin/i386-mingw32-ranlib<br><br>#### Extra compiler options needed for programs that use the TCL library.<br>#<br>#TCL_FLAGS =<br>#TCL_FLAGS = -DSTATIC_BUILD=1<br>#TCL_FLAGS = -I/home/drh/tcltk/8.4linux<br>#TCL_FLAGS = -I/home/drh/tcltk/8.4win -DSTATIC_BUILD=1<br>#TCL_FLAGS = -I/home/drh/tcltk/8.3hpux<br><br>#### Linker options needed to link against the TCL library.<br>#<br>#LIBTCL = -ltcl -lm -ldl<br>#LIBTCL = /home/drh/tcltk/8.4linux/libtcl8.4g.a -lm -ldl<br>#LIBTCL = /home/drh/tcltk/8.4win/libtcl84s.a -lmsvcrt<br>#LIBTCL = /home/drh/tcltk/8.3hpux/libtcl8.3.a -ldld -lm -lc<br><br>#### Compiler options needed for programs that use the readline() library.<br>#<br>READLINE_FLAGS =<br>#READLINE_FLAGS = -DHAVE_READLINE=1 -I/usr/include/readline<br><br>#### Linker options needed by programs using readline() must link against.<br>#<br>#LIBREADLINE =<br>#LIBREADLINE = -static -lreadline -ltermcap<br><br>#### Should the database engine assume text is coded as UTF-8 or iso8859?<br>#<br># ENCODING = UTF8<br>ENCODING = ISO8859<br><br># You should not have to change anything below this line<br>###############################################################################<br>include $(TOP)/main.mk<br>===========Makefile内容结束===========</td></tr></tbody></table><p>
<p><br>
<p align=right><a href=http://tech.sina.com.cn/other/2004-12-17/0840478375.shtml style=font-size:14px>[上一页]</a>&nbsp&nbsp<a href=http://tech.sina.com.cn/other/2004-12-17/0840478374.shtml>[1]</a>&nbsp&nbsp<a href=http://tech.sina.com.cn/other/2004-12-17/0840478375.shtml>[2]</a>&nbsp&nbsp[3]&nbsp&nbsp<a href=http://tech.sina.com.cn/other/2004-12-17/0840478377.shtml>[4]</a>&nbsp&nbsp<a href=http://tech.sina.com.cn/other/2004-12-17/0840478378.shtml>[5]</a>&nbsp&nbsp<a href=http://tech.sina.com.cn/other/2004-12-17/0840478379.shtml>[6]</a>&nbsp&nbsp<a href=http://tech.sina.com.cn/other/2004-12-17/0840478377.shtml style=font-size:14px>[下一页]</a><p>
<!--NEWSZW_HZH_BEGIN--> 
<table border=0 cellspacing=0 cellpadding=0 align=left >
<!--
<table id="innerad" border=0 cellspacing=0 cellpadding=0 align=left style="display:none">
-->
<tr><td>
<!--画中画广告开始-->
<table border=0 cellspacing=0 cellpadding=0 align=left>
<tr><td>
<!--科技新闻内页画中画开始-->
<!--D61C4C53F9BB-->
<IFRAME MARGINHEIGHT=0 MARGINWIDTH=0 FRAMEBORDER=0 WIDTH=360 HEIGHT=300 SCROLLING=NO SRC="http://122.adsina.allyes.com/main/adfshow?user=AFP6_for_SINA|Tech|techpip&db=sina&border=0&local=yes">
<SCRIPT LANGUAGE="JavaScript1.1" SRC="http://122.adsina.allyes.com/main/adfshow?user=AFP6_for_SINA|Tech|techpip&db=sina&local=yes&js=on"></SCRIPT>
<NOSCRIPT><A HREF="http://122.adsina.allyes.com/main/adfclick?user=AFP6_for_SINA|Tech|techpip&db=sina"><IMG SRC="http://122.adsina.allyes.com/main/adfshow?user=AFP6_for_SINA|Tech|techpip&db=sina" WIDTH=360 HEIGHT=300 BORDER=0></a></NOSCRIPT></IFRAME>
<!--nwy/ms/1216/B-->
<!--科技新闻内页画中画结束-->
</td></tr></table>
<!--画中画广告结束-->
</td></tr>
<tr><td>
<!-- 画中画下文字链广告(从上至下顺序为01,02,03,04文字,需加class=a01)-->
<table width=360 border=0 cellpadding=0 cellspacing=0>
<tr><td height=9></td></tr>
<tr><td>
	<table width=360 border=0 cellpadding=0 cellspacing=0 background=http://image2.sina.com.cn/dy/images/xfrd_02.gif>
	<tr><td height=45 rowspan=2><img src=http://ad4.sina.com.cn/shc/xfrd_01.GIF width=70 height=45 border=0></td><td width=286 style='padding-top:4px;padding-left:5px'>
	<!--F70BB90BB6BA--><!--nwy/uc/A-->
<script LANGUAGE="JavaScript">


ad1= "想送免费的歌曲祝福吗";
link1= "http://bobo.sina.com.cn/";
//左上

ad2= "汽车生活方式大比拼";
link2= "http://adclient.dentsu.com.cn/html.ng/adspec=words&adtype=wen_zi_lian&affiliate=sina&campaignid=59&channel=ke_ji_page&log=0&params.styles=clickcmd?";
//右上

ad3= "天堂II 混沌的年代";
link3= "http://sinapay.sina.com.cn/tiantang/choose_style.html";
//左下

ad4= "天堂II 混沌的年代";
link4= "http://sinapay.sina.com.cn/tiantang/choose_style.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 src=http://image2.sina.com.cn/dy/images/xfrd_03.gif width=4 height=45></td></tr>
	
	</table>
</td></tr>
</table>

</td></tr>
</table>
<!--NEWSZW_HZH_END-->

	<table width=90% border=0 align=center>
	 <tr></tr>
	 </table>
	

	<br clear=all>
		<table width=565 border=0 cellspacing=0 cellpadding=0>
		      <tr><td class=f14 height=30 valign=top>  点击此处查询<a href=http://sinanews.chinasearch.com.cn/sinanews.exe?word=ucLinux target=_blank>全部<font color=red>ucLinux</font>新闻</a> <a href=http://sinanews.chinasearch.com.cn/sinanews.exe?word=操作系统 target=_blank>全部<font color=red>操作系统</font>新闻</a> </td></tr></table>
		</td></tr>
	</table>
	</div>
        <br>
	<table width=560 border=0 cellspacing=0 cellpadding=0>
	<tr><td class=f14>
	<a href=http://tech.sina.com.cn/topnews/index.html>新浪科技24小时热门新闻排行</a>&nbsp;&nbsp;&nbsp;&nbsp;
	<a href=http://tech.sina.com.cn/down/drivers/>硬件驱动程序高速下载</a>
	<br><br>
	</td></tr>
	<tr><td>
		<table width=565 border=0 cellspacing=0 cellpadding=0>
		<tr><td><form target="_blank" action="http://mms.sina.com.cn/xmlmms/xmlmmsQue.php" method="post" name="from_">
<input type="hidden" name="xmlCfg" value="http://rss.sina.com.cn/mms/tech/82/18/89/2-1-478376.xml">
<input type="hidden" name="sourceFrom" value="100001">
<input type="hidden" name="from" value="442">
<input type="submit" name="submit_" style="width:120" value="多种方式看新闻">
</form></td><td align=right>【<a href=http://comment.news.sina.com.cn/cgi-bin/comment/comment.cgi?channel=kj&newsid=478374>评论</a>】【<a href=http://stat.sina.com.cn/cgi-bin/sms/edit_sms.cgi?title=ucLinux%CF%C2sqlite%C7%B6%C8%EB%CA%BD%CA%FD%BE%DD%BF%E2%D2%C6%D6%B2%C8%AB%B9%A5%C2%D4%283%29&url=tech.sina.com.cn/other/2004-12-17/0840478376.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>
		</table></td></tr>
	</table>

	&nbsp;<BR>
	
	<table width=560 border=0 cellspacing=0 cellpadding=0>
	<tr><td>
	<!-- 正文底部小通栏 -->
<table width=585 border=0 cellpadding=0 cellspacing=0 align=center>
<tr><td>
<!--科技频道内页底部小通栏开始-->
<!--DCD3066795C5-->
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0" WIDTH="585" HEIGHT="50">
 <PARAM NAME=movie VALUE="http://ad4.sina.com.cn/200412/10/6765_picasso_tech_sfc_200412.swf"> <PARAM NAME=quality VALUE=high><param name=wmode value=opaque>
 <EMBED src="http://ad4.sina.com.cn/200412/10/6765_picasso_tech_sfc_200412.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><!--xinzhi/2004-12-17/B-->
<!--科技频道内页底部小通栏结束-->



</td></tr>
<tr><td height=5></td></tr>
</table>
	</td></tr>
	</table>
		
<br>

<table width=560 border=0 cellspacing=0 cellpadding=0>
<tr><td>
<div id=PublicRelation1 name="PublicRelation" style="DISPLAY:none">


<table><tr><td>&nbsp;&nbsp;&nbsp;&nbsp;</td>
<td class=f14>
<p><!--要求文字在17字以内!-->
<!--科技新闻内页文字链01开始-->
<!--4EF9FD7107A8-->
<a href=http://ad.cn.doubleclick.net/clk;12480651;10609175;z?http://www-900.ibm.com/cn/servers/eserver/openpower/ target=_blank><font color=red>Linux,改变世界的力量</font></a><!--weixing/2004-12-16/B-->



<!--科技新闻内页文字链01结束-->&nbsp;&nbsp;<!--994C252CDDD6-->
<a href=http://adclient.dentsu.com.cn/html.ng/adspec=image&adtype=wen_zi_lian&affiliate=sina&campaignid=59&channel=ke_ji_page&log=0&params.styles=clickcmd? target=_blank><font color=red>中法文化年,东风雪铁龙典藏版限量而出</font></a><!--xinzhi/2004-12-31/B--></p>
</td></tr></table>

</div>
<SCRIPT>	 
//<!--广告发布-->
<!--
	if (checkPubTime(getPubTime()))
	{
		PublicRelation1.style.display="";
	}
-->
</SCRIPT> 

		
		</td></tr>
	</table>
</td><td width=1 bgcolor=#747474 rowspan=2></td><td width=129 valign=top></td></tr>
</table>

<!-- 右侧功能条 begin -->
<div id="toolBar" style="position:absolute;display:'none'">
<table width=129 border=0 cellpadding=0 cellspacing=0>
<tr><td align=right>
	<!-- 搜索 begin-->
<script language="javascript">
function select_cgi(fn)
{
	
	search_form1 = fn;
	
	if(search_form1._ss.value == "newstitle") //新闻标题
	{		
		search_form1.searchcontent.name="word";
		search_form1.action = "http://sinanews.zhongsou.com/sinanews.exe";
		return;
	}

	
	else if(search_form1._ss.value == "newsft") //新闻全文
	{
		//alert("newsft");
		search_form1.searchcontent.name="word";
		search_form1.action = "http://sinanews.zhongsou.com/sinanews.exe";
		return;
	}

	else if(search_form1._ss.value == "pic") //图片
	{
		
		search_form1.searchcontent.name="query";
		
		search_form1.action = "http://pic.sina.com.cn/cgi-bin/retr/search";
		//search_form.action = "test.php";
		return;
	}
	
	else if(search_form1._ss.value == "mp3") //MP3
	{
		//alert("mp3");
		search_form1.searchcontent.name="_searchkey";
		search_form1.action = "http://mp3.sina.com.cn/cgi-bin/mp3/mp3.cgi";
		return;
	}
	else if(search_form1._ss.value == "ring") //手机铃声

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -