# HG changeset patch # User jwe # Date 866834856 0 # Node ID 2688b68dd9c1f1b84c6e61f3cf8eb0c48e9587a5 # Parent a35711deb8a57af30fcb82476973502fb60a1809 [project @ 1997-06-20 19:27:36 by jwe] diff -r a35711deb8a5 -r 2688b68dd9c1 mkoctfile.in --- a/mkoctfile.in Tue Jun 17 01:59:51 1997 +0000 +++ b/mkoctfile.in Fri Jun 20 19:27:36 1997 +0000 @@ -46,7 +46,7 @@ octfile= ldflags= dbg=: -strip= +strip=false if [ $# -eq 0 ]; then echo $usage_msg @@ -72,7 +72,7 @@ file=$1 objfiles="$objfiles $file" ;; - -d | --debug) + -d | --debug | -v | --verbose) dbg=echo ;; -h | -? | --help) @@ -82,9 +82,10 @@ Options: -h, -? --help Print this message. - -v, --verbose Echo commands as they are executed. + -lLIB Add library LIB to link command. -o FILE, --output FILE Output file name. Default extension is .oct. - -lLIB Add library LIB to link command. + -s, --strip Strip output file. + -v, --verbose Echo commands as they are executed. FILE Compile or link FILE. Recognized file types are: @@ -99,6 +100,11 @@ EOF exit 0 ;; + -l*) + ldflags="$ldflags $1";; + "") + break + ;; -o | --output) shift if [ $# -gt 0 ]; then @@ -107,10 +113,8 @@ echo "mkoctfile: output file name missing" fi ;; - -*) - ldflags="$ldflags $1";; - "") - break + -s | --strip) + strip=true ;; *) echo "mkoctfile: unrecognized argument $1" @@ -179,3 +183,12 @@ $dbg $SH_LD $SH_LDFLAGS -o $octfile $objfiles eval $SH_LD $SH_LDFLAGS -o $octfile $objfiles + +# Maybe strip it. + +if $strip; then + $dbg strip $octfile + eval strip $octfile +fi + +exit 0