diff options
author | Rusty Russell <rusty@rustcorp.com.au> | 2007-07-19 04:49:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-07-19 13:04:53 -0400 |
commit | 8ca47e00690914a9e5e6c734baa37c829a2f2fa1 (patch) | |
tree | 928350cf70a685428cc5a9779044aa88c5771af9 /Documentation/lguest/Makefile | |
parent | b754416bfe9adac6468e45fba244d77f52048aeb (diff) |
lguest: the documentation, example launcher
A brief document describing how to use lguest. Because lguest doesn't have an
ABI we also include an example launcher in the Documentation directory.
[jmorris@namei.org: Fix up nat example in documentation]
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Signed-off-by: James Morris <jmorris@namei.org>
Cc: Matias Zabaljauregui <matias.zabaljauregui@cern.ch>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Documentation/lguest/Makefile')
-rw-r--r-- | Documentation/lguest/Makefile | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Documentation/lguest/Makefile b/Documentation/lguest/Makefile new file mode 100644 index 000000000000..b9b9427376e9 --- /dev/null +++ b/Documentation/lguest/Makefile | |||
@@ -0,0 +1,27 @@ | |||
1 | # This creates the demonstration utility "lguest" which runs a Linux guest. | ||
2 | |||
3 | # For those people that have a separate object dir, look there for .config | ||
4 | KBUILD_OUTPUT := ../.. | ||
5 | ifdef O | ||
6 | ifeq ("$(origin O)", "command line") | ||
7 | KBUILD_OUTPUT := $(O) | ||
8 | endif | ||
9 | endif | ||
10 | # We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary. | ||
11 | include $(KBUILD_OUTPUT)/.config | ||
12 | LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) | ||
13 | |||
14 | CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ | ||
15 | -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds | ||
16 | LDLIBS:=-lz | ||
17 | |||
18 | all: lguest.lds lguest | ||
19 | |||
20 | # The linker script on x86 is so complex the only way of creating one | ||
21 | # which will link our binary in the right place is to mangle the | ||
22 | # default one. | ||
23 | lguest.lds: | ||
24 | $(LD) --verbose | awk '/^==========/ { PRINT=1; next; } /SIZEOF_HEADERS/ { gsub(/0x[0-9A-F]*/, "$(LGUEST_GUEST_TOP)") } { if (PRINT) print $$0; }' > $@ | ||
25 | |||
26 | clean: | ||
27 | rm -f lguest.lds lguest | ||