add script for build via tcc

This commit is contained in:
Alexander Popov 2023-07-30 13:50:44 +03:00
parent 3ff907994a
commit b4c43daaea
Signed by: iiiypuk
GPG Key ID: E47FE0AB36CD5ED6
2 changed files with 20 additions and 0 deletions

20
~/C/libserialport/build_tcc Executable file
View File

@ -0,0 +1,20 @@
#!/bin/sh
#
# build - script for build all files.
#
# Alexander Popov <iiiypuk@fastmail.fm>
export C_INCLUDE_PATH=$HOME/Git/libserialport
export LIBRARY_PATH=$HOME/Git/libserialport/.libs
for file in \
port_info.c \
list_ports.c \
send_receive.c \
listen.c \
do
echo -ne "[ ] Building $file...\r"
tcc -Wall -O3 -o ${file%.*} -I$C_INCLUDE_PATH $file $LIBRARY_PATH/libserialport.a
echo [OK
done