From b60b2b1f8f8d5dc62cce610f8192bc0846f260e9 Mon Sep 17 00:00:00 2001 From: Nathan Cannon Date: Fri, 17 Nov 2017 00:53:53 +0000 Subject: [PATCH] Removed duplication of output filename in nakefile. --- nakefile.nim | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nakefile.nim b/nakefile.nim index 255b39f..093f630 100644 --- a/nakefile.nim +++ b/nakefile.nim @@ -2,14 +2,14 @@ import nake import os const - standardOptions = """--skipCfg --forceBuild --cc:clang --deadCodeElim:on --gc:regions --boundChecks:on --path:"kernel/arch/i386" --cpu:i386 --os:standalone --passC:"-ffreestanding -nostdlib --target=i386-pc-none-elf -march=i386" --passL:"-ffreestanding -target i386 -nostdlib" --out:"myos.bin" kernel/kernel.nim""" + standardOptions = """--skipCfg --forceBuild --cc:clang --deadCodeElim:on --gc:regions --boundChecks:on --path:"kernel/arch/i386" --cpu:i386 --os:standalone --passC:"-ffreestanding -nostdlib --target=i386-pc-none-elf -march=i386" --passL:"-ffreestanding -target i386 -nostdlib" kernel/kernel.nim""" outputFile = "myos.bin" task "clean", "Removes build files.": removeFile("boot.o") removeFile("serial.log") removeDir("nimcache") - removeFile("myos.bin") + removeFile(outputFile) echo "Done." task "bootloader", "Builds the bootloader.": @@ -21,7 +21,7 @@ task "build", "Builds the operating system.": runTask("clean") runTask("bootloader") echo "Compiling and linking." - direShell "nim cc", standardOptions + direShell "nim cc -o", outputFile, standardOptions runTask("checkMultiboot") echo "Done." @@ -29,7 +29,7 @@ task "build-release", "Builds the operating system, release mode.": runTask("clean") runTask("bootloader") echo "Compiling and linking (release mode)." - direShell "nim cc --skipCfg -d:release", standardOptions + direShell "nim cc --skipCfg -d:release -o:", outputFile, standardOptions runTask("checkMultiboot") echo "Done." @@ -41,7 +41,7 @@ task "checkMultiboot", "Checks the grub multiboot header.": task "debug", "Runs the operating system using QEMU with debug build and flags.": runTask("build") echo "Running in Qemu." - direShell "qemu-system-i386 -kernel myos.bin -serial stdio -no-reboot -d int,cpu-reset" + direShell "qemu-system-i386 -kernel", outputFile ,"-serial stdio -no-reboot -d int,cpu-reset" task "run", "Runs the operating system using QEMU.": runTask("build-release")