% compile
if isunix
	mex	-I./ ...
			-L./ -L/usr/local/lib ...
			-lgsl -lgslcblas -lm ...
			-v ...
			COPTIMFLAGS='-O2 -DNDEBUG' ...
			CFLAGS='$CFLAGS -pthread -fPIC' ....
			LDFLAGS='$LDFLAGS -fPIC -shared' ...
			bspl.c
elseif ispc
	mex	-I./ ...
			-L./ -LC:\Local\gsl\lib\ -IC:\Local\gsl\include\ ...
			-lgsl ...
			-v ...
			COPTIMFLAGS='-O2 -DNDEBUG' ...
			CFLAGS='$CFLAGS -pthread -fPIC' ....
			LDFLAGS='$LDFLAGS -fPIC -shared' ...
			bspl.c
end