sqlite-3.6.4.tar.gz 파일을 받습니다.
# wget http://www.sqlite.org/sqlite-3.6.4.tar.gz
받은 파일을 적당한 디렉토리 풀어 놓습니다.
# tar -zxvf sqlite-3.6.4.tar.gz
풀어놓은 디렉토리로 들어가서 Makefile을 만들어주는 configure 스크립트를 실행합니다.
# cd sqlite-3.6.4
# ./configure --host=arm-linux-gnu --prefix=~/build --disable-tcl
생성된 Makefile 을 열어 다음과 같이 수정합니다.
...
TOP = .
CROSS_COMPILE = arm-linux-
CC = $(CROSS_COMPILE)gcc -g
AR = $(CROSS_COMPILE)ar
RANLIB = $(CROSS_COMPILE)ranlib
LD = $(CROSS_COMPILE)gcc -g
# C Compiler and options for use in building executables that
# will run on the platform that is doing the build.
#
BCC = gcc -g -O2
# C Compile and options for use in building executables that
# will run on the target platform. (BCC and TCC are usually the
# same unless your are cross-compiling.)
#
#TCC = gcc -g -O2 -DSQLITE_OS_UNIX=1 -I. -I${TOP}/src
TCC = $(CC) -O2 -DSQLITE_OS_UNIX=1 -I. -I${TOP}/src
...
libtool 파일을 열어 첨부된 파일과 같이 수정합니다.
make ; make install 합니다.
~/build 디렉토리에 생성된 bin/sqlite3 파일과 lib/libsqlite.so.0.8.6 파일을 타겟에 복사하면 됩니다.