Here is one of my makefiles you can look at. It works on my W2K machine with cygwin and ghc 4.05.
BASE=/ghc/ghc-4.05
IMPORTS=${BASE}/lib/imports
IMP=${IMPORTS}/misc:${IMPORTS}/exts
LIB=${BASE}/lib
EXTRA_HC_OPTS=-L${LIB} -lHSmisc -lHSexts -i${IMP}
HC = ghc
HC_OPTS = -cpp $(EXTRA_HC_OPTS)
SRCS = Main.hs ClassOne.hs ClassTwo.hs ClassThree.hs
OBJS = Main.o ClassOne.o ClassTwo.o ClassThree.o
Main : $(OBJS)
rm -f $@
$(HC) -o $@ $(HC_OPTS) $(OBJS)
%.hi : %.o
@:
%.o : %.lhs
$(HC) -c $< $(HC_OPTS)
%.o : %.hs
$(HC) -c $< $(HC_OPTS)
depend :
mkdependHS -- $(HC_OPTS) -- $(SRCS)
# DO NOT DELETE: Beginning of Haskell dependencies
Main.o : Main.hs
Main.o : ./ClassOne.hi
ClassOne.o : ClassOne.hs
ClassTwo.o : ClassTwo.hs
ClassThree.o : ClassThree.hs
# DO NOT DELETE: End of Haskell dependencies