1
0

Makefile 2.0 KB

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