public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: Tcl/Tk with extensions under cyg-win32?
@ 1997-08-17 22:29 Roland Geier
  0 siblings, 0 replies; 6+ messages in thread
From: Roland Geier @ 1997-08-17 22:29 UTC (permalink / raw)
  To: gnu-win32

> I was hoping somebody has had some experience with what I want to do. I'd
> like to compile Tk/Tcl 4.2/7.6 with several extensions, including itcl 2.2,
> TclX, Expect, and Scotty (Tnm). I'd like to compile them as shared
> libraries/loadable packages, if that is possible under cyg-win32. If not, I
> suppose I can just link them in statically, it's just that I'd rather not.
> 
> I was wondering if anyone had any experience in doing this and, if so, what
> problems were run into. How much had to be changed to compile under
> cyg-win32? What target opsys did you use, linux? What other things should I
> be concerned about when I go about doing this.

With tcl's dynamic package-concept you don't have to rebuild tcl/tk at
all but use the provided b18-tcl/tk-binaries instead. Just make dlls from the
extensions and use the package-mechanism to load them dynamically,
that's all. I did that for itcl1.5 and my own extensions.

If the generation of relocatable dlls won't work for you (perhaps due
to some weird c++-code in your extensions) make static-packages
('.a'-archives) and use the tcl-package-mechanism for static
packages. Then you won't have to recompile tcl/tk either but only
extend the interpreter. Assume you have an gnuwin32-compiled archive 'itcl-2.2.a' you
want to use as a static package in tcl. Then build your own
interpreter that has the package included:


: #include <tcl.h>
: 
: static int 
: loadStaticPackages( Tcl_Interp* interp ) {
:   char loadCmd[256];
: 
:   Tcl_StaticPackage( NULL, "itcl"   ,   Itcl_Init,    NULL );
:   strcpy( loadCmd, "load \"\" itcl" );
:   Tcl_Eval( interp, loadCmd );
: }
: 
: 
: int
: Tcl_AppInit(Tcl_Interp* interp) {
:   if (Tcl_Init(interp) == TCL_ERROR) {
:     return TCL_ERROR;
:   }
:   return ( loadStaticPackages( interp ) );
: }
: 
: int
: main(int argc, char** argv) {
:   Tcl_Main(argc, argv, Tcl_AppInit);
:   return 0;       
: }
 
Now you can use "package require Itcl" in your tcl-code in the same
manner as if you wanted to load the package dynamically. So if you
succeed to build dll's from your extensions in the future (perhaps
with oncoming b19) you wont't have to change your tcl-code.

Hth,

--- Roland.

---
Roland Geier                    Phone: ++49 (8505) 92182          
Universitaet Passau, GER 	Fax:   ++49 (8505) 922311
Lehrstuhl Prof. Dr. Donner      geier@forwiss.uni-passau.de	
D-94032 Passau                  http://www.uni-passau.de/~geier/











-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tcl/Tk with extensions under cyg-win32?
  1997-08-18  0:22   ` Christoph Kukulies
@ 1997-08-20 14:12     ` Fergus Henderson
  0 siblings, 0 replies; 6+ messages in thread
From: Fergus Henderson @ 1997-08-20 14:12 UTC (permalink / raw)
  To: gnu-win32

Christoph Kukulies <kuku@gilberto.physik.RWTH-Aachen.DE> wrote:

>On Mon, Aug 18, 1997 at 09:42:22AM +1000, Fergus Henderson wrote:
>> Check < http://www.cs.mu.oz.au/~fjh/gnu-win32/gnu-win32.html > for some
>
>That URL doesn't seem to exist. Could you check?

Sorry, I meant < http://www.cs.mu.oz.au/~fjh/gnu-win32/ >.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tcl/Tk with extensions under cyg-win32?
  1997-08-17 16:54 ` Fergus Henderson
@ 1997-08-18  0:22   ` Christoph Kukulies
  1997-08-20 14:12     ` Fergus Henderson
  0 siblings, 1 reply; 6+ messages in thread
From: Christoph Kukulies @ 1997-08-18  0:22 UTC (permalink / raw)
  To: Fergus Henderson; +Cc: gnu-win32

On Mon, Aug 18, 1997 at 09:42:22AM +1000, Fergus Henderson wrote:
> You write:
> 
> >I was hoping somebody has had some experience with what I want to do. I'd
> >like to compile Tk/Tcl 4.2/7.6 with several extensions, including itcl 2.2,
[--]
> Check < http://www.cs.mu.oz.au/~fjh/gnu-win32/gnu-win32.html > for some

That URL doesn't seem to exist. Could you check?

> instructions regarding an easy way to build DLLs using gnu-win32 b18.
> If you use the Makefile.DLLs listed on that page, then you need to make
> only minor changes.

[--]
> 
> --
> Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
> WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
> PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
> -
> For help on using this list (especially unsubscribing), send a message to
> "gnu-win32-request@cygnus.com" with one line of text: "help".

-- 
Chris Christoph P. U. Kukulies kuku@gil.physik.rwth-aachen.de
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tcl/Tk with extensions under cyg-win32?
  1997-08-17 14:56 Robert Seeger
@ 1997-08-17 16:54 ` ian
  1997-08-17 16:54 ` Fergus Henderson
  1 sibling, 0 replies; 6+ messages in thread
From: ian @ 1997-08-17 16:54 UTC (permalink / raw)
  To: Robert_Seeger; +Cc: gnu-win32

>I was hoping somebody has had some experience with what I want to do. I'd
>like to compile Tk/Tcl 4.2/7.6 with several extensions, including itcl 2.2,
>TclX, Expect, and Scotty (Tnm). I'd like to compile them as shared
>libraries/loadable packages, if that is possible under cyg-win32. If not, I
>suppose I can just link them in statically, it's just that I'd rather not.

>I was wondering if anyone had any experience in doing this and, if so, what
>problems were run into. How much had to be changed to compile under
>cyg-win32? What target opsys did you use, linux? What other things should I
>be concerned about when I go about doing this.

I was able to get Tcl, Tk, Itcl and Tix working.  Probably the Tcl and
Tk work, at least, will be in the beta 19 release.

I started with the makefile.vc file in each case, and then hacked on
it until it looked like a Makefile.in file.  I wrote a little
configure.in script to go along with it, and then configured and built
just like any GNU package.

For example, I've appended the Tcl configure.in and Makefile.in that I
used.

Ian

==================================================
# Copyright (c) 1995-1996 Sun Microsystems, Inc.

# This file is CYGNUS LOCAL.  It is a copy of makefile.vc from the
# standard tcl distribution, modified to work with cygwin32 and an
# autoconf configure script.  I have chosen to minimize the number of
# changes, so the comments continue to refer to Visual C++ and the
# like.  This should make it easier to merge in a new version if that
# is necessary.

prefix = @prefix@
exec_prefix = @exec_prefix@
VPATH = @srcdir@:@srcdir@/../generic:@srcdir@/../compat
srcdir = @srcdir@

INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_DATA = @INSTALL_DATA@

CC = @CC@
CFLAGS = @CFLAGS@
NM = @NM@
AS = @AS@
LD = @LD@
DLLTOOL = @DLLTOOL@
WINDRES = @WINDRES@

# Current Tcl version;  used in various names.

DIRVERSION = @TCL_VERSION@

# The following definition can be set to non-null for special systems
# like AFS with replication.  It allows the pathnames used for installation
# to be different than those used for actually reference files at
# run-time.  INSTALL_ROOT is prepended to $prefix and $exec_prefix
# when installing files.
INSTALL_ROOT =

# Directory from which applications will reference the library of Tcl
# scripts (note: you can set the TCL_LIBRARY environment variable at
# run-time to override this value):
TCL_LIBRARY =	@datadir@/tcl$(DIRVERSION)

# Path name to use when installing library scripts:
SCRIPT_INSTALL_DIR =	$(INSTALL_ROOT)$(TCL_LIBRARY)

# Directory in which to install libtcl.so or libtcl.a:
LIB_INSTALL_DIR =	$(INSTALL_ROOT)@libdir@

# Directory in which to install the program tclsh:
BIN_INSTALL_DIR =	$(INSTALL_ROOT)@bindir@

# Directory in which to install the include file tcl.h:
INCLUDE_INSTALL_DIR =	$(INSTALL_ROOT)@includedir@

#
# Visual C++ 2.x and 4.0 makefile
#
# Does not depend on the presence of any environment variables in
# order to compile tcl; all needed information is derived from 
# location of the compiler directories.

#
# Project directories
#
# ROOT    = top of source tree
#
# TMPDIR  = location where .obj files should be stored during build
#
# TOOLS32 = location of VC++ 32-bit development tools. Note that the
#	    VC++ 2.0 header files are broken, so you need to use the
#	    ones that come with the developer network CD's, or later
#	    versions of VC++.
#
# TOOLS16 = location of VC++ 1.5 16-bit tools, needed to build thunking
#	    library.  This information is optional; if the 16-bit compiler
#	    is not available, then the 16-bit code will not be built.  
#	    Tcl will still run without the 16-bit code, but...
#		A. Under Windows 3.X you will any calls to the exec command
#	           will return an error.
#		B. A 16-bit program to test the behavior of the exec
#		   command under NT and 95 will not be built.
#

ROOT		= $(srcdir)/..
TMPDIR		= .
TOOLS32		= c:\msdev
TOOLS16		= c:\msvc

# Set this to the appropriate value of /MACHINE: for your platform
MACHINE	= IX86

# Comment the following line to compile with symbols
NODEBUG=1

# uncomment one of the following lines to compile with TCL_MEM_DEBUG, 
# TCL_MEM_DEBUG, or TCL_COMPILE_DEBUG
#DEBUGDEFINES	= -DTCL_MEM_DEBUG
#DEBUGDEFINES	= -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG
#DEBUGDEFINES	= -DTCL_MEM_DEBUG -DTCL_COMPILE_STATS
#DEBUGDEFINES	= -DTCL_MEM_DEBUG -DTCL_COMPILE_DEBUG -DTCL_COMPILE_STATS

######################################################################
# Do not modify below this line
######################################################################

VERSION = 80

TCLLIB		= libtcl$(VERSION).a
TCLDLL		= cygtcl$(VERSION).dll
TCL16DLL	= # tcl16$(VERSION).dll
TCLSH		= cygtclsh$(VERSION).exe
TCLTEST		= tcltest.exe
DUMPEXTS	= # $(TMPDIR)\dumpexts.exe
TCLPIPEDLL	= cygtclpip$(VERSION).dll
TCLREGDLL	= cygtclreg$(VERSION).dll
CAT16		= # cat16.exe
CAT32		= cat32.exe

TCLSHOBJS = \
	$(TMPDIR)/tclAppInit.o

TCLTESTOBJS = \
	$(TMPDIR)/tclTest.o \
	$(TMPDIR)/tclTestObj.o \
	$(TMPDIR)/tclWinTest.o \
	$(TMPDIR)/testMain.o

TCLOBJS = \
	$(TMPDIR)/panic.o \
	$(TMPDIR)/regexp.o \
	$(TMPDIR)/strftime.o \
	$(TMPDIR)/tclAsync.o \
	$(TMPDIR)/tclBasic.o \
	$(TMPDIR)/tclBinary.o \
	$(TMPDIR)/tclCkalloc.o \
	$(TMPDIR)/tclClock.o \
	$(TMPDIR)/tclCmdAH.o \
	$(TMPDIR)/tclCmdIL.o \
	$(TMPDIR)/tclCmdMZ.o \
	$(TMPDIR)/tclCompExpr.o \
	$(TMPDIR)/tclCompile.o \
	$(TMPDIR)/tclDate.o \
	$(TMPDIR)/tclEnv.o \
	$(TMPDIR)/tclEvent.o \
	$(TMPDIR)/tclExecute.o \
	$(TMPDIR)/tclFCmd.o \
	$(TMPDIR)/tclFileName.o \
	$(TMPDIR)/tclGet.o \
	$(TMPDIR)/tclHash.o \
	$(TMPDIR)/tclHistory.o \
	$(TMPDIR)/tclIndexObj.o \
	$(TMPDIR)/tclInterp.o \
	$(TMPDIR)/tclIO.o \
	$(TMPDIR)/tclIOCmd.o \
	$(TMPDIR)/tclIOSock.o \
	$(TMPDIR)/tclIOUtil.o \
	$(TMPDIR)/tclLink.o \
	$(TMPDIR)/tclListObj.o \
	$(TMPDIR)/tclLoad.o \
	$(TMPDIR)/tclMain.o \
	$(TMPDIR)/tclNamesp.o \
	$(TMPDIR)/tclNotify.o \
	$(TMPDIR)/tclObj.o \
	$(TMPDIR)/tclParse.o \
	$(TMPDIR)/tclPipe.o \
	$(TMPDIR)/tclPkg.o \
	$(TMPDIR)/tclPosixStr.o \
	$(TMPDIR)/tclPreserve.o \
	$(TMPDIR)/tclProc.o \
	$(TMPDIR)/tclStringObj.o \
	$(TMPDIR)/tclTimer.o \
	$(TMPDIR)/tclUtil.o \
	$(TMPDIR)/tclVar.o \
	$(TMPDIR)/tclWin32Dll.o \
	$(TMPDIR)/tclWinChan.o \
	$(TMPDIR)/tclWinError.o \
	$(TMPDIR)/tclWinFCmd.o \
	$(TMPDIR)/tclWinFile.o \
	$(TMPDIR)/tclWinInit.o \
	$(TMPDIR)/tclWinLoad.o \
	$(TMPDIR)/tclWinMtherr.o \
	$(TMPDIR)/tclWinNotify.o \
	$(TMPDIR)/tclWinPipe.o \
	$(TMPDIR)/tclWinSock.o \
	$(TMPDIR)/tclWinTime.o 

cc32		= $(TOOLS32)\bin\cl.exe
link32		= $(TOOLS32)\bin\link.exe
rc32		= $(TOOLS32)\bin\rc.exe
include32	= -I$(TOOLS32)\include

cc16		= $(TOOLS16)\bin\cl.exe
link16		= $(TOOLS16)\bin\link.exe
rc16		= $(TOOLS16)\bin\rc.exe
include16	= -I$(TOOLS16)\include

WINDIR          = $(ROOT)/win
GENERICDIR	= $(ROOT)/generic

TCL_INCLUDES	= -I$(WINDIR) -I$(GENERICDIR)
TCL_DEFINES	= -D__WIN32__ -DUSE_TCLALLOC=0 $(DEBUGDEFINES)

TCL_CFLAGS	= $(cdebug) $(cflags) $(cvarsdll) \
			$(TCL_INCLUDES) $(TCL_DEFINES) $(CFLAGS)
CON_CFLAGS	= $(cdebug) $(cflags) $(cvars) -DCONSOLE
DOS_CFLAGS	= $(cdebug) $(cflags) $(include16) -AL 
DLL16_CFLAGS	= $(cdebug) $(cflags) $(include16) -ALw

linkdebug =
conlflags = -Wl,--subsystem,console -mwindows
conlibsdll =

######################################################################
# Link flags
######################################################################

#!IFDEF NODEBUG
#ldebug = /RELEASE
#!ELSE
#ldebug = -debug:full -debugtype:cv
#!ENDIF

# declarations common to all linker options
lcommon = /NODEFAULTLIB /RELEASE /NOLOGO

# declarations for use on Intel i386, i486, and Pentium systems
#!IF "$(MACHINE)" == "IX86"
#DLLENTRY = @12
#lflags   = $(lcommon) -align:0x1000 /MACHINE:$(MACHINE)
#!ELSE
#lflags   = $(lcommon) /MACHINE:$(MACHINE)
#!ENDIF

conlflags = -Wl,--subsystem,console -mwindows
guilflags = -mwindows
dlllflags =

#!IF "$(MACHINE)" == "PPC"
#libc = libc.lib
#libcdll = crtdll.lib
#!ELSE
#libc = libc.lib oldnames.lib
#libcdll = msvcrt.lib oldnames.lib
#!ENDIF

baselibs   = -lkernel32 $(optlibs) -ladvapi32 -luser32
winlibs    = $(baselibs) -lgdi32 -lcomdlg32 -lwinspool

guilibs	   = $(libc) $(winlibs)
conlibs	   = $(libc) $(baselibs)
guilibsdll = $(libcdll) $(winlibs)
conlibsdll = $(libcdll) $(baselibs)

######################################################################
# Compile flags
######################################################################

#!IFDEF NODEBUG
#cdebug = -Ox
#!ELSE
#cdebug = -Z7 -Od -WX
#!ENDIF

# declarations common to all compiler options
ccommon = -c -W3 -nologo -YX -Dtry=__try -Dexcept=__except

#!IF "$(MACHINE)" == "IX86"
#cflags = $(ccommon) -D_X86_=1
#!ELSE
#!IF "$(MACHINE)" == "MIPS"
#cflags = $(ccommon) -D_MIPS_=1
#!ELSE
#!IF "$(MACHINE)" == "PPC"
#cflags = $(ccommon) -D_PPC_=1
#!ELSE
#!IF "$(MACHINE)" == "ALPHA"
#cflags = $(ccommon) -D_ALPHA_=1
#!ENDIF
#!ENDIF
#!ENDIF
#!ENDIF

cvars      = -DWIN32 -D_WIN32
cvarsmt    = $(cvars) -D_MT
cvarsdll   = $(cvarsmt) -D_DLL

######################################################################
# Project specific targets
######################################################################

release:    $(TCLSH) dlls $(TCLLIB)
dlls:	    $(TCLDLL) $(TCLPIPEDLL) $(TCLREGDLL)
all:	    $(TCLSH) dlls $(CAT16) $(CAT32) $(TCLLIB)
tcltest:    $(TCLTEST) dlls $(CAT16) $(CAT32)

test:	    $(TCLTEST) dlls $(CAT16) $(CAT32) 
	( echo cd $(ROOT)/tests\; source all ) | $(TCLTEST)

install: install-binaries install-libraries

install-binaries: $(TCLDLL) $(TCLLIB) $(TCLSH) $(TCLPIPEDLL)
	@for i in $(LIB_INSTALL_DIR) $(BIN_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@echo "Installing $(TCLLIB)"
	@$(INSTALL_DATA) $(TCLLIB) $(LIB_INSTALL_DIR)/$(TCLLIB)
	@chmod 555 $(LIB_INSTALL_DIR)/$(TCLLIB)
	@echo "Installing tclsh"
	@$(INSTALL_PROGRAM) $(TCLSH) $(BIN_INSTALL_DIR)/$(TCLSH)
	@echo "Installing tclConfig.sh"
	@$(INSTALL_DATA) ../unix/tclConfig.sh $(LIB_INSTALL_DIR)/tclConfig.sh

install-libraries:
	@echo "Installing DLL"
	@$(INSTALL_DATA) $(TCLDLL) $(BIN_INSTALL_DIR)/$(TCLDLL)
	@$(INSTALL_DATA) $(TCLPIPEDLL) $(BIN_INSTALL_DIR)/$(TCLPIPEDLL)
	@$(INSTALL_DATA) $(TCLREGDLL) $(BIN_INSTALL_DIR)/$(TCLREGDLL)
	@for i in $(INSTALL_ROOT)@datadir@ $(INCLUDE_INSTALL_DIR) \
		$(SCRIPT_INSTALL_DIR) ; \
	    do \
	    if [ ! -d $$i ] ; then \
		echo "Making directory $$i"; \
		mkdir $$i; \
		chmod 755 $$i; \
		else true; \
		fi; \
	    done;
	@for i in http1.0 ; \
	    do \
	    if [ ! -d $(SCRIPT_INSTALL_DIR)/$$i ] ; then \
		echo "Making directory $(SCRIPT_INSTALL_DIR)/$$i"; \
		mkdir $(SCRIPT_INSTALL_DIR)/$$i; \
		chmod 755 $(SCRIPT_INSTALL_DIR)/$$i; \
		else true; \
		fi; \
	    done;
	@echo "Installing tcl.h"
	@$(INSTALL_DATA) $(GENERICDIR)/tcl.h $(INCLUDE_INSTALL_DIR)/tcl.h
	@for i in $(ROOT)/library/*.tcl $(ROOT)/library/tclIndex $(WINDIR)/tclAppInit.c; \
	    do \
	    echo "Installing $$i"; \
	    $(INSTALL_DATA) $$i $(SCRIPT_INSTALL_DIR); \
	    done;
	@for i in http1.0 ; \
	    do \
	    for j in $(ROOT)/library/$$i/*.tcl ; \
		do \
		echo "Installing $$j"; \
		$(INSTALL_DATA) $$j $(SCRIPT_INSTALL_DIR)/$$i; \
		done; \
	    done;

# $(DUMPEXTS): $(WINDIR)/winDumpExts.c
# 	$(CC) -c $(CON_CFLAGS) $?
# 	$(CC) $(linkdebug) $(conlflags) -o $@ $(TMPDIR)/winDumpExts.obj $(guilibs)

$(TCLDLL): $(TCLOBJS) tclres.o $(TMPDIR)/tclcyg.def
	$(LD) --base-file tcl.base --dll -o $(TCLDLL) $(TCLOBJS) tclres.o -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 --subsystem windows -e _DllMain@12
	$(DLLTOOL) --as=$(AS) --dllname $(TCLDLL) --def $(TMPDIR)/tclcyg.def --base-file tcl.base --output-exp tcl.exp
	$(LD) --base-file tcl.base tcl.exp -dll -o $(TCLDLL) $(TCLOBJS) tclres.o -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 --subsystem windows -e _DllMain@12
	$(DLLTOOL) --as=$(AS) --dllname $(TCLDLL) --def $(TMPDIR)/tclcyg.def --base-file tcl.base --output-exp tcl.exp
	$(LD) tcl.exp --dll -o $(TCLDLL) $(TCLOBJS) tclres.o -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 --subsystem windows -e _DllMain@12

$(TCLLIB): $(TMPDIR)/tclcyg.def
	$(DLLTOOL) --as=$(AS) --dllname $(TCLDLL) --def $(TMPDIR)/tclcyg.def --output-lib $(TCLLIB)

$(TCLSH): $(TCLSHOBJS) tclshres.o $(TCLLIB)
	$(CC) $(linkdebug) $(conlflags) \
		-o $@ $(conlibsdll) $(TCLSHOBJS) tclshres.o $(TCLLIB)

$(TCLTEST): $(TCLTESTOBJS) tclshres.o $(TCLLIB)
	$(CC) $(linkdebug) $(conlflags) -Wl,--stack=1572864 \
		 -o $@ $(conlibsdll) $(TCLTESTOBJS) tclshres.o $(TCLLIB)

# $(TCL16DLL):  $(WINDIR)\tcl16.rc $(WINDIR)\tclWin16.c
# 	if exist $(cc16) $(cc16) @<<
# $(DLL16_CFLAGS) -Fo$(TMPDIR)\ $(WINDIR)\tclWin16.c
# <<                         
# 	@copy << $(TMPDIR)\tclWin16.def > nul
# LIBRARY $(@B);dll
# EXETYPE WINDOWS
# CODE PRELOAD MOVEABLE DISCARDABLE
# DATA PRELOAD MOVEABLE SINGLE
# HEAPSIZE 1024 
# EXPORTS
# 	WEP @1 RESIDENTNAME
# 	UTPROC @2 
# << 
# 	if exist $(cc16) $(link16) /NOLOGO /ONERROR:NOEXE /NOE @<<
# $(TMPDIR)\tclWin16.obj
# $@
# nul
# $(TOOLS16)\lib\ ldllcew oldnames libw toolhelp
# $(TMPDIR)\tclWin16.def
# <<
# 	if exist $(cc16) $(rc16) -i $(GENERICDIR) $(TCL_DEFINES) $(WINDIR)\tcl16.rc $@

$(TCLPIPEDLL): $(WINDIR)/stub16.c
	$(CC) -c $(CON_CFLAGS) $(WINDIR)/stub16.c
	$(CC) $(linkdebug) $(conlflags) -o $@ $(TMPDIR)/stub16.o $(guilibs)

$(TCLREGDLL): $(TMPDIR)/tclWinReg.o $(TCLLIB)
	echo EXPORTS > $(TMPDIR)/tclreg.def
	echo Registry_Init >> $(TMPDIR)/tclreg.def
	$(LD) --base-file tclreg.base --dll -o $(TCLREGDLL) $(TMPDIR)/tclWinReg.o $(TCLLIB) -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 --subsystem windows -e _DllEntryPoint@12
	$(DLLTOOL) --as=$(AS) --dllname $(TCLREGDLL) --def $(TMPDIR)/tclreg.def --base-file tclreg.base --output-exp tclreg.exp
	$(LD) --base-file tclreg.base tclreg.exp -dll -o $(TCLREGDLL) $(TMPDIR)/tclWinReg.o $(TCLLIB) -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 --subsystem windows -e _DllEntryPoint@12
	$(DLLTOOL) --as=$(AS) --dllname $(TCLREGDLL) --def $(TMPDIR)/tclreg.def --base-file tclreg.base --output-exp tclreg.exp
	$(LD) tclreg.exp --dll -o $(TCLREGDLL) $(TMPDIR)/tclWinReg.o $(TCLLIB) -lcygwin -ladvapi32 -luser32 -lgdi32 -lcomdlg32 -lkernel32 --subsystem windows -e _DllEntryPoint@12
	rm -f $(TMPDIR)/tclreg.def

$(CAT32): $(WINDIR)/cat.c
	$(CC) -c $(CON_CFLAGS) $?
	$(CC) $(conlflags) -o $@ -Wl,-stack,16384 $(TMPDIR)/cat.o $(conlibs)

# $(CAT16): $(WINDIR)\cat.c
# 	if exist $(cc16) $(cc16) $(DOS_CFLAGS) -Fo$(TMPDIR)\ $?
# 	set LIB=$(TOOLS16)\lib
# 	if exist $(cc16) $(link16) /NOLOGO /ONERROR:NOEXE /NOI /STACK:16384 \
# 		$(TMPDIR)\cat.obj,$@,nul,llibce.lib,nul


$(TMPDIR)/tclcyg.def: $(DUMPEXTS) $(TCLOBJS)
	echo 'EXPORTS' > tmp.def
	for o in $(TCLOBJS); do \
	  $(NM) --extern-only --defined-only $$o | sed -e 's/[^ ]* [^ ]* //' -e 's/^_//' | fgrep -v DllEntryPoint | fgrep -v DllMain | fgrep -v impure_ptr >> tmp.def; \
	done
	mv tmp.def $(TMPDIR)/tclcyg.def

#
# Special case object file targets
#

$(TMPDIR)/testMain.o: $(WINDIR)/tclAppInit.c
	$(CC) -c -o $(TMPDIR)/testMain.o $(TCL_CFLAGS) -DTCL_TEST $?

#
# Implicit rules
#

.c.o:
	$(CC) -c $(TCL_CFLAGS) $<

tclres.o: $(srcdir)/tcl.rc
	$(WINDRES) --include $(GENERICDIR) --include $(WINDIR) --define __WIN32__ --define VS_VERSION_INFO=1 $(srcdir)/tcl.rc tclres.o

tclshres.o: $(srcdir)/tclsh.rc
	$(WINDRES) --include $(GENERICDIR) --include $(WINDIR) --define __WIN32__ --define VS_VERSION_INFO=1 $(srcdir)/tclsh.rc tclshres.o

#{$(WINDIR)}.rc{$(TMPDIR)}.res:
#	$(rc32) -fo $@ -r -i $(GENERICDIR) -i $(WINDIR) -D__WIN32__ \
#		$(TCL_DEFINES) $<

clean:
	rm -f *.exp *.a *.dll *.exe $(TMPDIR)/*.o *.res *.def
	rm -f tcl.base tclreg.base

Makefile: $(WINDIR)/Makefile.in config.status
	$(SHELL) config.status

config.status: $(WINDIR)/configure
	./config.status --recheck
==================================================

==================================================
dnl	The file is CYGNUS LOCAL.  It is used for cygwin32.

dnl	This file is an input file used by the GNU "autoconf" program to
dnl	generate the file "configure", which is run during Tcl installation
dnl	to configure the system for the local environment.

AC_PREREQ(2.5)

AC_INIT(../generic/tcl.h)

if test "${prefix}" = "NONE"; then
    prefix=/usr/local
fi
if test "${exec_prefix}" = "NONE"; then
    exec_prefix=$prefix
fi

AC_PROG_CC
NM=${NM-nm}
AC_SUBST(NM)
AS=${AS-as}
AC_SUBST(AS)
LD=${LD-ld}
AC_SUBST(LD)
DLLTOOL=${DLLTOOL-dlltool}
AC_SUBST(DLLTOOL)
WINDRES=${WINDRES-windres}
AC_SUBST(WINDRES)
AC_PROG_INSTALL

# The following variables are just for tclConfig.sh, not for Makefile. 
LIBOBJS=
AC_SUBST(LIBOBJS)
TCL_VERSION=8.0
TCL_MAJOR_VERSION=8
TCL_MINOR_VERSION=0
TCL_PATCH_LEVEL=b2
VERSION=${TCL_VERSION}
DL_LIBS=
MATH_LIBS=-lm
SHLIB_CFLAGS=
SHLIB_LD=
SHLIB_LD_LIBS=
SHLIB_SUFFIX=
LD_FLAGS=
TCL_LD_SEARCH_FLAGS=
TCL_BUILD_LIB_SPEC="-L`pwd` -ltcl`echo ${VERSION} | tr -d .`"
TCL_LIB_SPEC="-L${exec_prefix}/lib -ltcl`echo ${VERSION} | tr -d .`"
TCL_LIB_VERSIONS_OK=nodots
TCL_SHARED_LIB_SUFFIX=
TCL_UNSHARED_LIB_SUFFIX="`echo ${VERSION} | tr -d .`.a"
eval "TCL_LIB_FILE=libtcl${TCL_UNSHARED_LIB_SUFFIX}"
TCL_SRC_DIR=`cd $srcdir/..; pwd`
if test "$prefix" != "$exec_prefix"; then
    TCL_PACKAGE_PATH="${exec_prefix}/lib ${prefix}/lib"
else
    TCL_PACKAGE_PATH="${prefix}/lib"
fi

AC_SUBST(DL_LIBS)
AC_SUBST(LD_FLAGS)
AC_SUBST(MATH_LIBS)
AC_SUBST(SHLIB_CFLAGS)
AC_SUBST(SHLIB_LD)
AC_SUBST(SHLIB_LD_LIBS)
AC_SUBST(SHLIB_SUFFIX)
AC_SUBST(TCL_BUILD_LIB_SPEC)
AC_SUBST(TCL_LD_SEARCH_FLAGS)
AC_SUBST(TCL_LIB_FILE)
AC_SUBST(TCL_LIB_SPEC)
AC_SUBST(TCL_LIB_VERSIONS_OK)
AC_SUBST(TCL_MAJOR_VERSION)
AC_SUBST(TCL_MINOR_VERSION)
AC_SUBST(TCL_PACKAGE_PATH)
AC_SUBST(TCL_PATCH_LEVEL)
AC_SUBST(TCL_SHARED_LIB_SUFFIX)
AC_SUBST(TCL_SHLIB_CFLAGS)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TCL_UNSHARED_LIB_SUFFIX)
AC_SUBST(TCL_VERSION)

AC_OUTPUT(Makefile ../unix/tclConfig.sh)
==================================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Tcl/Tk with extensions under cyg-win32?
  1997-08-17 14:56 Robert Seeger
  1997-08-17 16:54 ` ian
@ 1997-08-17 16:54 ` Fergus Henderson
  1997-08-18  0:22   ` Christoph Kukulies
  1 sibling, 1 reply; 6+ messages in thread
From: Fergus Henderson @ 1997-08-17 16:54 UTC (permalink / raw)
  To: gnu-win32

You write:

>I was hoping somebody has had some experience with what I want to do. I'd
>like to compile Tk/Tcl 4.2/7.6 with several extensions, including itcl 2.2,
>TclX, Expect, and Scotty (Tnm). I'd like to compile them as shared
>libraries/loadable packages, if that is possible under cyg-win32. If not, I
>suppose I can just link them in statically, it's just that I'd rather not.
>
>I was wondering if anyone had any experience in doing this and, if so, what
>problems were run into. How much had to be changed to compile under
>cyg-win32? What target opsys did you use, linux? What other things should I
>be concerned about when I go about doing this.

Check < http://www.cs.mu.oz.au/~fjh/gnu-win32/gnu-win32.html > for some
instructions regarding an easy way to build DLLs using gnu-win32 b18.
If you use the Makefile.DLLs listed on that page, then you need to make
only minor changes.

If you want loadable packages (i.e. dlopen() etc.) then b18 is
not sufficient.  However, someone recently posted a patch to support
dlopen() and friends, so check the mail archives.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: < http://www.cs.mu.oz.au/~fjh >   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Tcl/Tk with extensions under cyg-win32?
@ 1997-08-17 14:56 Robert Seeger
  1997-08-17 16:54 ` ian
  1997-08-17 16:54 ` Fergus Henderson
  0 siblings, 2 replies; 6+ messages in thread
From: Robert Seeger @ 1997-08-17 14:56 UTC (permalink / raw)
  To: gnu-win32

I was hoping somebody has had some experience with what I want to do. I'd
like to compile Tk/Tcl 4.2/7.6 with several extensions, including itcl 2.2,
TclX, Expect, and Scotty (Tnm). I'd like to compile them as shared
libraries/loadable packages, if that is possible under cyg-win32. If not, I
suppose I can just link them in statically, it's just that I'd rather not.

I was wondering if anyone had any experience in doing this and, if so, what
problems were run into. How much had to be changed to compile under
cyg-win32? What target opsys did you use, linux? What other things should I
be concerned about when I go about doing this.

			Thanks for any help,
			Robert Seeger

========================================
Robert Seeger
Network Engineer
Bay Networks

Telephone:	(518)237-2087
Pager:		(800)SKY-8888  Pin#1264792
Fax:		(518)237-4190
Email:		rseeger@baynetworks.com
Address:	224 5th Ave, Apt#2
		Lansingburgh, NY 12182
========================================
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1997-08-20 14:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-08-17 22:29 Tcl/Tk with extensions under cyg-win32? Roland Geier
  -- strict thread matches above, loose matches on Subject: below --
1997-08-17 14:56 Robert Seeger
1997-08-17 16:54 ` ian
1997-08-17 16:54 ` Fergus Henderson
1997-08-18  0:22   ` Christoph Kukulies
1997-08-20 14:12     ` Fergus Henderson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).