# A copy of this script is used in the "Build SCR Shim" build phase in Xcode.

if [ $COPY_SCR_SHIM ]
then
	echo "Building SCR shim"
	
	SHIM_DIR="$SRCROOT/deps/Cocoa-deps/SCRDynamicShim/"
	BIN_DIR="$SHIM_DIR/bin"
	if [ ! -e "$BIN_DIR" ]
	then
		mkdir "$BIN_DIR"
	fi
	
	/usr/bin/gcc -o "$BIN_DIR/SCRDynamicShim.dylib" -L/Developer/SDKs/MacOSX10.4u.sdk/usr/lib/gcc/darwin/default "$SHIM_DIR/../Smart Crash Reports SDK/SmartCrashReportsInstall.o" -exported_symbols_list "$SHIM_DIR/ExportList.txt" -framework Carbon -framework Security -lz -arch ppc -Wl,-single_module -compatibility_version 1 -current_version 1 -install_name /usr/local/lib/SCRDynamicShim.dylib -Wl,-Y,1455 -dynamiclib -mmacosx-version-min=10.4 -Wl,-syslibroot,/Developer/SDKs/MacOSX10.4u.sdk
fi
