Hi, does any one can tell me why ? I guess if this sub dir can only be
built a libhardware.so, so if i try to build anyother so in the
libhardware it reminds me error?

On 3月17日, 上午11时30分, Nio <[email protected]> wrote:
> Hi Mike,
> Thanks for your help.
> When I do as you said,there are also errors:
> build/core/shared_library.mk:20:*** hardware/libhardware/gps:Illegal
> use of OVERRIDE_BUILT_MODULE_PATH.
> I don't know what was happenning here.
> what i have done:
> 1.add to Android.mk as follow:
>   LOCAL_PATH := $(call my-dir)
>   include $(CLEAR_VARS)
>   ...
>   LOCAL_SRC_FILES += gps/gps_hardware.c
>   LOCAL_SRC_FILES += gps/gps_hardware.c
>   LOCAL_MODULE := libgps_hardware
> include $(BUILD_SHARED_LIBRARY)
>
> 2.add to vendor/marvell/littleton/BoardConfig.mk
>   BOARD_GPS_LIBRARIES := libgps_hardware
>
> Thanks again.
> Nio
>
> On 3月16日, 下午11时36分, Mike Lockwood <[email protected]> wrote:
>
>
>
> > Here is an example of how to build a shared library:
>
> >http://android.git.kernel.org/?p=platform/external/zlib.git;a=blob;f=...
>
> > This is the makefile for zlib, which builds both a shared library and
> > an executable program.
>
> > Here is an example of a BoardConfig.mk file (for the Dream build in master):
>
> >http://android.git.kernel.org/?p=platform/vendor/htc/dream.git;a=blob...
>
> > Notice how it specifies which libraries to use to implement the GPS
> > API.  Whatever target you are building for should probably have a
> > "vendor" directory of files similar to those in the vendor/htc/dream
> > or vendor/asus/eee_701.
>
> > Mike
>
> > On Sun, Mar 15, 2009 at 1:45 AM, Daliang Luo <[email protected]> wrote:
> > > Hi Mike,
>
> > > How to build a shared library on android? I am not sure as I am not 
> > > familiar
> > > with this and it seems not the same with I build before. And  is the
> > >  BoardConfig.mk you refer to in the directory of /libhardware/gps/?  Or
> > > somewhere? Thanks again.
>
> > > 2009/3/15 Mike Lockwood <[email protected]>
>
> > >> On Sat, Mar 14, 2009 at 4:32 AM, Nio <[email protected]> wrote:
>
> > >> > Hi all,
>
> > >> > Is there any possibilities to call Ril interface from Location Manager
> > >> > or any other service?
>
> > >> > I'm trying send AT commands to start or control GPS and AGPS via Ril.
> > >> > And this should be called by Location Manager service. Dose it
> > >> > possible?
>
> > >> Hi Nio,
>
> > >> No, you should not modify the location manager to integrate with your
> > >> GPS.  Instead you should write a shared library in C named libgps.so
> > >> that implements the interface defined in gps.h.
>
> > >> You can look at the file hardware/libhardware_legacy/gps/gps_qemu.c
> > >> (the implementation for the emulator) as an example of how to do this.
>
> > >> Then in your BoardConfig.mk, add:
>
> > >> BOARD_GPS_LIBRARIES := libgps
>
> > >> to tell the build system to use your library rather than the stubbed
> > >> out implementation of the GPS API.
>
> > >> Mike
>
> > >> --
> > >> Mike Lockwood
> > >> Google android team
>
> > --
> > Mike Lockwood
> > Google android team
--~--~---------~--~----~------------~-------~--~----~
unsubscribe: [email protected]
website: http://groups.google.com/group/android-porting
-~----------~----~----~----~------~----~------~--~---

Reply via email to