Listing 7. Makefile

# If KVM was compiled from sources and you have errors about
# missing asm/kvm*.h files, copy them from
# kvm-XX/kernel/include/asm/* to {prefix}/include/asm/
CC=gcc
KERNEL16_CFLAGS=-nostdlib -ffreestanding -Wl,-T,kernel16.lds

all:    launcher kernel1

launcher: launcher.o
        $(CC) launcher.o /usr/lib/libkvm.a -o launcher

launcher.o:

kernel1: kernel1.S
        $(CC) $(KERNEL16_CFLAGS) kernel1.S -o kernel1

clean:
        rm *.o launcher kernel1

