CC=ghc
CFLAGS=-O2 -Wall #-threaded -rtsopts
#-fllvm
#-fwarn-incomplete-patterns 
#-v

all: nfreq 

nfreq: 
	$(CC) $(CFLAGS) -o nfreq NFreq.hs 

#nclass:
	#$(CC) $(CFLAGS) -o nclass NClass.hs

doc:
	mkdir doc
	haddock -o doc --html --built-in-themes --theme=Ocean -t NFreq *.hs NgramTools/*.hs

test: all
	#clear
	#@echo "Testing NFreq Frequency Builder"
	#time (cat test_data/alice.txt test_data/prejudice.txt | ./nfreq -o outfile -C conf/english.conf ; head -c 100 outfile ) 
#	+RTS -N3 -sstderr > /dev/null )
	#@echo
	#@echo "Testing TriClass Frequency List Comparator"
	#./nclass -i test_data/alice.frq test_data/alice.frq test_data/prejudice.frq test_data/latin.frq test_data/french.frq test_data/italian.frq

clean:
	rm -rfv nclass nfreq
	rm -rfv *.o *.hi test_out.csv
	rm -rfv NgramTools/*.hi NgramTools/*.o


