Makefile 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. #
  2. # Copyright (C) 2014-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. include $(TOPDIR)/rules.mk
  7. PKG_NAME:=rtklib
  8. PKG_VERSION:=2.4.3_b24
  9. PKG_RELEASE:=$(PKG_SOURCE_VERSION)
  10. PKG_SOURCE_PROTO:=git
  11. PKG_SOURCE_URL:=https://github.com/tomojitakasu/RTKLIB.git
  12. PKG_SOURCE_VERSION:=1cec90a9ffa424908ad1a4ca3d52f33f9b94d1f7
  13. PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
  14. PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
  15. PKG_LICENSE:=BSD-2-Clause
  16. PKG_MAINTAINER:=Nuno Goncalves <nunojpg@gmail.com>
  17. include $(INCLUDE_DIR)/package.mk
  18. define Package/rtklib/default
  19. SUBMENU:=RTKLIB Suite
  20. SECTION:=utils
  21. CATEGORY:=Utilities
  22. URL:=http://www.rtklib.com/
  23. DEPENDS:=+libpthread +librt
  24. endef
  25. define Package/convbin
  26. $(call Package/rtklib/default)
  27. TITLE:=RINEX Converter
  28. endef
  29. define Package/pos2kml
  30. $(call Package/rtklib/default)
  31. TITLE:=Solution to KML converter
  32. endef
  33. define Package/rnx2rtkp
  34. $(call Package/rtklib/default)
  35. TITLE:=Post-Processing Analysis
  36. endef
  37. define Package/rtkrcv
  38. $(call Package/rtklib/default)
  39. TITLE:=Real-Time Positioning
  40. endef
  41. define Package/str2str
  42. $(call Package/rtklib/default)
  43. TITLE:=Communication Server
  44. endef
  45. define Build/Compile
  46. rm -rf $(PKG_INSTALL_DIR)
  47. mkdir -p $(PKG_INSTALL_DIR)
  48. $(MAKE) -C $(PKG_BUILD_DIR)/app/convbin/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)"
  49. $(MAKE) -C $(PKG_BUILD_DIR)/app/pos2kml/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)"
  50. $(MAKE) -C $(PKG_BUILD_DIR)/app/rnx2rtkp/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)"
  51. $(MAKE) -C $(PKG_BUILD_DIR)/app/rtkrcv/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)"
  52. $(MAKE) -C $(PKG_BUILD_DIR)/app/str2str/gcc CC="$(TARGET_CC) $(TARGET_CFLAGS)"
  53. endef
  54. define Package/convbin/install
  55. $(INSTALL_DIR) $(1)/usr/bin
  56. $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/convbin/gcc/convbin $(1)/usr/bin/
  57. endef
  58. define Package/pos2kml/install
  59. $(INSTALL_DIR) $(1)/usr/bin
  60. $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/pos2kml/gcc/pos2kml $(1)/usr/bin/
  61. endef
  62. define Package/rnx2rtkp/install
  63. $(INSTALL_DIR) $(1)/usr/bin
  64. $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/rnx2rtkp/gcc/rnx2rtkp $(1)/usr/bin/
  65. endef
  66. define Package/rtkrcv/install
  67. $(INSTALL_DIR) $(1)/usr/bin
  68. $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/rtkrcv/gcc/rtkrcv $(1)/usr/bin/
  69. endef
  70. define Package/str2str/install
  71. $(INSTALL_DIR) $(1)/usr/bin
  72. $(INSTALL_BIN) $(PKG_BUILD_DIR)/app/str2str/gcc/str2str $(1)/usr/bin/
  73. endef
  74. $(eval $(call BuildPackage,convbin))
  75. $(eval $(call BuildPackage,pos2kml))
  76. $(eval $(call BuildPackage,rnx2rtkp))
  77. $(eval $(call BuildPackage,rtkrcv))
  78. $(eval $(call BuildPackage,str2str))