aboutsummaryrefslogtreecommitdiff
path: root/grub/makefile
blob: a2c2f854e26f4b76eceb83b535beffa0b3741c3b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
GRUBSRC := grub-2.04
DESTDIR != printf $$(pwd)/tools
TARBALL := grub-2.04.tar.xz
URL := https://ftp.gnu.org/gnu/grub/$(TARBALL)

$(TARBALL):
	@curl $(URL) --output $@
$(TARBALL).sig:
	@curl $(URL).sig --output $@

download: $(TARBALL) $(TARBALL).sig

verify: $(TARBALL) $(TARBALL).sig
	@gpg --verify $(TARBALL).sig

# grub requires GNU Make to build
build: $(TARBALL)
	tar -xf $(TARBALL)
	cd $(GRUBSRC) && CC=clang BUILD_CC=clang TARGET_CC=clang ./configure --disable-werror --prefix=/
	make -C $(GRUBSRC) -j$(nproc) DESTDIR=$(DESTDIR) install

clean:
	rm -rf $(TARBALL) $(TARBALL).sig $(GRUBSRC) $(DESTDIR)