This commit is contained in:
parent
5b097e7feb
commit
875693f977
Binary file not shown.
Binary file not shown.
|
@ -5,17 +5,18 @@ input_dir="sy"
|
||||||
output_dir="build"
|
output_dir="build"
|
||||||
lib_dir="lib"
|
lib_dir="lib"
|
||||||
|
|
||||||
|
CC=riscv64-suse-linux-gcc
|
||||||
|
|
||||||
rm -rf build
|
rm -rf build
|
||||||
|
|
||||||
# 确保输出目录存在
|
# 确保输出目录存在
|
||||||
mkdir -p "$output_dir"
|
mkdir -p "$output_dir"
|
||||||
|
|
||||||
rm ./lib/sylib.o
|
rm -f ./lib/sylib.o
|
||||||
clang -fPIC -c ./lib/sylib.c -o ./lib/sylib.o
|
rm -f ./lib/libsysy.so
|
||||||
# gcc -c ./lib/sylib.c -o ./lib/sylib.o
|
|
||||||
rm ./lib/libsylib.so
|
${CC} -fPIC -c ./lib/sylib.c -o ./lib/sylib.o
|
||||||
clang -shared ./lib/sylib.o -o ./lib/libsylib.so
|
${CC} -shared ./lib/sylib.o -o ./lib/libsysy.so
|
||||||
# ar rcs ./lib/libsy.a ./lib/sylib.o
|
|
||||||
|
|
||||||
# 遍历sy目录下的所有文件
|
# 遍历sy目录下的所有文件
|
||||||
for file in "$input_dir"/*.c; do
|
for file in "$input_dir"/*.c; do
|
||||||
|
|
Loading…
Reference in New Issue