]> Devi Nivas Git - cs3210-lab1.git/commitdiff
Make it easy to change the number of CPUs
authorAustin Clements <amdragon@mit.edu>
Wed, 1 Sep 2010 06:14:35 +0000 (02:14 -0400)
committerAustin Clements <amdragon@mit.edu>
Wed, 1 Sep 2010 06:14:35 +0000 (02:14 -0400)
Makefile

index 37924e228c78ca4012807d1adb0929942276697b..30cec7c4444f4cddb462c7081b93f048b541b695 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -179,7 +179,10 @@ GDBPORT = $(shell expr `id -u` % 5000 + 25000)
 QEMUGDB = $(shell if $(QEMU) -help | grep -q '^-gdb'; \
        then echo "-gdb tcp::$(GDBPORT)"; \
        else echo "-s -p $(GDBPORT)"; fi)
-QEMUOPTS = -smp 2 -hdb fs.img xv6.img
+ifndef CPUS
+CPUS := 2
+endif
+QEMUOPTS = -hdb fs.img xv6.img -smp $(CPUS)
 
 qemu: fs.img xv6.img
        $(QEMU) -serial mon:stdio $(QEMUOPTS)