Index: Makefile
--- Makefile.orig	2009-08-29 01:17:16 +0200
+++ Makefile	2009-08-30 09:55:26 +0200
@@ -11,7 +11,7 @@
 #    to compile code-generator programs as part of the build process.
 #    See TCC below for the C compiler for building the finished binary.
 #
-BCC = gcc -g -O2
+BCC = $(CC)
 
 #### The suffix to add to executable files.  ".exe" for windows.
 #    Nothing for unix.
@@ -26,7 +26,7 @@
 #
 #TCC = gcc -O6
 #TCC = gcc -g -O0 -Wall -fprofile-arcs -ftest-coverage
-TCC = gcc -g -Os -Wall
+TCC = $(CC)
 
 #### Extra arguments for linking the finished binary.  Fossil needs
 #    to link against the Z-Lib compression library.  There are no
@@ -34,7 +34,8 @@
 #    so that we can build a static executable that will run in a
 #    chroot jail.
 #
-LIB = -lz $(LDFLAGS)
+LIBS = -lz
+LIB = $(LDFLAGS) $(LIBS)
 # If you're on OpenSolaris:
 # LIB += lsocket
 # Solaris 10 needs:
