TARGET = generate_cmpl
HS = Lexer.hs Parser.hs ParseTree.hs Main.hs Complement.hs # Eval.hs Updatability.hs

WARNOPT=-fwarn-deprecations 
PROFOPT=-prof -auto-all 
OPTGHC=$(WARNOPT) -O #$(PROFOPT)
#OPTGHC= 
#OPTGHC=-O -fvia-c -optl-mno-cygwin -optc-O2 -optc-mno-cygwin -optc-fomit-frame-pointers
all : $(HS) 
	ghc $(OPTGHC) -o $(TARGET) --make Main.hs 
#	ghc $(OPTGHC) -prof -auto-all -o $(TARGET) --make Main.hs

Lexer.hs : Lexer.x
	alex -g Lexer.x

Parser.hs : Parser.y
	happy -gca -ipout.txt Parser.y

clean :
	rm -f *~
	rm -f *.o
	rm -f *.hi
	rm -f Parser.hs
	rm -f Lexer.hs
	rm -f $(TARGET)
	rm -f $(TARGET).exe

