# makedep
#
# This shell script creates a dependency file necessary for older compilers
# on the Windows 16-bit platform.

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

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

(cd ../..
 gcc -MM -Iarch/win16 -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/win16 -I. -Iextend -DTT_HUGE_PTR \
     arch/win16/*.c | \
   sed -e "s/^\(.*\)\.o:/arch\\\\win16\\\\\1.obj:/" \
       -e "s:/:\\\\:g") >> depend.win

echo "!endif" >> depend.win

# eof
