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:= rrs
  5. PKG_VERSION:= 1.70
  6. PKG_RELEASE:= 2
  7. PKG_BUILDDEP+= zlib
  8. PKG_CXX:= RRS
  9. ifneq ($(ADK_PACKAGE_RRS),)
  10. PKG_BUILDDEP+= openssl
  11. endif
  12. PKG_MD5SUM:= b400d03c0e39e3e78a7327ba78f789f0
  13. PKG_DESCR:= A reverse (connecting) remote shell, with SSL support.
  14. PKG_SECTION:= net
  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. ifeq ($(ADK_COMPILE_RRS_WITH_UCLIBCXX),y)
  28. PKG_FLAGS=-fno-builtin -fno-rtti -nostdinc++ -fPIC
  29. PKG_LDFLAGS=-nodefaultlibs -luClibc++ -lc -lm
  30. else
  31. PKG_FLAGS=-fPIC
  32. PKG_LDFLAGS=-shared
  33. endif
  34. do-configure:
  35. ifneq (${ADK_PACKAGE_RRS},)
  36. ${MAKE} -C ${WRKBUILD} \
  37. CC="${TARGET_CC}" \
  38. CFLAGS="${TARGET_CFLAGS} -I${STAGING_DIR}/usr/include ${PKG_FLAGS}" \
  39. LDFLAGS="-L${STAGING_DIR}/usr/lib -L${STAGING_DIR}/lib ${PKG_LDFLAGS} -lutil -lssl -lcrypto -lz" \
  40. generic
  41. { cd ${WRKBUILD}; mv rrs rrs-ssl; }
  42. -${MAKE} -C ${WRKBUILD} \
  43. clean
  44. endif
  45. ifneq (${ADK_PACKAGE_RRS_NOSSL},)
  46. ${MAKE} -C ${WRKBUILD} \
  47. CC="${TARGET_CC}" \
  48. CFLAGS="${TARGET_CFLAGS} -I${STAGING_DIR}/usr/include ${PKG_FLAGS}" \
  49. LDFLAGSNOSSL="-L${STAGING_DIR}/usr/lib -L${STAGING_DIR}/lib ${PKG_LDFLAGS} -lutil" \
  50. generic-nossl
  51. { cd ${WRKBUILD}; mv rrs rrs-nossl; }
  52. endif
  53. do-install:
  54. ifneq (${ADK_PACKAGE_RRS},)
  55. ${INSTALL_DIR} ${IDIR_RRS}/usr/bin
  56. ${INSTALL_BIN} ${WRKBUILD}/rrs-ssl ${IDIR_RRS}/usr/bin/rrs
  57. endif
  58. ifneq (${ADK_PACKAGE_RRS_NOSSL},)
  59. ${INSTALL_DIR} ${IDIR_RRS_NOSSL}/usr/bin
  60. ${INSTALL_BIN} ${WRKBUILD}/rrs-nossl ${IDIR_RRS_NOSSL}/usr/bin/rrs
  61. endif
  62. include ${TOPDIR}/mk/pkg-bottom.mk