# There's onlt one '$' in the awk script, but we have to double-money
# it for make.
-PN := $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
-BIN := dist/build/$(PN)/$(PN)
+PN = $(shell grep 'name:' *.cabal | awk '{ print $$2 }')
+BIN = dist/build/$(PN)/$(PN)
+SRCS = $(shell find src/ -name '*.hs')
-$(BIN): src/*.hs
+$(BIN): $(SRCS)
runghc Setup.hs clean
runghc Setup.hs configure --user --flags=${FLAGS}
runghc Setup.hs build