summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrsc <rsc>2006-09-07 20:06:15 +0000
committerrsc <rsc>2006-09-07 20:06:15 +0000
commit339a9beaf59732dce501caf3ce995a0d4d90113b (patch)
tree8da650de50c331b1c923f67e1c7aec973940cf8a
parentf3c393ba9f7bd9ae9b08a688eb955b8c73c04dec (diff)
downloadxv6-labs-339a9beaf59732dce501caf3ce995a0d4d90113b.tar.gz
xv6-labs-339a9beaf59732dce501caf3ce995a0d4d90113b.tar.bz2
xv6-labs-339a9beaf59732dce501caf3ce995a0d4d90113b.zip
new targets bochs and qemu
-rw-r--r--Makefile52
1 files changed, 31 insertions, 21 deletions
diff --git a/Makefile b/Makefile
index 1124930..6057862 100644
--- a/Makefile
+++ b/Makefile
@@ -24,10 +24,10 @@ OBJS = \
8253pit.o\
# Cross-compiling (e.g., on Mac OS X)
-TOOLPREFIX = i386-jos-elf-
+# TOOLPREFIX = i386-jos-elf-
# Using native tools (e.g., on X86 Linux)
-# TOOLPREFIX =
+TOOLPREFIX =
CC = $(TOOLPREFIX)gcc
LD = $(TOOLPREFIX)ld
@@ -60,25 +60,6 @@ kernel : $(OBJS) bootother.S _init
tags: $(OBJS) bootother.S _init
etags *.S *.c
-PRINT = \
- runoff.list \
- README\
- types.h param.h defs.h x86.h asm.h elf.h mmu.h spinlock.h\
- bootasm.S bootother.S main.c _init.c spinlock.c\
- proc.h proc.c setjmp.S kalloc.c\
- syscall.h trapasm.S traps.h trap.c vectors.pl syscall.c sysproc.c\
- buf.h dev.h fcntl.h stat.h file.h fs.h fsvar.h fd.c fs.c bio.c ide.c sysfile.c\
- pipe.c\
- mp.h ioapic.h mp.c lapic.c ioapic.c picirq.c\
- console.c\
- string.c\
-
-# make a printout
-xv6.pdf : $(PRINT)
- ./runoff
-
-print : xv6.pdf
-
vectors.S : vectors.pl
perl vectors.pl > vectors.S
@@ -130,3 +111,32 @@ clean :
*.o *.d *.asm vectors.S parport.out \
bootblock kernel xv6.img usertests \
fs.img mkfs echo init
+
+# make a printout
+PRINT = \
+ runoff.list \
+ README\
+ types.h param.h defs.h x86.h asm.h elf.h mmu.h spinlock.h\
+ bootasm.S bootother.S main.c _init.c spinlock.c\
+ proc.h proc.c setjmp.S kalloc.c\
+ syscall.h trapasm.S traps.h trap.c vectors.pl syscall.c sysproc.c\
+ buf.h dev.h fcntl.h stat.h file.h fs.h fsvar.h fd.c fs.c bio.c ide.c sysfile.c\
+ pipe.c\
+ mp.h ioapic.h mp.c lapic.c ioapic.c picirq.c\
+ console.c\
+ string.c\
+
+xv6.pdf : $(PRINT)
+ ./runoff
+
+print : xv6.pdf
+
+# run in emulators
+
+bochs : fs.img xv6.img
+ if [ ! -e .bochsrc ]; then ln -s dot-bochsrc .bochsrc; fi
+ bochs -q
+
+qemu : fs.img xv6.img
+ qemu -parallel stdio -hdb fs.img xv6.img
+