更新构建脚本
This commit is contained in:
parent
fcecb41165
commit
fb7818c44f
23
build.py
23
build.py
@ -1,19 +1,6 @@
|
|||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
def check_os():
|
|
||||||
if sys.platform.startswith('darwin'):
|
|
||||||
return "Mac OS X"
|
|
||||||
elif sys.platform.startswith('win'):
|
|
||||||
return "Windows"
|
|
||||||
elif sys.platform.startswith('linux'):
|
|
||||||
return "Linux"
|
|
||||||
else:
|
|
||||||
return "Unknown"
|
|
||||||
|
|
||||||
|
|
||||||
if check_os() == "Windows":
|
|
||||||
gcc = '/i686_elf_tools/bin/i686-elf-gcc.exe -w -std=gnu99 -I include/ -std=gnu99 -ffreestanding -c -Wincompatible-pointer-types '
|
gcc = '/i686_elf_tools/bin/i686-elf-gcc.exe -w -std=gnu99 -I include/ -std=gnu99 -ffreestanding -c -Wincompatible-pointer-types '
|
||||||
asm = '/i686_elf_tools/bin/i686-elf-as.exe'
|
asm = '/i686_elf_tools/bin/i686-elf-as.exe'
|
||||||
nasm = "nasm -f elf32"
|
nasm = "nasm -f elf32"
|
||||||
@ -22,16 +9,6 @@ if check_os() == "Windows":
|
|||||||
out = "target"
|
out = "target"
|
||||||
dir_ = "\\"
|
dir_ = "\\"
|
||||||
src = "src\\"
|
src = "src\\"
|
||||||
elif check_os() == "Linux":
|
|
||||||
gcc = 'gcc.exe -w -std=gnu99 -I include/ -std=gnu99 -ffreestanding -c -Wincompatible-pointer-types '
|
|
||||||
asm = 'gcc.exe'
|
|
||||||
nasm = "nasm -f elf32"
|
|
||||||
ld = 'g++.exe'
|
|
||||||
cd = os.getcwd() # 获取当前执行目录 '\mnt\d\CrashPowerDOS-main\'
|
|
||||||
out = "target"
|
|
||||||
dir_ = "/"
|
|
||||||
src = "./src/"
|
|
||||||
|
|
||||||
|
|
||||||
def clean():
|
def clean():
|
||||||
print("Clean target folder")
|
print("Clean target folder")
|
||||||
|
Loading…
Reference in New Issue
Block a user