Removed m68k compatibility hack.
[AROS.git] / scripts / mkdep
blob1c6d1501541e09918150c8c2f4f8975d6a8f9ffa
1 #!/bin/sh
3 while [ $# != 0 ]; do
4 case "$1" in
5 -o)
6 dest="$2"
7 shift
8 ;;
9 -o*)
10 dest="`echo $1 | cut -c3-`"
12 -g|-Wall|-O*)
14 -D|-I)
15 args="$args '$1' '$2'"
16 shift
18 *.c)
19 files="$files '$1'"
21 *.cc)
22 files="$files '$1'"
24 *.m)
25 files="$files '$1'"
28 args="$args '$1'"
30 esac
31 shift
32 done
34 if [ "x$files" = x ]; then
35 exit 0
38 if [ "x$dest" = x ]; then
39 echo "$0: Error: -o missing"
40 exit 1
43 if [ "x$AROS_CC" = x ]; then
44 echo "$0: Error: AROS_CC not defined"
45 exit 1
48 CMD="$AROS_CC -M $args $files | sed 's#^.*\.o:#`dirname $dest`/&#'"
49 #echo $CMD
51 eval $CMD > $dest