.POSIX: VM="fedora.img" PORTS= CPU=-smp 4 MEM=-m 4G CDROM= ARGS= run: @qemu-system-x86_64 -enable-kvm $(CPU) $(MEM) -drive\ file=$(VM),format=raw $$([ -z $(CDR) ]|| echo -cdrom $(CDR) -boot\ d) $$(echo -n "-net user"; for port in $(PORTS); do echo -n\ ",hostfwd=tcp::$${port}-:$${port}"; done;) $(DISP) -net nic