Makefile 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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:= libnet
  5. PKG_VERSION:= 1.1.5
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= a9bc1d75a610efcfee200d3e28d8eb8f
  8. PKG_DESCR:= a low-level packet creation library
  9. PKG_SECTION:= libs
  10. PKG_DEPENDS:= libpcap
  11. PKG_BUILDDEP:= libpcap
  12. PKG_URL:= http://sourceforge.net/projects/libnet-dev/
  13. PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libnet-dev/}
  14. PKG_NEED_CXX:= 1
  15. PKG_SUBPKGS:= LIBNET LIBNET_DEV
  16. PKGSC_LIBNET_DEV:= devel
  17. PKGSD_LIBNET_DEV:= libnet headers
  18. include ${TOPDIR}/mk/package.mk
  19. $(eval $(call PKG_template,LIBNET,libnet,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  20. $(eval $(call PKG_template,LIBNET_DEV,libnet-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBNET_DEV},${PKGSC_LIBNET_DEV}))
  21. TARGET_CFLAGS:= $(filter-out -flto,$(TARGET_CFLAGS))
  22. ENDIAN:=lil
  23. ifeq (${CPU_ARCH},mips)
  24. ENDIAN:=big
  25. endif
  26. ifeq (${CPU_ARCH},mips64)
  27. ENDIAN:=big
  28. endif
  29. ifeq (${CPU_ARCH},ppc)
  30. ENDIAN:=big
  31. endif
  32. CONFIGURE_ENV+= ac_cv_libnet_endianess=${ENDIAN} \
  33. ac_cv_lbl_unaligned_fail=no
  34. libnet-install:
  35. ${INSTALL_DIR} ${IDIR_LIBNET}/usr/lib
  36. ${CP} ${WRKINST}/usr/lib/libnet.so* ${IDIR_LIBNET}/usr/lib
  37. libnet-dev-install:
  38. ${INSTALL_DIR} ${IDIR_LIBNET_DEV}/usr/include
  39. ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBNET_DEV}/usr/include
  40. ${INSTALL_DIR} ${IDIR_LIBNET_DEV}/usr/bin
  41. ${INSTALL_BIN} ${WRKINST}/usr/bin/libnet-config \
  42. ${IDIR_LIBNET_DEV}/usr/bin
  43. include ${TOPDIR}/mk/pkg-bottom.mk