1 # To incorporate the 7300/3b1 shared library, run this script in place
3 # You can skip this is you have the shcc program installed as cc in
5 # First: Run 'Configure' through to the end and run 'make depend'.
6 # Second: Edit 'makefile' ( not Makefile ) and set CC = 3b1cc.
7 # Third: Edit 'x2p/makefile' and set CC = 3b1cc.
9 # Do not use '3b1cc' as the default compiler. The call to the default
10 # compiler is used by 'perl' and will not be available when running
13 # Note: This script omits libraries which are redundant in the shared
14 # library. It is an excerpt from a grander version available upon
15 # request from "zebra!vern" or "vern@zebra.alphacdc.com".
22 SHAREDLIB="/lib/crt0s.o /lib/shlib.ifile"
31 # These are libraries which are incorporated in the shared library
34 # These routines are in libc.a but not in the shared library
35 if [ ! -f vsprintf.o -o ! -f doprnt.o ]
37 echo "Extracting vsprintf.o from libc.a"
38 ar -x /lib/libc.a vsprintf.o doprnt.o
52 [ "$i" = "$1" ] && match=true
54 [ "$match" != false ] || LIBS="$LIBS $1";;
55 -*) FLAGS="$FLAGS $1";;
56 *.c) COBJS="$COBJS $1";;
57 *.o) LOBJS="$LOBJS $1";;
65 CMD="$CMD $FLAGS $INCL $LPATHS $LIBS $COBJS $CFLAG $TARG"
68 LOBJS="$LOBJS vsprintf.o doprnt.o"
69 CMD="$LD -r $LOBJS $LPATHS $LIBS -o temp.o"
72 CMD="$LD -s temp.o $SHAREDLIB -o $TARG"