Makefile 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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:= rrs
  5. PKG_VERSION:= 1.70
  6. PKG_RELEASE:= 2
  7. PKG_MD5SUM:= b400d03c0e39e3e78a7327ba78f789f0
  8. PKG_DESCR:= A reverse (connecting) remote shell, with SSL support.
  9. PKG_SECTION:= net
  10. PKG_CXX:= RRS
  11. PKG_BUILDDEP+= zlib
  12. ifneq ($(ADK_PACKAGE_RRS),)
  13. PKG_BUILDDEP+= openssl
  14. endif
  15. PKG_URL:= http://www.cycom.se/dl/rrs
  16. PKG_SITES:= http://www.cycom.se/uploads/36/19/
  17. PKG_DEPENDS:= libopenssl zlib
  18. PKG_DEPENDS_NOSSL:= zlib
  19. ifeq ($(ADK_COMPILE_RRS_WITH_UCLIBCXX),y)
  20. PKG_DEPENDS_NOSSL+= uclibc++
  21. else
  22. PKG_DEPENDS_NOSSL+= libstdcxx
  23. endif
  24. include ${TOPDIR}/mk/package.mk
  25. $(eval $(call PKG_template,RRS,rrs,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. $(eval $(call PKG_template,RRS_NOSSL,rrs-nossl,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS_NOSSL},${PKG_DESCR},${PKG_SECTION}))
  27. CONFIG_STYLE:= manual
  28. BUILD_STYLE:= manual
  29. INSTALL_STYLE:= manual
  30. ifeq ($(ADK_COMPILE_RRS_WITH_UCLIBCXX),y)
  31. PKG_FLAGS=-fno-builtin -fno-rtti -nostdinc++ -fPIC
  32. PKG_LDFLAGS=-nodefaultlibs -luClibc++ -lc -lm
  33. else
  34. PKG_FLAGS=-fPIC
  35. PKG_LDFLAGS=-shared
  36. endif
  37. do-build:
  38. ifneq (${ADK_PACKAGE_RRS},)
  39. ${MAKE} -C ${WRKBUILD} \
  40. CC="${TARGET_CC}" \
  41. CFLAGS="${TARGET_CFLAGS} -I${STAGING_DIR}/usr/include ${PKG_FLAGS}" \
  42. LDFLAGS="-L${STAGING_DIR}/usr/lib -L${STAGING_DIR}/lib ${PKG_LDFLAGS} -lutil -lssl -lcrypto -lz" \
  43. generic
  44. { cd ${WRKBUILD}; mv rrs rrs-ssl; }
  45. -${MAKE} -C ${WRKBUILD} \
  46. clean
  47. endif
  48. ifneq (${ADK_PACKAGE_RRS_NOSSL},)
  49. ${MAKE} -C ${WRKBUILD} \
  50. CC="${TARGET_CC}" \
  51. CFLAGS="${TARGET_CFLAGS} -I${STAGING_DIR}/usr/include ${PKG_FLAGS}" \
  52. LDFLAGSNOSSL="-L${STAGING_DIR}/usr/lib -L${STAGING_DIR}/lib ${PKG_LDFLAGS} -lutil" \
  53. generic-nossl
  54. { cd ${WRKBUILD}; mv rrs rrs-nossl; }
  55. endif
  56. do-install:
  57. ifneq (${ADK_PACKAGE_RRS},)
  58. ${INSTALL_DIR} ${IDIR_RRS}/usr/bin
  59. ${INSTALL_BIN} ${WRKBUILD}/rrs-ssl ${IDIR_RRS}/usr/bin/rrs
  60. endif
  61. ifneq (${ADK_PACKAGE_RRS_NOSSL},)
  62. ${INSTALL_DIR} ${IDIR_RRS_NOSSL}/usr/bin
  63. ${INSTALL_BIN} ${WRKBUILD}/rrs-nossl ${IDIR_RRS_NOSSL}/usr/bin/rrs
  64. endif
  65. include ${TOPDIR}/mk/pkg-bottom.mk