-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
35 lines (25 loc) · 935 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
BARGE_VERSION := 2.15.0
KERNEL_VERSION := 4.14.282
ISO_NAME := barge-hyperv.iso
VAGRANT := vagrant
EXTERNAL_DEPENDENCIES := iso/linux-$(KERNEL_VERSION).tar.xz \
iso/bzImage iso/rootfs.tar.xz iso/kernel.config iso/isolinux.cfg
iso: $(ISO_NAME)
$(ISO_NAME): iso/Dockerfile iso/S90hyperv $(EXTERNAL_DEPENDENCIES)
cd iso && \
$(VAGRANT) up --no-provision && \
$(VAGRANT) provision && \
$(VAGRANT) suspend
# EXTERNAL_DEPENDENCIES
iso/linux-$(KERNEL_VERSION).tar.xz:
curl -L https://cdn.kernel.org/pub/linux/kernel/v4.x/$(@F) -o $@
iso/bzImage iso/rootfs.tar.xz:
curl -L https://github.com/bargees/barge-os/releases/download/$(BARGE_VERSION)/$(@F) -o $@
iso/kernel.config iso/isolinux.cfg:
curl -L https://raw.githubusercontent.com/bargees/barge-os/$(BARGE_VERSION)/configs/$(@F) -o $@
clean:
-cd iso && $(VAGRANT) destroy -f
$(RM) -r iso/.vagrant
$(RM) $(EXTERNAL_DEPENDENCIES)
$(RM) $(ISO_NAME)
.PHONY: iso clean