Is there a reason you feel the need to build it, rather than just
taking a copy of one from a Google-provided emulator image?

I don't know what needs to be done to build the version that comes
with Android sources under Windows, but if you don't mind doing things
manually, start by going to http://www.sqlite.org/download.html and
downloading the top source code item on that page (the amalgamation
package). I've succesfully used the Makefile pasted below this message
to build this. You will need to edit the setting of the ANDROID_NDK
variable, to point to the root of where you've installed the NDK. You
will also need to make sure tabs are in place, etc., as is typical
when copying/pasting a Makefile.

Note that this Makefile will not work (without modification) on a
Linux build host. The Linux version of the NDK uses some different
internal paths.


######## START OF MAKEFILE ########
# Set 'ANDROID_NDK' to the location your NDK is installed
ANDROID_NDK = C://android-ndk-1.6_r1


# determine the tools directory based on Windows install paths
TOOLDIR=$(ANDROID_NDK)/build/prebuilt/windows/arm-eabi-4.2.1/bin


# set tools based on TOOLDIR
CC      =       $(TOOLDIR)/arm-eabi-gcc
CPP     =       $(TOOLDIR)/arm-eabi-g++
STRIP   =       $(TOOLDIR)/arm-eabi-strip



# prepare the NDK include path and library paths/options
INCLUDES +=-I $(ANDROID_NDK)/build/platforms/android-3/arch-arm/usr/
include \

LIBS += -Wl,-rpath-link=$(ANDROID_NDK)/build/platforms/android-3/arch-
arm/usr/lib \
   -L$(ANDROID_NDK)/build/platforms/android-3/arch-arm/usr/lib \
   -lc -lm -lstdc++ -Wl,--no-undefined -ldl \
   -Wl,--gc-sections -Bdynamic -Wl,-z,nocopyreloc  \
   -Wl,-dynamic-linker,/system/bin/linker  \
   -Wl,-T,$(ANDROID_NDK)/build/prebuilt/windows/arm-eabi-4.2.1/arm-
eabi/lib/ldscripts/armelf.x -Wl -nostdlib \
   $(ANDROID_NDK)/build/platforms/android-3/arch-arm/usr/lib/
crtbegin_dynamic.o \
   $(ANDROID_NDK)/build/platforms/android-3/arch-arm/usr/lib/
crtend_android.o




CFLAGS += $(INCLUDES)
CPPFLAGS += $(CFLAGS)
LFLAGS = $(LIBS)


APP  = sqlite3
OBJS = shell.o sqlite3.o


$(APP): $(OBJS)
        $(CC) -o $(APP) $(OBJS) $(LIBS)
        $(STRIP) $(APP)

clean:
        rm -f $(OBJS) $(APP)
######## END OF MAKEFILE ########








On Jul 20, 3:54 pm, joec185 <joec...@gmail.com> wrote:
> Thanks for your response.  I am trying to build it for android.  My
> development machine is windows and I am running cygwin and the cygwin
> tools (i.e. gnu make).  I have been able to build the native portion
> of the hello-jni sample for Android but have not been able to get very
> far building sqlite using the NDK.

-- 
unsubscribe: android-porting+unsubscr...@googlegroups.com
website: http://groups.google.com/group/android-porting

Reply via email to