]> Devi Nivas Git - cs3210-lab1.git/commitdiff
new targets bochs and qemu
authorrsc <rsc>
Thu, 7 Sep 2006 20:06:15 +0000 (20:06 +0000)
committerrsc <rsc>
Thu, 7 Sep 2006 20:06:15 +0000 (20:06 +0000)
Makefile

index 1124930c1cc1365eceb970351d953ac3dc2a6bee..60578629fc0b7a2f3df05528696a2f93ddf8f829 100644 (file)
--- 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
+