#!/bin/sh

if [ -z "$1" ]; then
    echo "Usage: $0 foo" >&2
    echo "  compiles  map_foo.c" >&2
    echo "  into      taralli_foo" >&2
    exit 1
fi

set -xe

cc -O2 -Wall -std=c99 -pedantic -o taralli_$1 main.c map_$1.c -lX11 -lXi

#!/bin/sh

if [ -z "$1" ]; then
    cat >&2 <<EOF
Usage: $0 foo
  compiles  map_foo.c
  into      taralli_foo

\$CC overrides the choice of C compiler.
EOF
    exit 1
fi

set -xe

${CC:-cc} -O2 -Wall -std=c99 -pedantic -o taralli_$1 main.c map_$1.c -lX11 -lXi

Allow the user to choose the C compiler with $CC
Allow the user to choose the C compiler with $CC
