Updated build.sh

This commit is contained in:
Your Name 2024-06-07 15:01:35 +03:00
parent 4fdee929ee
commit e71fa14b98
2 changed files with 17 additions and 1 deletions

View File

@ -1,7 +1,24 @@
#!/bin/sh
CC=cc
FLAGS="-Os -s -pedantic -Wall -Wextra"
#Test
echo -e "#include <stdio.h>\nint main(void){return 0;}" > file.c
cc file.c -o test
rm file.c
if ! ./test
then
rm test
echo "Install libc-headers and C compiler (ep: tcc, clang, gcc)"
exit 1
fi
rm test
#Compile
$CC -Iinclude -I. src/main.c -c -o main.o &&
$CC -Iinclude -I. src/fetch.c -c -o fetch.o &&
$CC $FLAGS main.o fetch.o -o kfetch &&

View File

@ -123,4 +123,3 @@ char *Unknow[] = {
};
#endif