- put a static grub into the staging dir
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 30 Sep 2007 18:06:32 +0000 (18:06 -0000)
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Sun, 30 Sep 2007 18:06:32 +0000 (18:06 -0000)
target/x86/grub/grub.mk

index 89ef7645d302145200de02cd982a50dc3d493ca3..85606b721e0449b13b81c10bdefdf49827297d38 100644 (file)
@@ -97,6 +97,11 @@ $(GRUB_DIR)/.configured: $(GRUB_DIR)/.unpacked
 
 $(GRUB_DIR)/$(GRUB_BINARY): $(GRUB_DIR)/.configured
        $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)
+       rm -f $(GRUB_DIR)/$(GRUB_BINARY)
+       $(MAKE) CC=$(TARGET_CC) CFLAGS+=-static -C $(GRUB_DIR)/grub grub
+       mkdir -p $(dir $(STAGING_DIR)/$(GRUB_TARGET_BINARY))
+       mv $(GRUB_DIR)/$(GRUB_BINARY) $(STAGING_DIR)/$(GRUB_TARGET_BINARY).static
+       $(MAKE) CC=$(TARGET_CC) -C $(GRUB_DIR)/grub
 
 $(GRUB_DIR)/.installed: $(GRUB_DIR)/$(GRUB_BINARY)
        cp $(GRUB_DIR)/$(GRUB_BINARY) $(TARGET_DIR)/$(GRUB_TARGET_BINARY)