> > I haven't used NHC so I can't guarantee this will work, but try doing
> > something like this:
> > 
> >     $ nhc98 -c RC4.hs
> >     $ nhc98 -c prng.hs
> >     $ nhc98 RC4.o prng.o -o prng
> 
> Yay! It does. And I just put it in a makefile:
> 
> ---<daniel's makefile>----
> COMPILER=nhc98
> RC4.o:
>          $(COMPILER) -c RC4.hs
> prng.o:
>          $(COMPILER) -c prng.hs
> prng: RC4.o  prng.o
>          $(COMPILER) RC4.o prng.o -o prng

I strongly recommend using 'hmake' (which is supplied with nhc98, but
also works with ghc) in preference to 'make'.  It tracks the
dependencies between haskell source files automatically (no Makefile),
so there is no chance for the dependencies to get out of sync with
reality..

Hmake was the inspiration for ghc's recently added '--make' option.
However, hmake is more flexible, because it automatically handles the
invocation of many common preprocessors, besides working with multiple
compilers.

Regards,
    Malcolm
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to