Makefile 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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:= mksh
  5. PKG_VERSION:= 49
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= e8c205cac72c3dc8540bbc3897421422
  8. PKG_DESCR:= MirBSD Korn Shell
  9. PKG_SECTION:= shells
  10. PKG_URL:= http://www.mirbsd.org/
  11. PKG_SITES:= ${MASTER_SITE_MIRBSD:distfiles/=dist/mir/mksh/}
  12. PKG_DFLT_MKSH:= y if !ADK_TOOLCHAIN_ONLY
  13. DISTFILES= ${PKG_NAME}-R${PKG_VERSION}.tgz
  14. WRKDIST= ${WRKDIR}/${PKG_NAME}
  15. include ${TOPDIR}/mk/host.mk
  16. include ${TOPDIR}/mk/package.mk
  17. $(eval $(call HOST_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE}))
  18. $(eval $(call PKG_template,MKSH,mksh,${PKG_VERSION}-${PKG_RELEASE},,${PKG_DESCR},${PKG_SECTION}))
  19. TARGET_CPPFLAGS+= -DMKSH_SMALL=1
  20. TARGET_LDFLAGS+= -static-libgcc
  21. HOST_STYLE:= manual
  22. CONFIG_STYLE:= manual
  23. BUILD_STYLE:= manual
  24. INSTALL_STYLE:= manual
  25. host-build:
  26. cd ${WRKBUILD} && HAVE_CAN_FSTACKPROTECTORALL=0 \
  27. TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r -c lto
  28. mksh-hostinstall:
  29. ${INSTALL_DIR} ${STAGING_HOST_DIR}/usr/bin
  30. ${INSTALL_BIN} ${WRKBUILD}/mksh \
  31. ${STAGING_HOST_DIR}/usr/bin
  32. do-build:
  33. cd ${WRKBUILD} && CC='${TARGET_CC}' CFLAGS='${TARGET_CFLAGS}' \
  34. CPPFLAGS='${TARGET_CPPFLAGS}' LDFLAGS='${TARGET_LDFLAGS}' \
  35. HAVE_CAN_FSTACKPROTECTORALL=0 \
  36. TARGET_OS=Linux ${BASH} ${WRKSRC}/Build.sh -Q -r -c lto
  37. mksh-install:
  38. ${INSTALL_DIR} ${IDIR_MKSH}/bin ${IDIR_MKSH}/root
  39. ${INSTALL_BIN} ${WRKBUILD}/mksh ${IDIR_MKSH}/bin/
  40. ${CP} ${WRKSRC}/dot.mkshrc ${IDIR_MKSH}/root/.mkshrc
  41. include ${TOPDIR}/mk/host-bottom.mk
  42. include ${TOPDIR}/mk/pkg-bottom.mk