@echo off
if "%1" == "m68k" goto m68k

:go32
echo Configuring opcodes for go32
set arch=i386
goto common

:m68k
echo Configuring opcodes for m68k
set arch=m68k
goto common

:common
rem This batch file assumes a unix-type "sed" program

echo # Makefile generated by "configure.bat"> Makefile

if exist config.sed del config.sed

echo "/\.o[ 	]*:/ s/config.status//			">> config.sed
echo "s/CC = cc/CC = gcc/				">> config.sed

echo "/^###$/ i\					">> config.sed
echo "BFD_MACHINES=%arch%-dis.o\			">> config.sed
echo "ARCHDEFS=-DARCH_%arch%				">> config.sed

echo "s/^[ 	]*rm/	-rm/				">> config.sed

sed -e "s/^\"//" -e "s/\"$//" -e "s/[ 	]*$//" config.sed > config2.sed
sed -f config2.sed Makefile.in >> Makefile
del config.sed
del config2.sed
