home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / lang / tcl / 1253 next >
Encoding:
Text File  |  1992-08-25  |  3.2 KB  |  108 lines

  1. Newsgroups: comp.lang.tcl
  2. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!jvnc.net!yale.edu!ira.uka.de!uni-heidelberg!x41
  3. From: x41@sun0.urz.uni-heidelberg.de (Werner Guenther)
  4. Subject: Building shared tk & tcl libraries on AIX3.x
  5. Message-ID: <1992Aug25.163913.27289@sun0.urz.uni-heidelberg.de>
  6. Organization: University of Heidelberg (Germany)
  7. Date: Tue, 25 Aug 92 16:39:13 GMT
  8. Lines: 98
  9.  
  10.  I don't know if something similar has been posted before. 
  11. Here are some patches to the tk2.3 distribution to build shared libraries
  12. on an AIX 3.whatever system. The result was quite amazing, the size of 
  13. 'wish' was about 600k linked with static libraries and is around 10k now.
  14. Please note that you have to install the libraries before making wish 
  15. (or any other application) as the path to the libraries is stored in the
  16. executables. This patch has been tested on 3.1.5 and 3.2.1 running X11R5
  17. (should work with X11R3 too).
  18.  
  19. To apply the patch cd into the tk2.3 source tree and type 'patch -p <thisfile'
  20.  
  21. Good luck,
  22. Werner Guenther
  23. ------------------------------------------------------------------------
  24. *** Makefile.old    Fri Aug 14 23:38:12 1992
  25. --- Makefile    Tue Aug 25 18:16:21 1992
  26. ***************
  27. *** 28,36 ****
  28.   #
  29.   
  30.   TCL_DIR        = tcl
  31. ! XLIB        = -lX11
  32.   CC        = cc
  33. ! CFLAGS        = -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.2\"
  34.   
  35.   LIBS = libtk.a $(TCL_DIR)/libtcl.a
  36.   
  37. --- 28,36 ----
  38.   #
  39.   
  40.   TCL_DIR        = tcl
  41. ! XLIB        = -L/usr/local/X11/lib -lX11
  42.   CC        = cc
  43. ! CFLAGS        = -I/usr/local/X11/include -I. -I$(TCL_DIR) -g -DTK_VERSION=\"2.2\"
  44.   
  45.   LIBS = libtk.a $(TCL_DIR)/libtcl.a
  46.   
  47. ***************
  48. *** 73,81 ****
  49.       $(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm -o wish
  50.   
  51.   libtk.a: $(OBJS)
  52. !     rm -f libtk.a
  53. !     ar cr libtk.a $(OBJS)
  54. !     ranlib libtk.a
  55.   
  56.   $(TCL_DIR)/libtcl.a:
  57.       cd $(TCL_DIR); make libtcl.a
  58. --- 73,86 ----
  59.       $(CC) $(CFLAGS) main.o $(LIBS) $(XLIB) -lm -o wish
  60.   
  61.   libtk.a: $(OBJS)
  62. !     rm -f $@~ shr.o
  63. !     ar clq $@~ $(OBJS)
  64. !     dump -g $@~ | sed -n -e 's/^[     ]*[0-9][0-9]*[     ]*\([^     .][^     ]*\)$$/\1/p' > $@.syms
  65. !     $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms -ltcl -lX11 -lc -lm -L$(TCL_DIR) $(XLIB)
  66. !     rm -f $@~
  67. !     ar clq $@~ shr.o
  68. !     rm -f $@.syms $@ shr.o
  69. !     mv $@~ $@
  70.   
  71.   $(TCL_DIR)/libtcl.a:
  72.       cd $(TCL_DIR); make libtcl.a
  73. *** tcl/Makefile.old    Wed May 13 18:27:53 1992
  74. --- tcl/Makefile    Tue Aug 25 18:13:15 1992
  75. ***************
  76. *** 38,47 ****
  77.   
  78.   OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
  79.   
  80. ! libtcl.a: ${OBJS}
  81. !     rm -f libtcl.a
  82. !     ar cr libtcl.a ${OBJS}
  83. !     ranlib libtcl.a
  84.   
  85.   tclTest: tclTest.o libtcl.a
  86.       ${CC} ${CFLAGS} tclTest.o libtcl.a -o tclTest
  87. --- 38,52 ----
  88.   
  89.   OBJS = ${GENERIC_OBJS} ${UNIX_OBJS} ${COMPAT_OBJS}
  90.   
  91. ! libtcl.a: $(OBJS)
  92. !     rm -f $@~ shr.o
  93. !     ar clq $@~ $(OBJS)
  94. !     dump -g $@~ | sed -n -e 's/^[     ]*[0-9][0-9]*[     ]*\([^     .][^     ]*\)$$/\1/p' > $@.syms
  95. !     $(LD) -o shr.o $@~ -H512 -T512 -bM\:SRE -bE\:$@.syms -lc
  96. !     rm -f $@~
  97. !     ar clq $@~ shr.o
  98. !     rm -f $@.syms $@ shr.o
  99. !     mv $@~ $@
  100.   
  101.   tclTest: tclTest.o libtcl.a
  102.       ${CC} ${CFLAGS} tclTest.o libtcl.a -o tclTest
  103. -- 
  104. ___________________________________________________________________________
  105. Werner Guenther                | Computing Center, University of Heidelberg
  106. x41@sun0.urz.uni-heidelberg.de | x41@aix0.urz.uni-heidelberg.de
  107. x41@DHDURZ1.BITNET             |  
  108.