Blob Blame Raw
#!/bin/bash

set -e

if [ ! -f "config.h" ]; then
  echo "copy config.h from example"
  cp config.h.example config.h
fi


FLAGS="$(pkg-config --cflags --libs x11 xft xtst)"
FLAGS="$FLAGS -Wall"
if [ "$1" = "debug" ]; then
  FLAGS="$FLAGS -g -O0"
else
  FLAGS="$FLAGS -O3 -DNDEBUG"
fi

echo cc main.c $FLAGS -o coolkbd
     cc main.c $FLAGS -o coolkbd

echo done