# **********************************************************
# Makefile for SRC Binary Directory
# **********************************************************
SHELL = /bin/sh

rfilter1: rfilter1.c scripts
	gcc -o rfilter1 rfilter1.c

scripts:
	sed -e 's:^EXE_DIR=.*:EXE_DIR='`pwd`':' < csrfilt. > csrfilt.sh ;
	sed -e 's:EXE_DIR=.*:EXE_DIR="'`pwd`'";:' < ut_rfilt. > ut_rfilt.pl
	chmod +x csrfilt.sh ut_rfilt.pl acomp.pl add_kana.pl chfilt.pl def_art.pl text2lex.pl;
	
test:
	echo "If no output is produced by diff, the test passes"
	csrfilt.sh -dh example.glm example.utm < test.in | diff - test.out
	csrfilt.sh -i ctm -dh example.glm example.utm < test_ctm.in | diff - test_ctm.out

clean:
	rm -f csrfilt.sh ut_rfilt.pl rfilter1
