From 828cb3410627a6f5e04f330583658a88f296163e Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Mon, 1 May 2006 03:24:32 +0000 Subject: [PATCH] Added support for C++ and assembly files, and source in subdirectories --- gcc-fat.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gcc-fat.sh b/gcc-fat.sh index bcfeb375..44d37ffd 100755 --- a/gcc-fat.sh +++ b/gcc-fat.sh @@ -45,7 +45,7 @@ while test x$1 != x; do compile=no; link=no;; -c) link=no;; -o) output=$2;; - *.c) source=$1;; + *.c|*.cc|*.cpp|*.S) source=$1;; esac shift done @@ -57,7 +57,7 @@ if test x"$output" = x; then if test x$link = xyes; then output=a.out elif test x$compile = xyes; then - output=`basename $source .c`.o + output=`echo $source | sed -e 's|.*/||' -e 's|\(.*\)\.[^\.]*|\1|'`.o fi fi