#!/bin/bash CC=clang INCLUDE="\ $(find src -type d | xargs -I{} echo -n "-I{} ") \ " SRC="\ $(find src -type f -name *.c | xargs -I{} echo -n "{} ") \ " CFLAGS="-O3 -shared -fPIC -Wall -Werror -pedantic" OUT="libwapp.so" (set -x ; $CC $CFLAGS $INCLUDE $SRC -o $OUT)