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

OPTGHC=-O -fvia-c
#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 Lexer.x

Parser.hs : Parser.y
	happy -gca 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

