From 41c4bbb505f4389a5c1660b407cd4073d7a72aab Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Wed, 1 Sep 2010 02:14:35 -0400 Subject: [PATCH] Make it easy to change the number of CPUs --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 37924e2..30cec7c 100644 --- 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)