Makefile 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. # This file is part of the OpenADK project. OpenADK is copyrighted
  2. # material, please see the LICENCE file in the top-level directory.
  3. include ${TOPDIR}/rules.mk
  4. PKG_NAME:= gpsd
  5. PKG_VERSION:= 2.95
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= 12535a9ed9fecf9ea2c5bdc9840da5ae
  8. PKG_DESCR:= An interface daemon for GPS receivers
  9. PKG_SECTION:= misc
  10. PKG_DEPENDS:= libpthread
  11. PKG_BUILDDEP:= ncurses
  12. PKG_SITES:= http://download.berlios.de/gpsd/
  13. PKG_URL:= http://gpsd.berlios.de/
  14. PKG_CXX:= GPSD
  15. PKG_NEED_CXX:= 1
  16. PKG_ARCH_DEPENDS:= !native
  17. PKG_SUBPKGS:= GPSD GPSD_CLIENTS
  18. PKGSD_GPSD_CLIENTS:= GPS client utilities
  19. include ${TOPDIR}/mk/package.mk
  20. $(eval $(call PKG_template,GPSD,gpsd,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  21. $(eval $(call PKG_template,GPSD_CLIENTS,gpsd-clients,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_GPSD_CLIENTS},${PKG_SECTION}))
  22. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  23. CONFIGURE_ENV+= EGREP="grep -E" \
  24. CPP="$(TARGET_CC) -E" \
  25. ac_cv_func_strlcpy=no \
  26. ac_cv_func_strlcat=no \
  27. ac_cv_lib_nsl_gethostbyname=no
  28. CONFIGURE_ARGS+= --disable-dbus
  29. TARGET_CFLAGS+= -fPIC
  30. ifeq ($(ADK_COMPILE_GPSD_WITH_UCLIBCXX),y)
  31. LIBRARIES:=-nodefaultlibs -luClibc++ -lgcc -lc
  32. endif
  33. ifeq ($(ADK_TOOLCHAIN_GCC_USE_SSP),y)
  34. LIBRARIES+=-lssp -lssp_nonshared
  35. endif
  36. ifeq ($(ADK_COMPILE_GPSD_WITH_UCLIBCXX),y)
  37. TARGET_CXXFLAGS+= -fno-rtti -nostdinc++ \
  38. -I${STAGING_TARGET_DIR}/usr/include/uClibc++
  39. TARGET_LDFLAGS+= $(LIBRARIES)
  40. else
  41. TARGET_LDFLAGS+= -shared -pthread -lstdc++
  42. endif
  43. ifeq (${ADK_COMPILE_GPSD_WITH_UCLIBCXX},y)
  44. # add workaround because libtool tries to link libstdc++
  45. post-configure:
  46. ${SED} 's#postdeps="-lstdc.*#postdeps=""#' \
  47. ${WRKBUILD}/libtool
  48. endif
  49. gpsd-install:
  50. ${INSTALL_DIR} ${IDIR_GPSD}/usr/lib ${IDIR_GPSD}/usr/sbin
  51. ${CP} ${WRKINST}/usr/lib/libgps.so* ${IDIR_GPSD}/usr/lib
  52. ${CP} ${WRKINST}/usr/lib/libgpsd.so* ${IDIR_GPSD}/usr/lib
  53. ${CP} ${WRKINST}/usr/sbin/gpsd ${IDIR_GPSD}/usr/sbin
  54. gpsd-clients-install:
  55. ${INSTALL_DIR} ${IDIR_GPSD_CLIENTS}/usr/bin
  56. ${CP} ${WRKINST}/usr/bin/{cgps,gpxlogger} \
  57. ${IDIR_GPSD_CLIENTS}/usr/bin
  58. include ${TOPDIR}/mk/pkg-bottom.mk