Check-in [83003c57a9]
Overview
Comment:Updated to link DLL and wish/tclsh against tkbase.res.o from Wish if building Tk
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:83003c57a9900966d685818e4ff1564738358769
User & Date: rkeene on 2010-10-01 04:41:49
Other Links: manifest | tags
Context
2010-10-01
20:16
Updated KitCreator to only build KitDLL or Tclkit, not both in a single invocation. If KitDLL is requested, no Tclkit will be built. check-in: 977dc16709 user: rkeene tags: trunk
04:41
Updated to link DLL and wish/tclsh against tkbase.res.o from Wish if building Tk check-in: 83003c57a9 user: rkeene tags: trunk
2010-09-30
17:35
Fixed issue with reading binary files from KitDLL VFS check-in: 69535ebd14 user: rkeene tags: trunk
Changes

Modified kitdll/build.sh from [47f9c339e5] to [e1e2ad264c].

    69     69   	cp -r "${OTHERPKGSDIR}"/*/out/* 'starpack.vfs/'
    70     70   
    71     71   	## Rename the "vfs" package directory to what "boot.tcl" expects
    72     72   	mv 'starpack.vfs/lib'/vfs* 'starpack.vfs/lib/vfs'
    73     73   
    74     74   	## Install "boot.tcl"
    75     75   	cp 'boot.tcl' 'starpack.vfs/'
           76  +
           77  +	# Include extra objects as required
           78  +	## Initialize list of extra objects
           79  +	EXTRA_OBJS=""
           80  +
           81  +	## Figure out if zlib compiled (if not, the system zlib will be used and we
           82  +	## will need to have that present)
           83  +	ZLIBDIR="$(cd "${OTHERPKGSDIR}/zlib/inst" 2>/dev/null && pwd)"
           84  +	export ZLIBDIR
           85  +	if [ -n "${ZLIBDIR}" -a -f "${ZLIBDIR}/lib/libz.a" ]; then
           86  +		EXTRA_OBJS="${EXTRA_OBJS} ${ZLIBDIR}/lib/libz.a"
           87  +	fi
           88  +
           89  +	## Tk Resources (needed for Win32 support)
           90  +	TKDIR="$(cd "${OTHERPKGSDIR}/tk/inst" && pwd)"
           91  +	TKRSRC="${TKDIR}/lib/tkbase.res.o"
           92  +	if [ -n "${TKDIR}" -a -f "${TKRSRC}" ]; then
           93  +		EXTRA_OBJS="${EXTRA_OBJS} ${TKRSRC}"
           94  +	fi
           95  +
           96  +	## Export to the environment, to be picked up by the "configure" script
           97  +	export EXTRA_OBJS
    76     98   
    77     99   	# Build KitDLL
    78    100   	echo "Running: ./configure --with-tcl=\"${TCLCONFIGDIR}\" ${CONFIGUREEXTRA}"
    79    101   	./configure --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA}
    80    102   
    81    103   	echo "Running: ${MAKE:-make}"
    82    104   	${MAKE:-make} TCLSH_NATIVE="${TCLSH_NATIVE}" || exit 1

Modified kitdll/buildsrc/kitdll-0.0/Makefile.in from [234d9ecc62] to [0b69684cf7].

     3      3   CPPFLAGS = @CPPFLAGS@ @DEFS@ -DKITDLL_MAKE_LOADABLE=1
     4      4   WISH_CFLAGS = @WISH_CFLAGS@
     5      5   LDFLAGS = @LDFLAGS@
     6      6   SHOBJLDFLAGS = @SHOBJLDFLAGS@
     7      7   LIBS = @LIBS@
     8      8   STATICLIBS = @ARCHS@
     9      9   OBJS = vfs_kitdll_data_tcl.o kitInit.o rechan.o pwb.o
           10  +EXTRA_OBJS = @EXTRA_OBJS@
    10     11   TCLSH_NATIVE = tclsh
    11     12   
    12     13   # Default target
    13     14   all: libtclkit.@SHOBJEXT@
    14     15   
    15     16   # Build targets
    16     17   ## VFS Build
................................................................................
    24     25   	"$(TCLSH_NATIVE)" ./stringify.tcl vfs_kitdll.tcl > vfs_kitdll.tcl.h
    25     26   
    26     27   ## Extensions
    27     28   rechan.o: rechan.c
    28     29   pwb.o: pwb.c
    29     30   
    30     31   ## DLL Build
    31         -libtclkit.@SHOBJEXT@: $(OBJS)
    32         -	$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit.@SHOBJEXT@ $(OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) -Wl,--whole-archive $(STATICLIBS) -Wl,--no-whole-archive $(LIBS)
           32  +libtclkit.@SHOBJEXT@: $(OBJS) $(EXTRA_OBJS)
           33  +	$(CC) $(CPPFLAGS) $(CFLAGS) -o libtclkit.@SHOBJEXT@ $(OBJS) $(EXTRA_OBJS) $(LDFLAGS) $(SHOBJLDFLAGS) -Wl,--whole-archive $(STATICLIBS) -Wl,--no-whole-archive $(LIBS)
    33     34   
    34     35   # Test driver
    35     36   tclsh.o: tclsh.c
    36         -tclsh: tclsh.o libtclkit.@SHOBJEXT@
    37         -	$(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o -L. -ltclkit -Wl,-R,`pwd`
           37  +tclsh: tclsh.o $(EXTRA_OBJS) libtclkit.@SHOBJEXT@
           38  +	$(CC) $(CPPFLAGS) $(CFLAGS) -o tclsh tclsh.o $(EXTRA_OBJS) -L. -ltclkit -Wl,-R,`pwd`
    38     39   
    39     40   wish.o: wish.c
    40         -wish: wish.o libtclkit.@SHOBJEXT@
    41         -	$(CC) $(CPPFLAGS) $(CFLAGS) $(WISH_CFLAGS) -o wish wish.o -L. -ltclkit -Wl,-R,`pwd`
           41  +wish: wish.o $(EXTRA_OBJS) libtclkit.@SHOBJEXT@
           42  +	$(CC) $(CPPFLAGS) $(CFLAGS) $(WISH_CFLAGS) -o wish wish.o $(EXTRA_OBJS) -L. -ltclkit -Wl,-R,`pwd`
    42     43   
    43     44   # Cleanup routeines
    44     45   clean:
    45     46   	rm -f libtclkit.@SHOBJEXT@
    46     47   	rm -f $(OBJS)
    47     48   	rm -f vfs_kitdll_data_tcl.c
    48     49   	rm -f vfs_kitdll.tcl.h

Modified kitdll/buildsrc/kitdll-0.0/configure.ac from [2b5889687d] to [b8d6fe9340].

    26     26   LIBS="${ARCHS} ${LIBS}"
    27     27   dnl Check for the ability to get the current system encoding
    28     28   AC_CHECK_FUNCS(Tcl_GetEncodingNameFromEnvironment Tcl_SetSystemEncoding)
    29     29   LIBS="${SAVE_LIBS}"
    30     30   
    31     31   dnl Find required libs
    32     32   DC_FIND_TCLKIT_LIBS
           33  +
           34  +dnl Find extra objects we need to link as a part of "libtclkit"
           35  +AC_SUBST(EXTRA_OBJS)
    33     36   
    34     37   dnl Check for optional headers
    35     38   AC_HEADER_STDC
    36     39   AC_CHECK_HEADERS(unistd.h string.h strings.h)
    37     40   
    38     41   dnl Produce output
    39     42   AC_OUTPUT(Makefile)