diff options
-rw-r--r-- | bootloader/Makefile | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/bootloader/Makefile b/bootloader/Makefile index 9994dae..e72fe74 100644 --- a/bootloader/Makefile +++ b/bootloader/Makefile @@ -1,14 +1,64 @@ -all: kbd-names.txt lang-kbds.txt po +MY_TARGETS = images kbd-names.txt lang-kbds.txt layouts maggy unicode.pf2 + +ARCH = $(shell uname -m) + +GRUB2_MODULES = iso9660 fat part_msdos all_video font png gfxterm gfxmenu \ + keylayouts at_keyboard usb_keyboard configfile echo gettext \ + linux linux16 ls search test + +GRUB_IMAGES = images/boot_hybrid.img images/eltorito.img + +ifeq ($(ARCH),x86_64) + GRUB_IMAGES += images/boot_x64.img +endif + +INSTALL_DIR = $(PREFIX)/usr/share/drakiso-bootloader + +all: $(MY_TARGETS) po + +images: $(GRUB_IMAGES) + +images/boot_hybrid.img: /usr/lib/grub/i386-pc/boot_hybrid.img + @mkdir -p images + cp $< $@ + +images/eltorito.img: + @mkdir -p images + grub2-mkimage --output $@ --prefix /boot/grub2 --format i386-pc-eltorito biosdisk $(GRUB2_MODULES) + +images/boot_x64.img: + @mkdir -p images + grub2-mkimage --output $@ --prefix /EFI/BOOT --format x86_64-efi $(GRUB2_MODULES) kbd-names%txt lang-kbds%txt: layouts make-kbd-info layouts: +maggy: /boot/grub2/themes/maggy + cp -rL $< $@ + .PHONY: po po: make-grub-po make-kbd-po kbd-names.txt make -C po +unicode.pf2: /usr/share/grub/unicode.pf2 + cp $< $@ + +install: all + mkdir -p $(INSTALL_DIR)/images + mkdir -p $(INSTALL_DIR)/layouts + mkdir -p $(INSTALL_DIR)/messages + mkdir -p $(INSTALL_DIR)/maggy + install -m 0644 *.txt *.pf2 $(INSTALL_DIR) + install -m 0644 images/* $(INSTALL_DIR)/images + install -m 0644 layouts/* $(INSTALL_DIR)/layouts + install -m 0644 maggy/* $(INSTALL_DIR)/maggy + install -m 0644 po/*.mo $(INSTALL_DIR)/messages + +uninstall: + rm -rf $(INSTALL_DIR) + clean: - rm -rf kbd-names.txt lang-kbds.txt layouts + rm -rf $(MY_TARGETS) make -C po clean |