diff options
Diffstat (limited to 'win/makefile.vc')
-rw-r--r-- | win/makefile.vc | 178 |
1 files changed, 51 insertions, 127 deletions
diff --git a/win/makefile.vc b/win/makefile.vc index 00d7c8b..75caaf1 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -6,7 +6,7 @@ # Copyright (c) 1995-1996 Sun Microsystems, Inc. # Copyright (c) 1998-1999 by Scriptics Corporation. # -# RCS: @(#) $Id: makefile.vc,v 1.45 1999/10/29 03:05:12 hobbs Exp $ +# RCS: @(#) $Id: makefile.vc,v 1.46 1999/12/09 14:44:10 hobbs Exp $ # Does not depend on the presence of any environment variables in # order to compile tcl; all needed information is derived from @@ -22,27 +22,23 @@ # 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 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. # INSTALLDIR = where the install- targets should copy the binaries and # support files # -ROOT = .. -TOOLS32 = c:\Progra~1\devstudio\vc -TOOLS32_rc = c:\Progra~1\devstudio\sharedide -TOOLS16 = c:\msvc +# Set this to the appropriate value of /MACHINE: for your platform +MACHINE = IX86 +ROOT = .. INSTALLDIR = c:\Progra~1\Tcl -# Set this to the appropriate value of /MACHINE: for your platform -MACHINE = IX86 +!IF "$(MACHINE)" == "IA64" +TOOLS32 = c:\ia64sdk17 +TOOLS32_rc = c:\ia64sdk17 +!ELSE +TOOLS32 = c:\Progra~1\devstudio\vc +TOOLS32_rc = c:\Progra~1\devstudio\sharedide +!ENDIF # Uncomment the following line to compile with thread support #THREADDEFINES = -DTCL_THREADS=1 @@ -94,7 +90,6 @@ TCLSTUBLIB = $(OUTDIR)\$(TCLSTUBLIBNAME) TCLPLUGINLIB = $(OUTDIR)\$(NAMEPREFIX)$(VERSION)p$(DBGX).lib TCLPLUGINDLLNAME= $(NAMEPREFIX)$(VERSION)p$(DBGX).dll TCLPLUGINDLL = $(OUTDIR)\$(TCLPLUGINDLLNAME) -TCL16DLL = $(OUTDIR)\$(NAMEPREFIX)16$(VERSION)$(DBGX).dll TCLSH = $(OUTDIR)\$(NAMEPREFIX)sh$(VERSION)$(DBGX).exe TCLSHP = $(OUTDIR)\$(NAMEPREFIX)shp$(VERSION)$(DBGX).exe TCLPIPEDLLNAME = $(NAMEPREFIX)pip$(VERSION)$(DBGX).dll @@ -104,8 +99,6 @@ TCLREGDLL = $(OUTDIR)\$(TCLREGDLLNAME) TCLDDEDLLNAME = $(NAMEPREFIX)dde$(VERSION)$(DBGX).dll TCLDDEDLL = $(OUTDIR)\$(TCLDDEDLLNAME) TCLTEST = $(OUTDIR)\$(NAMEPREFIX)test.exe -DUMPEXTS = $(TMPDIR)\dumpexts.exe -CAT16 = $(TMPDIR)\cat16.exe CAT32 = $(TMPDIR)\cat32.exe RMDIR = .\rmd.bat MKDIR = .\mkd.bat @@ -213,47 +206,64 @@ rc32 = "$(TOOLS32_rc)\bin\rc.exe" include32 = -I"$(TOOLS32)\include" lib32 = "$(TOOLS32)\bin\lib.exe" -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__ $(DEBUGDEFINES) $(THREADDEFINES) +TCL_DEFINES = $(DEBUGDEFINES) $(THREADDEFINES) + +###################################################################### +# Compile flags +###################################################################### + +!IF "$(NODEBUG)" == "1" +# This cranks the optimization level to maximize speed +cdebug = -O2 -Gs -GD +!ELSE +!IF "$(MACHINE)" == "IA64" +cdebug = -Od -Zi +!ELSE +cdebug = -Z7 -Od -WX +!ENDIF +!ENDIF + +# declarations common to all compiler options +cflags = -c -W3 -nologo -Fp$(TMPDIR)\ -YX +cvarsdll = -MD$(DBGX) TCL_CFLAGS = $(cdebug) $(cflags) $(cvarsdll) $(include32) \ $(TCL_INCLUDES) $(TCL_DEFINES) -CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE -DOS_CFLAGS = $(cdebug) $(cflags) $(include16) -AL -DLL16_CFLAGS = $(cdebug) $(cflags) $(include16) -ALw +CON_CFLAGS = $(cdebug) $(cflags) $(include32) -DCONSOLE ###################################################################### # Link flags ###################################################################### !IF "$(NODEBUG)" == "1" -ldebug = /RELEASE +ldebug = /RELEASE !ELSE -ldebug = -debug:full -debugtype:cv +ldebug = -debug:full -debugtype:cv !ENDIF # declarations common to all linker options -lcommon = /NODEFAULTLIB /RELEASE /NOLOGO +lcommon = /NODEFAULTLIB /RELEASE /NOLOGO +lflags = $(lcommon) /MACHINE:$(MACHINE) # declarations for use on Intel i386, i486, and Pentium systems !IF "$(MACHINE)" == "IX86" DLLENTRY = @12 -lflags = $(lcommon) /MACHINE:$(MACHINE) +dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll +!ELSE +!IF "$(MACHINE)" == "IA64" +DLLENTRY = @12 +dlllflags = $(lflags) -dll !ELSE -lflags = $(lcommon) /MACHINE:$(MACHINE) +dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll +!ENDIF !ENDIF conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup -dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll !IF "$(MACHINE)" == "PPC" libc = libc$(DBGX).lib @@ -272,56 +282,16 @@ guilibsdll = $(libcdll) $(winlibs) conlibsdll = $(libcdll) $(baselibs) ###################################################################### -# Compile flags -###################################################################### - -!IF "$(NODEBUG)" == "1" -# This cranks the optimization level to maximize speed -cdebug = -O2 -Gs -GD -!ELSE -cdebug = -Z7 -Od -WX -!ENDIF - -# declarations common to all compiler options -ccommon = -c -W3 -nologo -YX -Fp$(TMPDIR)\ -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 - -!IF "$(NODEBUG)" == "1" -cvarsdll = $(cvars) -MD -!ELSE -cvarsdll = $(cvars) -MDd -!ENDIF - -###################################################################### # Project specific targets ###################################################################### release: setup $(TCLSH) dlls -dlls: setup $(TCL16DLL) $(TCLPIPEDLL) $(TCLREGDLL) $(TCLDDEDLL) -all: setup $(TCLSH) dlls $(CAT16) $(CAT32) -tcltest: setup $(TCLTEST) dlls $(CAT16) $(CAT32) +dlls: setup $(TCLPIPEDLL) $(TCLREGDLL) $(TCLDDEDLL) +all: setup $(TCLSH) dlls $(CAT32) +tcltest: setup $(TCLTEST) dlls $(CAT32) plugin: setup $(TCLPLUGINDLL) $(TCLSHP) install: install-binaries install-libraries -test: setup $(TCLTEST) dlls $(CAT16) $(CAT32) +test: setup $(TCLTEST) dlls $(CAT32) set TCL_LIBRARY=$(ROOT)/library $(TCLTEST) $(ROOT)/tests/all.tcl @@ -329,17 +299,11 @@ setup: @$(MKDIR) $(TMPDIR) @$(MKDIR) $(OUTDIR) -$(DUMPEXTS): $(WINDIR)\winDumpExts.c - $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $? - set LIB="$(TOOLS32)\lib" - $(link32) $(ldebug) $(conlflags) $(guilibs) -out:$@ \ - $(TMPDIR)\winDumpExts.obj - $(TCLLIB): $(TCLDLL) -$(TCLDLL): $(TCLOBJS) $(TMPDIR)\tcl.def $(TMPDIR)\tcl.res +$(TCLDLL): $(TCLOBJS) $(TMPDIR)\tcl.res set LIB="$(TOOLS32)\lib" - $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tcl.def \ + $(link32) $(ldebug) $(dlllflags) \ -out:$@ $(TMPDIR)\tcl.res $(guilibsdll) @<< $(TCLOBJS) << @@ -349,9 +313,9 @@ $(TCLSTUBLIB): $(TCLSTUBOBJS) $(TCLPLUGINLIB): $(TCLPLUGINDLL) -$(TCLPLUGINDLL): $(TCLOBJS) $(TMPDIR)\plugin.def $(TMPDIR)\tcl.res +$(TCLPLUGINDLL): $(TCLOBJS) $(TMPDIR)\tcl.res set LIB="$(TOOLS32)\lib" - $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\plugin.def \ + $(link32) $(ldebug) $(dlllflags) \ -out:$@ $(TMPDIR)\tcl.res $(guilibsdll) @<< $(TCLOBJS) << @@ -371,29 +335,6 @@ $(TCLTEST): $(TCLTESTOBJS) $(TCLLIB) $(TMPDIR)\tclsh.res $(link32) $(ldebug) $(conlflags) $(TMPDIR)\tclsh.res -stack:2300000 \ -out:$@ $(conlibsdll) $(TCLLIB) $(TCLTESTOBJS) -$(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 $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ $(WINDIR)\stub16.c set LIB="$(TOOLS32)\lib" @@ -414,22 +355,6 @@ $(CAT32): $(WINDIR)\cat.c set LIB="$(TOOLS32)\lib" $(link32) $(conlflags) -out:$@ -stack:16384 $(TMPDIR)\cat.obj $(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)\tcl.def: $(DUMPEXTS) $(TCLOBJS) - $(DUMPEXTS) -o $@ $(TCLDLLNAME) @<< -$(TCLOBJS) -<< - -$(TMPDIR)\plugin.def: $(DUMPEXTS) $(TCLOBJS) - $(DUMPEXTS) -o $@ $(TCLPLUGINDLLNAME) @<< -$(TCLOBJS) -<< - install-binaries: $(TCLSH) $(MKDIR) "$(BIN_INSTALL_DIR)" $(MKDIR) "$(LIB_INSTALL_DIR)" @@ -579,7 +504,6 @@ clean: -@$(RM) $(TMPDIR)\*.pch -@$(RM) $(TMPDIR)\*.obj -@$(RM) $(TMPDIR)\*.res - -@$(RM) $(TMPDIR)\*.def -@$(RM) $(TMPDIR)\*.exe -@$(RMDIR) $(OUTDIR) -@$(RMDIR) $(TMPDIR) |