packages feed

scc-0.5: Makefile

Executables=test test-prof test-coroutine test-parallel shsh shsh-prof
LibraryFiles=$(addprefix Control/Concurrent/SCC/, \
               Streams.hs Types.hs Primitives.hs Combinators.hs Components.hs XML.hs) \
               Control/Monad/Parallel.hs Control/Monad/Coroutine.hs \
               Control/Monad/Coroutine/SuspensionFunctors.hs Control/Monad/Coroutine/Nested.hs \
	            Control/Concurrent/Configuration.hs
DocumentationFiles=$(LibraryFiles)
OptimizingOptions=-O -threaded -hidir obj -odir obj
ProfilingOptions=-prof -auto-all -hidir prof -odir prof

all: $(Executables) doc/index.html

docs: doc/index.html

test: Test.hs $(LibraryFiles) | obj
	ghc --make $< -o $@ $(OptimizingOptions)

test-prof: Test.hs $(LibraryFiles) | prof
	ghc --make $< -o $@ $(ProfilingOptions)

test-coroutine: TestCoroutine.hs Control/Monad/Coroutine.hs Control/Monad/Coroutine/*.hs | obj
	ghc --make $< -o $@ $(OptimizingOptions)

test-parallel: TestParallel.hs Control/Monad/Parallel.hs | obj
	ghc --make $< -o $@ $(OptimizingOptions)

shsh: Shell.hs $(LibraryFiles) | obj
	ghc --make $< -o $@ $(OptimizingOptions)

shsh-prof: Shell.hs $(LibraryFiles) | prof
	ghc --make $< -o $@ $(ProfilingOptions)

doc/index.html: $(DocumentationFiles)
	haddock -v -h -o doc \
	   -i http://www.haskell.org/ghc/docs/latest/html/libraries/base,/usr/share/doc/ghc/libraries/base/base.haddock \
	   $^

obj prof:
	mkdir -p $@

clean:
	rm -r obj/* prof/* doc/* dist/* $(Executables)