-mate: Mate.hs ffi/trap.c $(HS_FILES) $(HS_BOOT) ffi/native.o
- @mkdir -p build/release
- ghc --make $(GHC_OPT) Mate.hs ffi/trap.c -o $@ $(GHC_LD) -outputdir build/release
+GHCCALL = ghc --make $(GHC_OPT) Mate.hs ffi/trap.c -o $@ $(GHC_LD) -outputdir
+mate: Mate.hs ffi/trap.c $(HS_FILES) $(HS_BOOT) ffi/native.o $(CLASS_FILES)
+ @mkdir -p $(B_RELEASE)
+ $(GHCCALL) $(B_RELEASE) -dynamic
+
+mate.static: Mate.hs ffi/trap.c $(HS_FILES) $(HS_BOOT) ffi/native.o $(CLASS_FILES)
+ @mkdir -p $(B_STATIC)
+ $(GHCCALL) $(B_STATIC) -static