home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.tcl
- Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!uni-heidelberg!x41
- From: x41@sun0.urz.uni-heidelberg.de (Werner Guenther)
- Subject: Building shared tk & tcl libraries on AIX3.x
- Message-ID: <1992Aug25.163913.27289@sun0.urz.uni-heidelberg.de>
- Organization: University of Heidelberg (Germany)
- Date: Tue, 25 Aug 92 16:39:13 GMT
- Lines: 98
-
- I don't know if something similar has been posted before.
- Here are some patches to the tk2.3 distribution to build shared libraries
- on an AIX 3.whatever system. The result was quite amazing, the size of
- 'wish' was about 600k linked with static libraries and is around 10k now.
- Please note that you have to install the libraries before making wish
- (or any other application) as the path to the libraries is stored in the
- executables. This patch has been tested on 3.1.5 and 3.2.1 running X11R5
- (should work with X11R3 too).
-
- To apply the patch cd into the tk2.3 source tree and type 'patch -p <thisfile'
-
- Good luck,
- Werner Guenther
- ------------------------------------------------------------------------
- *** Makefile.old Fri Aug 14 23:38:12 1992
- --- Makefile Tue Aug 25 18:16:21 1992
- ***************
- *** 28,36 ****
- #
-
- TCL_DIR = tcl
- ! XLIB = -lX11
- CC = cc
- ! CFLAGS = -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.2\"
-
- LIBS = libtk.a $(TCL_DIR)/libtcl.a
-
- --- 28,36 ----
- #
-
- TCL_DIR = tcl
- ! XLIB = -L/usr/local/X11/lib -lX11
- CC = cc
- ! CFLAGS = -I/usr/local/X11/include -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.2\"
-
- LIBS = libtk.a $(TCL_DIR)/libtcl.a
-
- ***************
- *** 73,81 ****
- $(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm -o wish
-
- libtk.a: $(OBJS)
- ! rm -f libtk.a
- ! ar cr libtk.a $(OBJS)
- ! ranlib libtk.a
-
- $(TCL_DIR)/libtcl.a:
- cd $(TCL_DIR); make libtcl.a
- --- 73,86 ----
- $(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm -o wish
-
- libtk.a: $(OBJS)
- ! rm -f $@~ shr.o
- ! ar clq $@~ $(OBJS)
- ! dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' > $@.syms
- ! $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms -ltcl -lX11 -lc -lm -L$(TCL_DIR) $(XLIB)
- ! rm -f $@~
- ! ar clq $@~ shr.o
- ! rm -f $@.syms $@ shr.o
- ! mv $@~ $@
-
- $(TCL_DIR)/libtcl.a:
- cd $(TCL_DIR); make libtcl.a
- *** tcl/Makefile.old Wed May 13 18:27:53 1992
- --- tcl/Makefile Tue Aug 25 18:13:15 1992
- ***************
- *** 38,47 ****
-
- OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
-
- ! libtcl.a: ${OBJS}
- ! rm -f libtcl.a
- ! ar cr libtcl.a ${OBJS}
- ! ranlib libtcl.a
-
- tclTest: tclTest.o libtcl.a
- ${CC} ${CFLAGS} tclTest.o libtcl.a -o tclTest
- --- 38,52 ----
-
- OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
-
- ! libtcl.a: $(OBJS)
- ! rm -f $@~ shr.o
- ! ar clq $@~ $(OBJS)
- ! dump -g $@~ | sed -n -e 's/^[ ]*[0-9][0-9]*[ ]*\([^ .][^ ]*\)$$/\1/p' > $@.syms
- ! $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms -lc
- ! rm -f $@~
- ! ar clq $@~ shr.o
- ! rm -f $@.syms $@ shr.o
- ! mv $@~ $@
-
- tclTest: tclTest.o libtcl.a
- ${CC} ${CFLAGS} tclTest.o libtcl.a -o tclTest
- --
- ___________________________________________________________________________
- Werner Guenther | Computing Center, University of Heidelberg
- x41@sun0.urz.uni-heidelberg.de | x41@aix0.urz.uni-heidelberg.de
- x41@DHDURZ1.BITNET |
-