# makedep
#
# This shell script creates a dependency file necessary for some compilers
# on the Win32 platform.

echo "\
# This dependency file to be used with various Win32 compilers
# has been generated automatically with the script \`makedep' on
# `date +%d-%b-%Y`.
" > depend.win

(cd ../..
 gcc -MM -Iarch/win32 -I. *.c | \
   sed -e "s/\.o:/.obj:/" -e "s:/:\\\\:g") >> depend.win

(cd ../..
 gcc -MM -Iarch/win32 -I. -Iextend extend/*.c | \
   sed -e "s/^\(.*\)\.o:/extend\\\\\1.obj:/" -e "s:/:\\\\:g") >> depend.win

echo "!ifndef __MAKE__" >> depend.win

(cd ../..
 gcc -MM -Iarch/win32 -I. -Iextend arch/win32/*.c | \
   sed -e "s/^\(.*\)\.o:/arch\\\\win32\\\\\1.obj:/" \
       -e "s:/:\\\\:g") >> depend.win

echo "!endif" >> depend.win

# eof
