~ubuntu-branches/ubuntu/hardy/kvm/hardy-backports

« back to all changes in this revision

Viewing changes to user/Makefile

  • Committer: Bazaar Package Importer
  • Author(s): Soren Hansen
  • Date: 2007-11-15 02:21:55 UTC
  • mfrom: (1.1.10 upstream)
  • Revision ID: james.westby@ubuntu.com-20071115022155-pxoxb8kfcrkn72mi
Tags: 1:52+dfsg-0ubuntu1
* New upstream release.
* 08_default_tdf.patch
  - Make -tdf the default and add a -no-tdf option.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 
4
4
DESTDIR :=
5
5
 
 
6
.PHONY: arch_clean clean
 
7
 
6
8
#make sure env CFLAGS variable is not used
7
9
CFLAGS =
8
10
 
15
17
cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \
16
18
              > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;)
17
19
 
18
 
CFLAGS += -I $(KERNELDIR)/include $(autodepend-flags) -g -fomit-frame-pointer \
19
 
        -Wall
 
20
CFLAGS += $(autodepend-flags) -g -fomit-frame-pointer -Wall
20
21
CFLAGS += $(call cc-option, -fno-stack-protector, "")
21
22
CFLAGS += $(call cc-option, -fno-stack-protector-all, "")
22
 
 
23
 
LDFLAGS += $(CFLAGS)
24
 
 
25
 
CXXFLAGS = $(autodepend-flags) 
 
23
CFLAGS += -I ../libkvm
 
24
 
 
25
LDFLAGS += $(CFLAGS) -L ../libkvm
 
26
 
 
27
CXXFLAGS = $(autodepend-flags)
26
28
 
27
29
autodepend-flags = -MMD -MF $(dir $*).$(notdir $*).d
28
30
 
29
 
all: kvmctl libkvm.a flatfiles
30
 
 
31
31
kvmctl: LDFLAGS += -pthread -lrt
32
32
 
33
 
kvmctl: kvmctl.o main.o
34
 
 
35
 
balloon_ctl: balloon_ctl.o
36
 
 
37
 
libkvm.a: kvmctl.o
38
 
        $(AR) rcs $@ $^
39
 
 
40
 
flatfiles-common = test/bootstrap test/vmexit.flat test/smp.flat
41
 
 
42
 
flatfiles: $(flatfiles-common) $(flatfiles)
43
 
 
44
 
install:
45
 
        install -D kvmctl.h $(DESTDIR)/$(PREFIX)/include/kvmctl.h
46
 
        install -D $(KERNELDIR)/include/linux/kvm.h \
47
 
                $(DESTDIR)/$(PREFIX)/include/linux/kvm.h
48
 
        install -D $(KERNELDIR)/include/linux/kvm_para.h \
49
 
                $(DESTDIR)/$(PREFIX)/include/linux/kvm_para.h
50
 
        install -D libkvm.a $(DESTDIR)/$(PREFIX)/$(LIBDIR)/libkvm.a
 
33
kvmctl: $(kvmctl_objs)
 
34
        $(CC) $(LDFLAGS) $^ -o $@
51
35
 
52
36
%.flat: %.o
53
37
        $(CC) $(CFLAGS) -nostdlib -o $@ -Wl,-T,flat.lds $^
54
38
 
55
 
test/bootstrap: test/bootstrap.o
56
 
        $(CC) -nostdlib -o $@ -Wl,-T,bootstrap.lds $^
57
 
 
58
39
%.o: %.S
59
40
        $(CC) $(CFLAGS) -c -nostdlib -o $@ $^
60
41
 
61
 
test/irq.flat: test/print.o
62
 
 
63
 
test/access.flat: $(cstart.o) test/access.o test/printf.o test/print.o \
64
 
        test/smp.o
65
 
 
66
 
test/sieve.flat: $(cstart.o) test/sieve.o test/print.o test/vm.o
67
 
 
68
 
test/vmexit.flat: $(cstart.o) test/vmexit.o test/printf.o test/smp.o
69
 
 
70
 
test/test32.flat: test/test32.o
71
 
 
72
 
test/smp.flat: $(cstart.o) test/smp.o test/printf.o test/smptest.o
73
 
 
74
 
test/%.o: CFLAGS += -std=gnu99 -ffreestanding
75
 
 
76
42
-include .*.d
77
43
 
78
 
clean:
 
44
clean: arch_clean
79
45
        $(RM) kvmctl *.o *.a .*.d
80
 
        $(RM) test/bootstrap test/*.o test/*.flat test/.*.d