diff options
author | Kevin Tang <zhikait@codeaurora.org> | 2016-09-12 17:20:55 -0700 |
---|---|---|
committer | Mike Cailean <mcailean@codeaurora.org> | 2018-01-16 13:35:38 -0800 |
commit | 61de97e13003a5dea9917cb6e943ecd8e142b05b (patch) | |
tree | 31ddbc97199253187cbee24932f8712e2216f83d /location | |
parent | 438abebca035fe4f956e7e6232a1b98074e4c673 (diff) | |
download | gps-61de97e13003a5dea9917cb6e943ecd8e142b05b.tar.gz |
LE clean up
separated utils, core, ds and loc-api-v02 from loc-hal into their
own independent packages; simplified loc-pla; moved pla to the
root of project; removed loc-stub.
Change-Id: I373f02f9306646addf55ae90d71c4ba8e3741d09
CRs-Fixed: 2172544
Diffstat (limited to 'location')
-rw-r--r-- | location/LocationAPI.cpp | 3 | ||||
-rw-r--r-- | location/LocationAPIClientBase.cpp | 3 | ||||
-rw-r--r-- | location/LocationAPIClientBase.h | 3 | ||||
-rw-r--r-- | location/Makefile.am | 22 | ||||
-rw-r--r-- | location/configure.ac | 82 | ||||
-rw-r--r-- | location/location-api.pc.in | 10 |
6 files changed, 108 insertions, 15 deletions
diff --git a/location/LocationAPI.cpp b/location/LocationAPI.cpp index 21d2de0..0111a9c 100644 --- a/location/LocationAPI.cpp +++ b/location/LocationAPI.cpp @@ -29,7 +29,8 @@ #include <location_interface.h> #include <dlfcn.h> -#include <platform_lib_log_util.h> +#include <loc_pla.h> +#include <log_util.h> #include <pthread.h> #include <map> diff --git a/location/LocationAPIClientBase.cpp b/location/LocationAPIClientBase.cpp index bb51238..e53a6b8 100644 --- a/location/LocationAPIClientBase.cpp +++ b/location/LocationAPIClientBase.cpp @@ -29,7 +29,8 @@ #define LOG_NDDEBUG 0 #define LOG_TAG "LocSvc_APIClientBase" -#include <platform_lib_log_util.h> +#include <loc_pla.h> +#include <log_util.h> #include <inttypes.h> #include <loc_cfg.h> #include "LocationAPIClientBase.h" diff --git a/location/LocationAPIClientBase.h b/location/LocationAPIClientBase.h index 99c7c87..4bd1466 100644 --- a/location/LocationAPIClientBase.h +++ b/location/LocationAPIClientBase.h @@ -36,7 +36,8 @@ #include <map> #include "LocationAPI.h" -#include "platform_lib_log_util.h" +#include <loc_pla.h> +#include <log_util.h> enum SESSION_MODE { SESSION_MODE_NONE = 0, diff --git a/location/Makefile.am b/location/Makefile.am index d1d0131..3688cc8 100644 --- a/location/Makefile.am +++ b/location/Makefile.am @@ -1,9 +1,10 @@ +ACLOCAL_AMFLAGS = -I m4 + AM_CFLAGS = \ - $(LOCPLA_CFLAGS) \ - $(GPSUTILS_CFLAGS) \ - $(LOCHAL_CFLAGS) \ -I./ \ -I../utils \ + $(LOCPLA_CFLAGS) \ + $(GPSUTILS_CFLAGS) \ -std=c++11 liblocation_api_la_SOURCES = \ @@ -12,15 +13,15 @@ liblocation_api_la_SOURCES = \ if USE_GLIB liblocation_api_la_CFLAGS = -DUSE_GLIB $(AM_CFLAGS) @GLIB_CFLAGS@ -liblocation_api_la_LDFLAGS = -lstdc++ -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 +liblocation_api_la_LDFLAGS = -lstdc++ -Wl,-z,defs -lpthread @GLIB_LIBS@ -shared -version-info 1:0:0 liblocation_api_la_CPPFLAGS = -DUSE_GLIB $(AM_CFLAGS) $(AM_CPPFLAGS) @GLIB_CFLAGS@ else liblocation_api_la_CFLAGS = $(AM_CFLAGS) -liblocation_api_la_LDFLAGS = -lpthread -shared -version-info 1:0:0 +liblocation_api_la_LDFLAGS = -Wl,-z,defs -lpthread -shared -version-info 1:0:0 liblocation_api_la_CPPFLAGS = $(AM_CFLAGS) $(AM_CPPFLAGS) endif -liblocation_api_la_LIBADD = -lstdc++ $(LOCPLA_LIBS) $(GPSUTILS_LIBS) $(LOCHAL_LIBS) +liblocation_api_la_LIBADD = -lstdc++ -ldl $(GPSUTILS_LIBS) library_include_HEADERS = \ LocationAPI.h \ @@ -31,10 +32,7 @@ library_include_HEADERS = \ lib_LTLIBRARIES = liblocation_api.la library_includedir = $(pkgincludedir) -#pkgconfigdir = $(libdir)/pkgconfig -#pkgconfig_DATA = location-api.pc -#EXTRA_DIST = $(pkgconfig_DATA) - - - +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = location-api.pc +EXTRA_DIST = $(pkgconfig_DATA) diff --git a/location/configure.ac b/location/configure.ac new file mode 100644 index 0000000..6391d65 --- /dev/null +++ b/location/configure.ac @@ -0,0 +1,82 @@ +# configure.ac -- Autoconf script for gps location-api-iface +# +# Process this file with autoconf to produce a configure script + +# Requires autoconf tool later than 2.61 +AC_PREREQ(2.61) +# Initialize the gps location-api-iface package version 1.0.0 +AC_INIT([location-api-iface],1.0.0) +# Does not strictly follow GNU Coding standards +AM_INIT_AUTOMAKE([foreign]) +# Disables auto rebuilding of configure, Makefile.ins +AM_MAINTAINER_MODE +# Verifies the --srcdir is correct by checking for the path +AC_CONFIG_SRCDIR([location-api.pc.in]) +# defines some macros variable to be included by source +AC_CONFIG_HEADERS([config.h]) +AC_CONFIG_MACRO_DIR([m4]) + +# Checks for programs. +AC_PROG_LIBTOOL +AC_PROG_CXX +AC_PROG_CC +AM_PROG_CC_C_O +AC_PROG_AWK +AC_PROG_CPP +AC_PROG_INSTALL +AC_PROG_LN_S +AC_PROG_MAKE_SET +PKG_PROG_PKG_CONFIG + +# Checks for libraries. +PKG_CHECK_MODULES([GPSUTILS], [gps-utils]) +AC_SUBST([GPSUTILS_CFLAGS]) +AC_SUBST([GPSUTILS_LIBS]) + +AC_ARG_WITH([core_includes], + AC_HELP_STRING([--with-core-includes=@<:@dir@:>@], + [Specify the location of the core headers]), + [core_incdir=$withval], + with_core_includes=no) + +if test "x$with_core_includes" != "xno"; then + CPPFLAGS="${CPPFLAGS} -I${core_incdir}" +fi + +AC_ARG_WITH([locpla_includes], + AC_HELP_STRING([--with-locpla-includes=@<:@dir@:>@], + [Specify the path to locpla-includes in loc-pla_git.bb]), + [locpla_incdir=$withval], + with_locpla_includes=no) + +if test "x${with_locpla_includes}" != "xno"; then + AC_SUBST(LOCPLA_CFLAGS, "-I${locpla_incdir}") +fi + +AC_SUBST([CPPFLAGS]) + +AC_ARG_WITH([glib], + AC_HELP_STRING([--with-glib], + [enable glib, building HLOS systems which use glib])) + +if (test "x${with_glib}" = "xyes"); then + AC_DEFINE(ENABLE_USEGLIB, 1, [Define if HLOS systems uses glib]) + PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= 2.16, dummy=yes, + AC_MSG_ERROR(GThread >= 2.16 is required)) + PKG_CHECK_MODULES(GLIB, glib-2.0 >= 2.16, dummy=yes, + AC_MSG_ERROR(GLib >= 2.16 is required)) + GLIB_CFLAGS="$GLIB_CFLAGS $GTHREAD_CFLAGS" + GLIB_LIBS="$GLIB_LIBS $GTHREAD_LIBS" + + AC_SUBST(GLIB_CFLAGS) + AC_SUBST(GLIB_LIBS) +fi + +AM_CONDITIONAL(USE_GLIB, test "x${with_glib}" = "xyes") + +AC_CONFIG_FILES([ \ + Makefile \ + location-api.pc \ + ]) + +AC_OUTPUT diff --git a/location/location-api.pc.in b/location/location-api.pc.in new file mode 100644 index 0000000..c7b146a --- /dev/null +++ b/location/location-api.pc.in @@ -0,0 +1,10 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: location-api +Description: Location API +Version: @VERSION +Libs: -L${libdir} -llocation_api +Cflags: -I${includedir}/location-api |