6 #make sure env CFLAGS variable is not used
9 #include architecure specific make rules
10 include config-
$(ARCH
).mak
13 # Usage: OP_CFLAGS+=$(call cc-option, -falign-functions=0, -malign-functions=0)
15 cc-option
= $(shell if
$(CC
) $(1) -S
-o
/dev
/null
-xc
/dev
/null \
16 > /dev
/null
2>&1; then echo
"$(1)"; else echo
"$(2)"; fi
;)
18 CFLAGS
+= $(autodepend-flags
) -g
-fomit-frame-pointer
-Wall
19 CFLAGS
+= $(call cc-option
, -fno-stack-protector
, "")
20 CFLAGS
+= $(call cc-option
, -fno-stack-protector-all
, "")
24 CXXFLAGS
= $(autodepend-flags
)
26 autodepend-flags
= -MMD
-MF
$(dir $*).
$(notdir $*).d
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
$(KERNELDIR
)/include/linux
/kvm_para.h \
33 $(DESTDIR
)/$(PREFIX
)/include/linux
/kvm_para.h
34 install -D libkvm.a
$(DESTDIR
)/$(PREFIX
)/$(LIBDIR
)/libkvm.a
37 $(CC
) $(CFLAGS
) -nostdlib
-o
$@
-Wl
,-T
,flat.lds
$^
39 test/bootstrap
: test/bootstrap.o
40 $(CC
) -nostdlib
-o
$@
-Wl
,-T
,bootstrap.lds
$^
43 $(CC
) $(CFLAGS
) -c
-nostdlib
-o
$@
$^
45 test/irq.flat
: test/print.o
47 test/access.flat
: $(cstart.o
) test/access.o
test/printf.o
test/print.o \
50 test/sieve.flat
: $(cstart.o
) test/sieve.o
test/print.o
test/vm.o
52 test/vmexit.flat
: $(cstart.o
) test/vmexit.o
test/printf.o
test/smp.o
54 test/test32.flat
: test/test32.o
56 test/smp.flat
: $(cstart.o
) test/smp.o
test/printf.o
test/smptest.o
58 test/%.o
: CFLAGS
+= -std
=gnu99
-ffreestanding
63 $(RM
) kvmctl
*.o
*.a .
*.d
64 $(RM
) test/bootstrap
test/*.o
test/*.flat
test/.
*.d