1
0

Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. #
  2. # Copyright (C) 2015-2016 OpenWrt.org
  3. #
  4. # This is free software, licensed under the GNU General Public License v2.
  5. # See /LICENSE for more information.
  6. #
  7. include $(TOPDIR)/rules.mk
  8. PKG_NAME:=libcanfestival
  9. PKG_RELEASE:=3
  10. PKG_SOURCE_PROTO:=hg
  11. PKG_SOURCE_URL:=http://dev.automforge.net/CanFestival-3
  12. PKG_SOURCE_SUBDIR:=$(PKG_NAME)
  13. PKG_SOURCE_VERSION:=8bfe0ac00cdb
  14. PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.bz2
  15. PKG_MAINTAINER:=Anton Glukhov <anton.a.glukhov@gmail.com>
  16. PKG_LICENSE:=LGPL-2.1+
  17. PKG_LICENSE_FILES:=LICENCE
  18. PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)
  19. PKG_FIXUP:=autoreconf
  20. PKG_INSTALL:=1
  21. include $(INCLUDE_DIR)/package.mk
  22. define Package/libcanfestival
  23. SECTION:=libs
  24. CATEGORY:=Libraries
  25. TITLE:=Free software CANopen library
  26. URL:=http://canfestival.org
  27. DEPENDS:=+libpthread +librt
  28. endef
  29. define Package/libcanfestival/description
  30. CanFestival library
  31. endef
  32. TARGET_CFLAGS += $(FPIC)
  33. CONFIGURE_ARGS := \
  34. --cc=$(TARGET_CC) \
  35. --cxx=$(TARGET_CXX) \
  36. --ld=$(TARGET_CC) \
  37. --arch=$(ARCH) \
  38. --binutils=$(TARGET_CROSS) \
  39. --os=Linux \
  40. --kerneldir=$(LINUX_DIR) \
  41. --prefix=/usr \
  42. --target=unix \
  43. --can=socket \
  44. --timers=unix \
  45. --debug=ERR \
  46. define Build/InstallDev
  47. $(INSTALL_DIR) $(1)/usr/include
  48. $(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
  49. $(INSTALL_DIR) $(1)/usr/lib
  50. $(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
  51. endef
  52. define Package/libcanfestival/install
  53. $(INSTALL_DIR) $(1)/usr/lib
  54. $(CP) $(PKG_INSTALL_DIR)/usr/lib/libcanfestival_can_socket.so $(1)/usr/lib/
  55. endef
  56. $(eval $(call BuildPackage,libcanfestival))