#!/usr/bin/env zsh
# Build commonly-used SubX programs.

if [[ $1 == 'ex'* ]]
then
  CFLAGS=-g ./subx translate examples/$1.subx -o examples/`echo $1 |sed 's/\..*//'`
  exit $?
fi

CFLAGS=-g ./subx translate *.subx apps/$1.subx  -o apps/`echo $1 |sed 's/\..*//'`
exit $?
