#!/bin/sh
export MACOSX_DEPLOYMENT_TARGET=10.3
ver=2.3
if [ $1 == -p ]; then
	ver=$2
	shift 2
fi
base=$1
gcc -g -c -fno-strict-aliasing -Wno-long-double -no-cpp-precomp \
	-mno-fused-madd -fno-common -dynamic -Wno-long-long \
	-Wno-unused-function \
	-I/Library/Frameworks/Python.framework/Versions/$ver/Headers \
	$base.c
gcc -Wl,-F.,-w -bundle -undefined dynamic_lookup \
	$base.o -o $base.so
