-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathMakefile
52 lines (35 loc) · 1.43 KB
/
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# Variables defined before the inclusion of config.mk can be overridden in
# config.mk in order to adjust how the build runs.
RUST_ROOT := $(shell realpath $${HOME}/.cargo)
MKISOFS := mkisofs
# Path to source files (if not '.')
SRCDIR := $(shell pwd)
# Directory in which built object files will be placed (if not $(SRCDIR)/build).
BUILDDIR := $(SRCDIR)/build
# Directory in which GRUB and other image files are read from
IMAGESDIR := $(SRCDIR)/images
# Override default shell (e.g. to avoid using dash)
SHELL := /bin/bash
# Override this to redefine the location of the config file.
CONFIG ?= $(SRCDIR)/config.mk
-include $(CONFIG)
KERNEL := $(BUILDDIR)/rustic-example
ISO := $(BUILDDIR)/rustic.iso
.EXPORT_ALL_VARIABLES:
.PHONY: checkenv bootstrap runtime onlylibs rustic app clean all
################################################################################
all: app
app: $(ISO)
################################################################################
$(ISO): $(KERNEL)
@echo "[ISO ]" $@
@cp $(IMAGESDIR)/grub/stage2_eltorito-x86 $(SRCDIR)/stage2_eltorito
@$(MKISOFS) -D -joliet -quiet -input-charset iso8859-1 -R \
-b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 \
-boot-info-table -o $@ -V 'RUSTIC' -graft-points \
boot/grub/stage2_eltorito=./stage2_eltorito \
boot/grub/menu.lst=$(IMAGESDIR)/grub/menu.lst \
boot/kernel=$(KERNEL)
@rm -f $(SRCDIR)/stage2_eltorito
clean:
-rm -f $(ISO)