#! /bin/sh
src=$1;
shift;
K=$src/kernel
knone=$K/none
EXTRA="divll_pre"
for file in "$@"; do
  echo "#ifndef ASMINLINE"
  for i in `grep '^ASM' $file`; do
    case $i in
      ASM);;
      *) cat $knone/$i.h;;
    esac;
  done
  echo "#endif"
  cat $file
  for i in `grep '^NOASM' $file` $EXTRA; do
    case $i in
      NOASM);;
      *) cat $knone/$i.h;;
    esac;
  done
done
exit 0
