#!/bin/sh

# This can be used as guideline to generate the X11 ddl libraries
# 
# We assume, that for each library there is already a folder jump-X.. 
# in which the necessary files for a dll lib are ready
# Now we collect the necessary files and build the libs

# start this in the mit/lib directory

#               Eric Youngdale
# 02/04/93	Dirk Hohndel



# make a merged directory for Xt, Xmu and Xext

#if [ ! -d jump-Xtmerged ]  ; then  mkdir jump-Xtmerged ; fi
#

#----------------------------------------------------
# this part has only to be run the first time or after big changes

#cd jump-Xt
#cp * ../jump-Xtmerged
#cd ../jump-Xmu
##
## The basic idea is that you append the jump.* files from jump-Xmu to the end
## of the jump.* files in jump-Xmerged.  Do not copy jump.import, since we
## can use the one for jump-X11.
##
#cat jump.vars >> ../jump-Xtmerged/jump.vars
#cat jump.funcs >> ../jump-Xtmerged/jump.funcs
#cat jump.ignore >> ../jump-Xtmerged/jump.ignore
#cd ../jump-Xext
#cat jump.vars >> ../jump-Xtmerged/jump.vars
#cat jump.funcs >> ../jump-Xtmerged/jump.funcs
#cat jump.ignore >> ../jump-Xtmerged/jump.ignore
#cd ..
#JUMP_DIR=`pwd`/jump-Xtmerged/;export JUMP_DIR
#JUMP_LIB=libXmu
#cd Xmu
#make clean
#make
#JUMP_LIB=libXext
#cd ../../extensions/lib
#make clean
#make
#cd ../../lib
#----------------------------------------------------------

# Now run mkstubs.  Here we just list the additional stub libraries that we
# want to generate on the command line along with libXt.sa.  



cd jump-X
#mkstubs -l /lib/libX11 -v 3.0 -a 0x60200000 -j 0x4000 -g 4096 -- libX11 
cd ../jump-Xtmerged
#mkstubs -l /lib/libXt  -v 3.0 -a 0x602a0000 -j 0x4000 -g 4096 -- libXt libXmu libXext
cd ../jump-Xaw
#mkstubs -l /lib/libXaw -v 3.0 -a 0x60300000 -j 0x4000 -g 4096 -u ___libX11_3_0 -u ___libXt_3_0  -- libXaw

cd ../jump-X
#mkimage -l /lib/libX11 -v 3.0 -a 0x60200000 -j 0x4000 -g 4096 -- ../X/libX11.a -lgcc -lc
cd ../jump-Xtmerged
#mkimage -l /lib/libXt  -v 3.0 -a 0x602a0000 -j 0x4000 -g 4096 -- ../Xt/libXt.a ../Xmu/libXmu.a ../../extensions/lib/libXext.a ../../extensions/lib/xinput/libXi.a ../../extensions/lib/xtest/libXtst.a ../jump-X/libX11.sa -lgcc -lc
cd ../jump-Xaw
#mkimage -l /lib/libXaw -v 3.0 -a 0x60300000 -j 0x4000 -g 4096 -- ../Xaw/libXaw.a ../jump-X/libX11.sa ../jump-Xtmerged/libXt.sa ../jump-Xtmerged/libXext.sa ../jump-Xtmerged/libXmu.sa -lgcc -lc
cd ..


# installing

#cp jump-Xtmerged/libX{t,ext,mu}.sa jump-X/libX11.sa jump-Xaw/libXaw.sa /usr/lib
#cp jump-X{,tmerged,aw}/libX*.so.* /lib
