# This is the main makefile for the hsffig project.
# You may need to edit some of its parts for better results.

# The C compiler to use:

GCC = gcc

# The Haskell compiler to use:

GHC = ghc

# The path to the `alex' program:

ALEX = /previous/public/alex-2.0/bin/alex

# The `-g' option increases compile speed of the generated lexer
# dramatically, but makes the generated code GHC-specific.

ALEX_OPT = -g

# Haskell source files belonging to all utilities:

HSS = 	C_BNF.hs \
	C_Lexer.hs \
	ProcHdr.hs \
	TokenOps.hs

# Default target to build all three utilities:

all: hsffig testparser splitter

# No install target yet: just copy the three programs
# mentioned above anywhere your PATH leads to.

# Most likely you will not need to edit anything below this line.

C_Lexer.hs: C_Lexer.x
	$(ALEX) $(ALEX_OPT) C_Lexer.x

hsffig: hsffig.hs WriteHsc.hs SplitBounds.hs $(HSS)
	$(GHC) --make hsffig.hs -o hsffig -package text

testparser: testparser.hs $(HSS)
	$(GHC) --make testparser.hs -o testparser -package text

splitter: splitter.hs SplitBounds.hs
	$(GHC) --make splitter.hs -o splitter

clean:
	rm -f *.o *.hi C_Lexer.hs hsffig testparser splitter



