Makefile 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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:= grub
  5. PKG_VERSION:= 2.00
  6. PKG_RELEASE:= 1
  7. PKG_MD5SUM:= e927540b6eda8b024fb0391eeaa4091c
  8. PKG_DESCR:= GRUB2 bootloader (source package)
  9. PKG_SECTION:= boot
  10. PKG_BUILDDEP:= bison-host
  11. PKG_URL:= http://www.gnu.org/software/grub
  12. PKG_SITES:= ftp://ftp.gnu.org/gnu/grub/
  13. #PKG_HOST_DEPENDS:= linux
  14. PKG_ARCH_DEPENDS:= x86 x86_64 mips
  15. PKG_NOPARALLEL:= 1
  16. PKG_CHOICES_GRUB:= PC EFI
  17. PKGCD_PC:= build for PC BIOS
  18. PKGCD_EFI:= build for EFI
  19. include $(TOPDIR)/mk/package.mk
  20. $(eval $(call PKG_template,GRUB,grub,$(PKG_VERSION)-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
  21. ifeq ($(ADK_PACKAGE_GRUB_PC),y)
  22. GRUB_ARCH:= i386-pc
  23. CONFIGURE_ARGS+= --with-platform=pc
  24. endif
  25. ifeq ($(ADK_PACKAGE_GRUB_EFI),y)
  26. GRUB_ARCH:= x86_64-efi
  27. CONFIGURE_ARGS+= --with-platform=efi
  28. endif
  29. ifeq ($(ADK_STATIC),y)
  30. TARGET_CFLAGS+= -static
  31. TARGET_LDFLAGS+= -static
  32. endif
  33. XAKE_FLAGS+= GCC_HONOUR_COPTS=s
  34. grub-install:
  35. ${INSTALL_DIR} $(IDIR_GRUB)/usr/{sbin,bin}
  36. ${INSTALL_DIR} $(IDIR_GRUB)/usr/lib/grub/${GRUB_ARCH}/
  37. ${INSTALL_DIR} $(IDIR_GRUB)/etc
  38. ${CP} ${WRKINST}/etc/grub.d $(IDIR_GRUB)/etc
  39. ${CP} ${WRKINST}/usr/lib/grub/${GRUB_ARCH}/*{mod,lst,img} \
  40. $(IDIR_GRUB)/usr/lib/grub/${GRUB_ARCH}/
  41. ${INSTALL_BIN} ${WRKINST}/usr/bin/* $(IDIR_GRUB)/usr/bin
  42. ${INSTALL_BIN} ${WRKINST}/usr/sbin/* $(IDIR_GRUB)/usr/sbin
  43. include ${TOPDIR}/mk/pkg-bottom.mk