I had the same problem regarding osx builds being broken.
The current logic to set up SDK env var is frail and won't work for someone who has only 10.7+ SDKs. I simply had to add this:
but a better logic would be to test which is the latest SDK installed checking for $(SDKDIR)/MacOSX10.x.sdk, x=5..8
ifeq (OSX,$(TARGET))
SDKDIR=/Developer/SDKs
ifeq "$(wildcard $(SDKDIR) )" ""
SDKDIR=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
endif
ENVP= MACOSX_DEPLOYMENT_TARGET=10.3
#SDK=$(SDKDIR)/MacOSX10.4u.sdk #doesn't work because can't find <stdarg.h>
#SDK=$(SDKDIR)/MacOSX10.5.sdk
#SDK=$(SDKDIR)/MacOSX10.6.sdk
# SDK:=$(if $(filter 11.%, $(OSVER)), $(SDKDIR)/MacOSX10.6.sdk, $(SDKDIR)/MacOSX10.5.sdk)
# SDK:=$(if $(filter 11.%, $(OSVER)), $(SDKDIR)/MacOSX10.7.sdk, $(SDKDIR)/MacOSX10.5.sdk)
################## changed that
SDK=$(SDKDIR)/MacOSX10.7.sdk
TARGET_CFLAGS=-isysroot ${SDK}
#-syslibroot is only passed to libtool, not ld.
#if gcc sees -isysroot it should pass -syslibroot to the linker when needed
#LDFLAGS=-lstdc++ -isysroot ${SDK} -Wl,-syslibroot,${SDK} -framework CoreServices
LDFLAGS=-lstdc++ -isysroot ${SDK} -Wl -framework CoreServices
else
LDFLAGS=-lm -lstdc++ -lpthread
endif