4 CFLAGS
= -I
$(KERNELDIR
)/include $(autodepend-flags
) -g
5 CXXFLAGS
= $(autodepend-flags
)
7 autodepend-flags
= -MMD
-MF
$(dir $*).
$(notdir $*).d
11 ifeq ($(shell uname
-m
), x86_64
)
19 kvmctl
: kvmctl.o main.o
24 flatfiles
: test/simple.flat
test/stringio.flat
test/memtest1.flat \
25 test/irq.flat
test/sieve.flat
test/bootstrap \
29 install -D kvmctl.h
$(DESTDIR
)/$(PREFIX
)/include/kvmctl.h
30 install -D
$(KERNELDIR
)/include/linux
/kvm.h \
31 $(DESTDIR
)/$(PREFIX
)/include/linux
/kvm.h
32 install -D libkvm.a
$(DESTDIR
)/$(PREFIX
)/$(LIBDIR
)/libkvm.a
35 gcc
-nostdlib
-o
$@
-Wl
,-T
,flat.lds
$^
37 test/bootstrap
: test/bootstrap.o
38 gcc
-nostdlib
-o
$@
-Wl
,-T
,bootstrap.lds
$^
41 gcc
-c
-nostdlib
-o
$@
$^
43 test/irq.flat
: test/print.o
45 test/access.flat
: test/cstart64.o
test/access.o
test/printf.o
test/print.o
47 test/sieve.flat
: test/cstart64.o
test/sieve.o
test/print.o
test/vm.o
49 test/test32.flat
: test/test32.o
51 test/%.o
: CFLAGS
+= -std
=gnu99
-ffreestanding
56 $(RM
) kvmctl
*.o
*.a .
*.d
57 $(RM
) test/bootstrap
test/*.o
test/*.flat
test/.
*.d