1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216
|
# Makefile.vc
#
# This makefile is suitable for use with # Microsoft Visual C++ 2.x and 4.0.
#
# This makefile was hacked from Sun's 'example.zip'
# Copyright (c) 1996 Sun Microsystems, Inc.
# Copyright 1997 Tom Poindexter.
# Copyright 2001 Vince Darley.
#
!if !defined(MSDEVDIR) && !defined(MSVCDIR)
MSG = ^
You will need to run vcvars32.bat from Developer Studio, first, to setup^
the environment. Jump to this line to read the new instructions.
!error $(MSG)
!endif
#------------------------------------------------------------------------------
# HOW TO USE this makefile:
#
# 1) It is now necessary to have MSVCDir set in the environment. This is used
# as a check to see if vcvars32.bat had been run prior to running nmake or
# during the install of Microsoft Developer Studio, MSVCDir had been set
# globally and the PATH adjusted. Either way is valid.
#
# You'll need to run vcvars32.bat contained in the MsDev's vc(98)/bin
# directory to setup the proper environment, if needed, for your current
# setup. This is a needed bootstrap requirement and allows the swapping of
# different environments to be easier.
#
# 2) To use the Platform SDK (not expressly needed), run setenv.bat after
# vcvars32.bat according to the instructions for it. This can also turn on
# the 64-bit compiler, if your SDK has it.
#
MACHINE = IX86
VFS_VERSION = 1.3.0
DLL_VERSION = 13
# comment the following line to compile with symbols
NODEBUG=1
!IF "$(NODEBUG)" == "1"
DEBUGDEFINES =
DBGX =
DBGXMS =
!ELSE
DEBUGDEFINES = -DTCL_MEM_DEBUG -DUSE_TCLALLOC=0 -DPURIFY
DBGX = g
DBGXMS = d
!ENDIF
PROJECT = vfs$(DLL_VERSION)$(DBGX)
#
# Project directories -- these may need to be customized for your site
#
# ROOT -- location of the example files.
# MSVCDir -- location of VC++ compiler installation.
# TCL -- location where Tcl is installed.
# TCLLIB -- define the Tcl lib (with correct version)
# note that the tcl vclibs should have been unpacked in $(TCL)\lib !!
ROOT = ..
!IF "$(NODEBUG)" == "1"
WINDIR = $(ROOT)\win\Release
!ELSE
WINDIR = $(ROOT)\win\Debug
!ENDIF
GENERICDIR = $(ROOT)\generic
LIBDIR = $(ROOT)\library
cc32 = $(CC)
link32 = link
libpath32 = /LIBPATH:"$(MSVCDir)\lib"
lib32 = lib
include32 = -I"$(MSVCDir)\include"
# point TCL and TCLLIB to your tcl distribution
TCL = c:\progra~1\tcl
TCLLIB = $(TCL)\lib\tclstub85.lib
INSTALLDIR = $(TCL)\lib\vfs$(VFS_VERSION)
######################################################################
# 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
# declarations common to all compiler options
cflags = -c -W3 -nologo -Fp$(TMPDIR)\ -YX -DBUILD_vfs
######################################################################
# Link flags
######################################################################
!IF "$(NODEBUG)" == "1"
ldebug = /RELEASE
!ELSE
ldebug = -debug:full -debugtype:cv
!ENDIF
# declarations common to all linker options
lflags = /NODEFAULTLIB /NOLOGO /MACHINE:$(MACHINE) $(libpath32)
# declarations for use on Intel i386, i486, and Pentium systems
!IF "$(MACHINE)" == "IX86"
DLLENTRY = @12
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
!ELSE IF "$(MACHINE)" == "IA64"
DLLENTRY = @12
dlllflags = $(lflags) -dll
!ELSE
dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
!ENDIF
conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
!IF "$(MACHINE)" == "PPC"
libc = libc$(DBGXMS).lib
libcdll = crtdll$(DBGXMS).lib
!ELSE
libc = libc$(DBGXMS).lib oldnames.lib
libcdll = msvcrt$(DBGXMS).lib oldnames.lib
!ENDIF
baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib
winlibs = $(baselibs) gdi32.lib comdlg32.lib winspool.lib
guilibs = $(libc) $(winlibs)
conlibs = $(libc) $(baselibs)
guilibsdll = $(libcdll) $(winlibs)
conlibsdll = $(libcdll) $(baselibs)
VFSOBJS = \
$(WINDIR)\vfs.obj
#
# Visual C++ tools
#
PATH=$(COMMON32)/bin;$(MSVCDir)\bin;$(PATH)
cc32 = $(cc32) -I$(MSVCDir)\include
CP = copy
RM = del
!if "$(OS)" == "Windows_NT"
RMDIR = rmdir /S /Q
!else
RMDIR = deltree /Y
!endif
INCLUDES = \
-I../../cvs-tcl/generic \
-I../../cvs-tcl/win \
-I$(MSVCDir)/include \
-I../generic
DEFINES = -nologo $(DEBUGDEFINES) -DUSE_TCL_STUBS \
-DVERSION=\"$(VFS_VERSION)\"
#
# Global makefile settings
#
DLLOBJS = \
$(WINDIR)\vfs.obj
# Targets
all: setup $(PROJECT).dll
test:
tclsh84 $(ROOT)/tests/all.tcl $(TESTFLAGS)
setup:
-@md $(WINDIR)
install: $(PROJECT).dll
-@md $(INSTALLDIR)
$(CP) $(LIBDIR)\*.tcl $(INSTALLDIR)
$(CP) $(LIBDIR)\tclIndex $(INSTALLDIR)
$(CP) $(PROJECT).dll $(INSTALLDIR)\$(PROJECT).dll
$(PROJECT).dll: $(DLLOBJS)
$(link32) $(ldebug) $(dlllflags) $(TCLLIB) \
$(guilibsdll) -out:$(PROJECT).dll $(DLLOBJS)
# Implicit Targets
#.c.obj:
# $(cc32) $(cdebug) $(cflags) $(cvarsdll) $(INCLUDES) \
# $(DEFINES) -Fo$(WINDIR)\ $<
$(WINDIR)\vfs.obj: $(GENERICDIR)\vfs.c
$(cc32) $(cdebug) $(cflags) $(cvarsdll) $(INCLUDES) \
$(DEFINES) -Fo$(WINDIR)\ $?
clean:
-$(RM) $(WINDIR)\*.obj
-$(RMDIR) $(WINDIR)
-$(RM) $(PROJECT).dll
-$(RM) $(PROJECT).lib
-$(RM) $(PROJECT).exp
|