15 lines
431 B
Batchfile
15 lines
431 B
Batchfile
@echo off
|
|
|
|
SET BUILD_OPTS= -std=c11 -D_CRT_SECURE_NO_WARNINGS -I.
|
|
|
|
IF NOT EXIST build mkdir build
|
|
|
|
clang emulator/lib.c -o build/emulator.lib %BUILD_OPTS% -fuse-ld=llvm-lib
|
|
|
|
clang emulator/main.c build/emulator.lib -o build/emulator.exe %BUILD_OPTS%
|
|
|
|
clang emulator/hart_test.c build/emulator.lib -o build/hart_test.exe %BUILD_OPTS%
|
|
|
|
clang --target=riscv32 -march=rv32i -e _main -nostdlib main.asm -o build/main.bin
|
|
|