diff -Naur nailgun-0.7.1/Makefile nailgun-0.7.1_patches/Makefile
--- nailgun-0.7.1/Makefile	2004-11-25 11:00:22.000000000 +1300
+++ nailgun-0.7.1_patches/Makefile	2012-04-19 07:22:16.000000000 +1200
@@ -5,13 +5,11 @@
 #
 # Marty Lamb
 
-CC=gcc
 WIN32_CC=/usr/local/mingw32/bin/mingw32-gcc
-CFLAGS=-Wall -pedantic -s -O3
 
 ng: src/c/ng.c
 	@echo "Building ng client.  To build a Windows binary, type 'make ng.exe'"
-	${CC} ${CFLAGS} -o ng src/c/ng.c
+	$(CC) $(CFLAGS) $(LDFLAGS) -o ng src/c/ng.c
 
 ng.exe: src/c/ng.c
 	# any idea why the command line is so sensitive to the order of
