1
0

Makefile 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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:= tntnet
  5. PKG_VERSION:= 2.1
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= a9c85aa6d624f7f88c48374f28730242
  8. PKG_DESCR:= small C++ application server
  9. PKG_SECTION:= www
  10. PKG_DEPENDS:= cxxtools zlib libpthread
  11. PKG_BUILDDEP:= cxxtools zlib libiconv-tiny
  12. PKG_URL:= http://www.tntnet.org/
  13. PKG_SITES:= http://www.tntnet.org/download/
  14. PKG_NEED_CXX:= 1
  15. PKG_ARCH_DEPENDS:= !arm !m68k
  16. PKG_CHOICES_TNTNET:= WITH_GNUTLS WITH_OPENSSL WITHOUT_SSL
  17. PKGCD_WITHOUT_SSL:= use no SSL
  18. PKGCD_WITH_OPENSSL:= use OpenSSL for crypto
  19. PKGCS_WITH_OPENSSL:= libopenssl
  20. PKGCB_WITH_OPENSSL:= openssl
  21. PKGCD_WITH_GNUTLS:= use GnuTLS for crypto
  22. PKGCS_WITH_GNUTLS:= libgnutls
  23. PKGCB_WITH_GNUTLS:= gnutls
  24. include ${TOPDIR}/mk/package.mk
  25. $(eval $(call PKG_template,TNTNET,tntnet,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  26. ifeq (${ADK_PACKAGE_TNTNET_WITHOUT_SSL},y)
  27. CONFIGURE_ARGS+= --with-ssl=no
  28. endif
  29. ifeq (${ADK_PACKAGE_TNTNET_WITH_OPENSSL},y)
  30. CONFIGURE_ARGS+= --with-ssl=openssl
  31. endif
  32. ifeq (${ADK_PACKAGE_TNTNET_WITH_GNUTLS},y)
  33. CONFIGURE_ARGS+= --with-ssl=gnutls
  34. endif
  35. CONFIGURE_ARGS+= --without-epoll \
  36. --without-sdk \
  37. --without-cgi \
  38. --without-sendfile
  39. CONFIGURE_ENV+= CXXFLAGS='${TARGET_CXXFLAGS}' \
  40. ac_cv_path_cxxtools_config=${STAGING_TARGET_DIR}/usr/bin
  41. ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
  42. TARGET_CXXFLAGS+= -fno-builtin -nostdinc++ \
  43. -I${STAGING_TARGET_DIR}/usr/include/uClibc++ -Wl,-E
  44. TARGET_LDFLAGS+= -luClibc++ -lm -lc -ldl -nodefaultlibs -shared
  45. else
  46. TARGET_LDFLAGS+= -ldl
  47. endif
  48. ifeq (${ADK_COMPILE_CXXTOOLS_WITH_UCLIBCXX},y)
  49. # add workaround because libtool tries to link libstdc++
  50. post-configure:
  51. ${SED} 's#postdeps="-lstdc.*#postdeps="-lm"#' \
  52. ${WRKBUILD}/libtool
  53. endif
  54. tntnet-install:
  55. ${INSTALL_DIR} ${IDIR_TNTNET}/www
  56. ${INSTALL_DIR} ${IDIR_TNTNET}/etc/tntnet
  57. ${INSTALL_DIR} ${IDIR_TNTNET}/usr/bin
  58. ${INSTALL_DIR} ${IDIR_TNTNET}/usr/lib/tntnet
  59. ${INSTALL_DATA} ./files/tntnet.{conf,properties} \
  60. ${IDIR_TNTNET}/etc/tntnet
  61. ${INSTALL_DATA} ./files/mime.conf \
  62. ${IDIR_TNTNET}/etc/tntnet
  63. ${CP} ${WRKINST}/usr/bin/tntnet ${IDIR_TNTNET}/usr/bin
  64. ${CP} ${WRKINST}/usr/lib/tntnet/tntnet.so* \
  65. ${IDIR_TNTNET}/usr/lib/tntnet
  66. ${CP} ${WRKINST}/usr/lib/libtntnet.so* \
  67. ${IDIR_TNTNET}/usr/lib
  68. include ${TOPDIR}/mk/pkg-bottom.mk