Ура, первый раз собралося =))))
This commit is contained in:
parent
b66c3f5be1
commit
af9ce6d072
|
@ -155,14 +155,19 @@ done
|
|||
echo >> Makefile
|
||||
echo >> Makefile
|
||||
|
||||
echo '$(TARGET): $(target_objs)' >> Makefile
|
||||
echo -e '\t$(CC) $(LDFLAGS) -o $@ $(target_objs)' >> Makefile
|
||||
echo >> Makefile
|
||||
echo >> Makefile
|
||||
|
||||
# ======= Object's rules =======
|
||||
for i in `seq 0 $((nfiles-1))`; do
|
||||
extension=`basename ${flist[$i]} | sed 's~.*\.~~g'`
|
||||
f=`echo ${flist[$i]} | sed "s~.$extension$~~"`
|
||||
[[ "$extension" != c && "$extension" != cpp
|
||||
&& "$extension" != cxx && "$extension" != cc ]] && continue
|
||||
echo "`basename $f.o:` \\" >> Makefile
|
||||
echo -ne "\t${fpath[$i]}" >> Makefile
|
||||
echo -n `basename $f.o:` >> Makefile
|
||||
#echo -ne "\t${fpath[$i]}" >> Makefile
|
||||
|
||||
dep_lst=${fdeplist[$i]}
|
||||
_dep_lst=
|
||||
|
@ -170,9 +175,9 @@ for i in `seq 0 $((nfiles-1))`; do
|
|||
_dep_lst="$dep_lst"
|
||||
|
||||
for fl in $_dep_lst; do
|
||||
for i in `seq 0 $((nfiles-1))`; do
|
||||
if [ "$fl" == "${flist[$i]}" ]; then
|
||||
dep_lst="$dep_lst ${fdeplist[$i]}"
|
||||
for j in `seq 0 $((nfiles-1))`; do
|
||||
if [ "$fl" == "${flist[$j]}" ]; then
|
||||
dep_lst="$dep_lst ${fdeplist[$j]}"
|
||||
fi
|
||||
done
|
||||
done
|
||||
|
@ -180,12 +185,31 @@ for i in `seq 0 $((nfiles-1))`; do
|
|||
dep_lst=`echo $dep_lst | sed 's~ ~\n~g' | sort -u`
|
||||
done
|
||||
|
||||
dep_lst="${flist[$i]} $dep_lst"
|
||||
|
||||
for fl in $dep_lst; do
|
||||
for j in `seq 0 $((nfiles-1))`; do
|
||||
if [ "${flist[$j]}" == "$fl" ]; then
|
||||
echo ' \' >> Makefile
|
||||
echo -ne "\t" >> Makefile
|
||||
echo -ne "${fpath[$j]}" | sed "s~^${HOME}~\$\(HOME\)~g ; s~/*$~~g" >> Makefile
|
||||
fname=${fpath[$j]}
|
||||
k=`echo $REP_INCLUDE | sed 's~ ~\n~g' | wc -l`
|
||||
REVERT_REP_INCLUDE=`echo "$REP_INCLUDE" | sed "s~ ~\n~g" | sort -ur`
|
||||
echo "==================="
|
||||
echo k=$k
|
||||
echo "REVERT_REP_INCLUDE=$REVERT_REP_INCLUDE"
|
||||
echo "==================="
|
||||
for d in $REVERT_REP_INCLUDE ; do
|
||||
echo "==================="
|
||||
echo "fname=$_fname ; d=$d ; INCLUDE$k"
|
||||
_fname=`echo ${fpath[$j]} | sed "s~^$d~\$\(INCLUDE$k\)~" `
|
||||
[ "$_fname" != "${fpath[$j]}" ] && fname=$_fname
|
||||
echo "fname=$_fname ; d=$d ; INCLUDE$k"
|
||||
echo "==================="
|
||||
let k--
|
||||
done
|
||||
|
||||
echo -n "$fname" >> Makefile
|
||||
#echo -ne "\t${fpath[$j]}" >> Makefile
|
||||
break
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue