Archived
3
0
This repository has been archived on 2024-06-18. You can view files and clone it, but cannot push or open issues or pull requests.
libipc-old/drop/build.sh

24 lines
459 B
Bash
Raw Normal View History

2019-07-27 15:48:10 +02:00
#!/bin/sh
nontapmsg() {
echo $*
}
if [ $# -eq 0 ] ; then
SRC="*.c"
else
SRC="$*"
fi
for i in $SRC
do
BIN=$(echo ${i} | sed "s/.c$/.bin/")
if [ ! -f ${BIN} ] || [ $(stat -c "%X" ${BIN}) -lt $(stat -c "%X" ${i}) ]
then
nontapmsg "compiling ${BIN}"
# gcc $BIN.c ./lib/*.o -o $BIN -I../src -I ./lib/ -L../ -L./lib/ -lipc -Wall -g -Wextra
gcc -Wall -g -Wextra "${i}" -o "${BIN}" -I../src -L../ ../src/ipc.h -lipc
touch "${BIN}"
fi
done