Updated build.sh
This commit is contained in:
parent
4fdee929ee
commit
e71fa14b98
17
build.sh
17
build.sh
@ -1,7 +1,24 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
CC=cc
|
CC=cc
|
||||||
FLAGS="-Os -s -pedantic -Wall -Wextra"
|
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/main.c -c -o main.o &&
|
||||||
$CC -Iinclude -I. src/fetch.c -c -o fetch.o &&
|
$CC -Iinclude -I. src/fetch.c -c -o fetch.o &&
|
||||||
$CC $FLAGS main.o fetch.o -o kfetch &&
|
$CC $FLAGS main.o fetch.o -o kfetch &&
|
||||||
|
@ -123,4 +123,3 @@ char *Unknow[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user