Created
September 1, 2018 06:22
-
-
Save v-i-s-h/386aae25d965c20623d2ca120421a8b8 to your computer and use it in GitHub Desktop.
Shell script to build programs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Shell script to build programs | |
CFLAGS=`pkg-config --cflags libzmq` | |
LIBS=`pkg-config --libs libzmq` | |
# If no input, build all | |
if [ -z "$1" ] | |
then | |
for file in *.c | |
do | |
gcc $file -o ./out/${file%.c} $CFLAGS $LIBS | |
done | |
else | |
gcc $1 -o ./out/${1%.c} $CFLAGS $LIBS | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment