@echo off
echo Configuring GCC for m68k
rem This batch file assumes a unix-type "sed" program

if not exist config\m68k\configure.bat chdir ..\..

update config\i386\xm-dos.h config.h
update config\i386\xm-dos.h hconfig.h
update config\m68k\coff.h tconfig.h
update config\m68k\coff.h tm.h
update config\m68k\m68k.md md
update config\m68k\m68k.c aux-output.c

echo # Makefile generated by "configure.bat"> Makefile
echo all.dos: cccp cc1 cc1obj xgcc s-objlist >> Makefile
sed -f config/m68k/top.sed Makefile.in >> Makefile

set LANG=

if not exist cp\make-lang.in goto no_cp
sed -f config/m68k/top.sed cp\make-lang.in >> Makefile
sed -f config/m68k/top.sed cp\makefile.in > cp\Makefile
set LANG=%LANG% c++.&	
:no_cp

echo lang.mostlyclean: %LANG% | sed "s/&/mostlyclean/g" >> Makefile
echo lang.clean: %LANG% | sed "s/&/clean/g" >> Makefile
echo lang.distclean: %LANG% | sed "s/&/distclean/g" >> Makefile
echo lang.realclean: %LANG% | sed "s/&/realclean/g" >> Makefile

echo #define MULTILIB_SELECT ". ;" > multilib.h1
update multilib.h1 multilib.h
del multilib.h1
