Removed duplication of output filename in nakefile.

This commit is contained in:
neviyn 2017-11-17 00:53:53 +00:00
parent f07b29d826
commit b60b2b1f8f

View File

@ -2,14 +2,14 @@ import nake
import os import os
const 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" outputFile = "myos.bin"
task "clean", "Removes build files.": task "clean", "Removes build files.":
removeFile("boot.o") removeFile("boot.o")
removeFile("serial.log") removeFile("serial.log")
removeDir("nimcache") removeDir("nimcache")
removeFile("myos.bin") removeFile(outputFile)
echo "Done." echo "Done."
task "bootloader", "Builds the bootloader.": task "bootloader", "Builds the bootloader.":
@ -21,7 +21,7 @@ task "build", "Builds the operating system.":
runTask("clean") runTask("clean")
runTask("bootloader") runTask("bootloader")
echo "Compiling and linking." echo "Compiling and linking."
direShell "nim cc", standardOptions direShell "nim cc -o", outputFile, standardOptions
runTask("checkMultiboot") runTask("checkMultiboot")
echo "Done." echo "Done."
@ -29,7 +29,7 @@ task "build-release", "Builds the operating system, release mode.":
runTask("clean") runTask("clean")
runTask("bootloader") runTask("bootloader")
echo "Compiling and linking (release mode)." echo "Compiling and linking (release mode)."
direShell "nim cc --skipCfg -d:release", standardOptions direShell "nim cc --skipCfg -d:release -o:", outputFile, standardOptions
runTask("checkMultiboot") runTask("checkMultiboot")
echo "Done." 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.": task "debug", "Runs the operating system using QEMU with debug build and flags.":
runTask("build") runTask("build")
echo "Running in Qemu." 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.": task "run", "Runs the operating system using QEMU.":
runTask("build-release") runTask("build-release")