#!/bin/sh

#DCTOBJS="RTdct_std RTidct_std"
DCTOBJS="RTdct_aan RTidct_aan"

#YUVOBJS="RTcolor_std"
#YUVOBJS="RTcolor_tbl"
#YUVOBJS="RTcolor_tbl2"
YUVOBJS="RTcolor_int"
#YUVOBJS="RTcolor_grey"

QOBJS="RTquant"
#QOBJS="RTquant_mmx"

BOBJS="RTb2s RTs2b"
#BOBJS="RTb2s_raw RTs2b_raw"

OBJS="RTinc ${BOBJS} ${QOBJS} ${YUVOBJS} ${DCTOBJS} RTmain"

echo "/* Autogenerated by compose.sh */" > RTjpeg.c
echo "#include \"RTjpeg.h\"" >> RTjpeg.c
echo "" >> RTjpeg.c

echo "****    Init files    ****"

for i in ${OBJS}; do
 if [ -f modules/${i}.ct ]; then
  echo ${i}.ct
  cat modules/$i.ct >> RTjpeg.c
 fi
done

echo "****    Code files    ****"

for i in ${OBJS}; do
 if [ -f modules/${i}.c ]; then
  echo ${i}.c
  cat modules/$i.c >> RTjpeg.c
 fi
done

