#!/bin/tcsh

find `pwd` -type f -name "Makefile" -print > `pwd`/MakefileList

foreach i ( `cat ./MakefileList` )
	echo "Processing $i ..."
	sed -e 's#-xtarget=native#-xarch=sse2 -xchip=pentium4#g' $i > /tmp/k
	mv -f /tmp/k $i
	sed -e 's#-xarch=sse2#-xtarget=pentium4 -xarch=sse2 -xchip=pentium4#g' $i > /tmp/k
	mv -f /tmp/k $i
	sed -e 's#-fast##g' $i > /tmp/k
	mv -f /tmp/k $i
end

