diff --git a/build_util.sh b/build_util.sh
new file mode 100644
--- /dev/null
+++ b/build_util.sh
@@ -0,0 +1,16 @@
+HASKELL_PACKAGES="process filepath directory containers transformers bytestring cryptonite"
+for p in ${HASKELL_PACKAGES}; do
+    GHC_PACKAGES="-package $p ${GHC_PACKAGES}"
+done
+
+function filter_comments () {
+    grep -ve "^#"
+}
+
+function extract_object_deps () {
+    grep -E "^${1}\\.o" | cut -d ':' -f2 | tr -d ' '
+}
+
+function extract_exec_deps () {
+    grep -E -e "^[^\.]*.o " | cut -d ':' -f1 | tr -d ' ' | sort -u
+}
diff --git a/default.o.do b/default.o.do
new file mode 100644
--- /dev/null
+++ b/default.o.do
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+# build a default .o file from haskell source
+
+set -e
+
+BASENAME=$2
+
+gdo --if Created environment
+gdo --if Changed $2.hs
+gdo --if Changed build_util.sh
+
+source ./build_util.sh
+
+if [ -e environment ]; then
+    source ./environment
+fi
+
+TEMPMAKEFILE=$(mktemp)
+
+trap "rm ${TEMPMAKEFILE} -rf" EXIT SIGTERM SIGINT
+
+${HC} $2.hs -M -dep-suffix '' -dep-makefile ${TEMPMAKEFILE}
+DEPS=$(cat ${TEMPMAKEFILE} | filter_comments | extract_object_deps $2)
+set +e
+OBJECTS=$(echo ${DEPS} | grep -E "\.o")
+set -e
+gdo --if Changed ${DEPS}
+${HC} -fforce-recomp -c $2.hs -o $3
+
diff --git a/gdo.cabal b/gdo.cabal
--- a/gdo.cabal
+++ b/gdo.cabal
@@ -2,7 +2,7 @@
 -- see http://haskell.org/cabal/users-guide/
 
 name:                gdo
-version:             0.1.3
+version:             0.1.4
 synopsis:            recursive atomic build system
 description:
   *gdo* is a build system similar to **GNU Make**. It builds files from
@@ -20,15 +20,17 @@
                    , README.org
                    , Setup.hs
                    , all.do
+                   , build_util.sh
                    , clean.do
                    , default.nix.do
-                   , shell.nix.do
+                   , default.o.do
+                   , examples/defaults/default.o.do
+                   , examples/test.c
+                   , examples/test.do
                    , gdo.cabal
                    , gdo.do
                    , man/gdo.1.do
-                   , examples/test.c
-                   , examples/test.do
-                   , examples/defaults/default.o.do
+                   , shell.nix.do
 
 cabal-version:       >=1.10
 
