summaryrefslogtreecommitdiff
path: root/board/MAI/bios_emulator/scitech/bin/meltobjs.sh
blob: fd1804b70f52737c03567e6a5d3479c6e0252e61 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /bin/sh
#
# This script generates a single object file from a set of libraries (*.a files)
# Usage: meltobjs.sh target.o library1.a library2.a ...
#
# (C) SciTech Software, Inc. 1998
#

TMPDIR=/tmp/melt$$
TARGET=$1
TARGETDIR=$PWD
shift
mkdir $TMPDIR

cd $TMPDIR

for a in $*
do
    ar x $a
done
ld -r -o $TARGETDIR/$TARGET *.o

rm -fr $TMPDIR