From b4c43daaea072ec4e80efd8ade4dcdd222cf0e5b Mon Sep 17 00:00:00 2001 From: Alexander Popov Date: Sun, 30 Jul 2023 13:50:44 +0300 Subject: [PATCH] add script for build via tcc --- ~/C/libserialport/{build => build_gcc} | 0 ~/C/libserialport/build_tcc | 20 ++++++++++++++++++++ 2 files changed, 20 insertions(+) rename ~/C/libserialport/{build => build_gcc} (100%) create mode 100755 ~/C/libserialport/build_tcc diff --git a/~/C/libserialport/build b/~/C/libserialport/build_gcc similarity index 100% rename from ~/C/libserialport/build rename to ~/C/libserialport/build_gcc diff --git a/~/C/libserialport/build_tcc b/~/C/libserialport/build_tcc new file mode 100755 index 0000000..27b7ec1 --- /dev/null +++ b/~/C/libserialport/build_tcc @@ -0,0 +1,20 @@ +#!/bin/sh +# +# build - script for build all files. +# +# Alexander Popov + +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