Executables=test test-prof shsh shsh-prof LibraryFiles=$(addprefix Control/Concurrent/SCC/, \ Streams.hs Types.hs Primitives.hs Combinators.hs Components.hs XML.hs) \ Control/Concurrent/Coroutine.hs Control/Concurrent/Configuration.hs DocumentationFiles=$(LibraryFiles) OptimizingOptions=-O2 -threaded -hidir obj -odir obj ProfilingOptions=-prof -auto-all -hidir prof -odir prof all: $(Executables) doc/index.html docs: doc/index.html test: $(LibraryFiles) Test.hs | obj ghc --make Test.hs -o test $(OptimizingOptions) test-prof: $(LibraryFiles) Test.hs | prof ghc --make Test.hs -o test-prof $(ProfilingOptions) shsh: $(LibraryFiles) Shell.hs | obj ghc --make Shell.hs -o shsh $(OptimizingOptions) shsh-prof: $(LibraryFiles) Shell.hs | prof ghc --make Shell.hs -o shsh-prof $(ProfilingOptions) doc/index.html: $(DocumentationFiles) haddock -h -o doc $^ obj prof: mkdir -p $@ clean: rm -r obj/* prof/* doc/* $(Executables)