xref: /kvmtool/tests/boot/Makefile (revision 7dda8cca6df01763f720e8f1c239b27a6443073d)
1NAME	:= init
2
3OBJ	:= $(NAME).o
4MKISOFS := $(shell which mkisofs)
5ifndef MKISOFS
6MKISOFS := $(shell which xorrisofs)
7endif
8
9all: $(.o)
10	rm -rf rootfs
11	mkdir rootfs
12	gcc -static init.c -o rootfs/init
13ifdef MKISOFS
14	$(MKISOFS) rootfs -o boot_test.iso
15else
16	$(error "mkisofs or xorriso needed to build boot_test.iso")
17endif
18
19clean:
20	rm -rf rootfs boot_test.iso
21.PHONY: clean
22