@echo off
if "%1" == "h8/300" goto h8300
if "%1" == "m68k" goto m68k

:go32
echo Configuring bfd for go32
update hosts\go32.h sysdep.h
update Makefile.dos Makefile
echo s/@WORDSIZE@/32/g>config.sed
sed -e s/^/s\/@VERSION@\// -e s/$/\/g/g version >>config.sed
sed -f config.sed < bfd-in2.h > bfd.h2
update bfd.h2 bfd.h
goto exit

:m68k
echo Configuring bfd for m68k
update hosts\go32.h sysdep.h
echo s/,.i386aout_vec//>config.sed
echo /i386aout.o/d>>config.sed
echo s/i386/m68k/g>>config.sed
echo s/go32/m68k/g>>config.sed
sed -f config.sed < Makefile.dos > Makefile
echo s/@WORDSIZE@/32/g>config.sed
sed -e s/^/s\/@VERSION@\// -e s/$/\/g/g version >>config.sed
sed -f config.sed < bfd-in2.h > bfd.h2
update bfd.h2 bfd.h
goto exit

:h8300
echo Configuring bfd for H8/300
update hosts\h-go32.h sysdep.h
update Makefile.dos Makefile

:exit
