Debian Codegraph @

pTk/mTk/tixWin/makefile.vc

raw
1 #
2 # $Id: makefile.vc,v 1.3.2.2 2001/11/24 02:01:14 idiscovery Exp $
3 #
4 # Visual C++ 5.0 or 6.0 makefile for Tix.
5 #
6 # Copyright (c) 1996, Expert Interface Technologies
7 #
8 # See the file "license.terms" for information on usage and
9 # redistribution of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10 #
11 # Edit common.mak to set the common settings
12 # TIX_DEBUG = Compile Tix with debug information.
13 # TCL_VER = version of Tcl to compile with. Default is 8.0
14 # You may also need to change TCLPATCH for the patchlevel
15 #----------------------------------------------------------------------
16
17 #
18 # TOOLS32 = location of VC++ 32-bit development tools.
19 # TOOLS32_rc = location of VC++ rc program
20
21 !IFNDEF TOOLS32
22 # For VC 5
23 TOOLS32 = c:\DevStudio\vc
24 TOOLS32_rc = c:\DevStudio\sharedide
25 # For VC 6
26 #TOOLS32 = c:\Progra~1\micros~1\vc98
27 #TOOLS32_rc = c:\Progra~1\micros~1\common\msdev98
28 !ENDIF
29
30 # Set this to the appropriate value of /MACHINE: for your platform
31 MACHINE = IX86
32
33 # Project directories
34 #
35 # ROOT = top of source tree
36
37 ROOT = ..
38
39 # TMPDIR = location where .obj files should be stored during build
40 # TCLDIR = location of top of Tcl source heirarchy
41
42 #----------------------------------------------------------------------
43 # You shouldn't normally modify anything below this line
44 #----------------------------------------------------------------------
45 default: all
46
47 # Common compiler settings
48 !include "common.mak"
49
50 !IF "$(NODEBUG)" == "1"
51 DBGX =
52 !ELSE
53 DBGX = d
54 !ENDIF
55
56 cc32 = "$(TOOLS32)\bin\cl.exe"
57 rc32 = "$(TOOLS32_rc)\bin\rc.exe"
58 link32 = "$(TOOLS32)\bin\link.exe"
59 include32 = -I"$(TOOLS32)\include"
60
61 TIX_INCLUDES = $(include32) \
62 -I$(ROOT)\win -I$(ROOT)\generic \
63 -I$(TKDIR)\generic -I$(TKDIR)\win -I$(TKDIR)\xlib \
64 -I$(TCLDIR)\generic $(ITCL_CFLAGS)
65
66 WINDIR = $(ROOT)\win
67 GENERICDIR = $(ROOT)\generic
68
69 TCLLIBDIR = $(TCLDIR)\win\Release
70 TKLIBDIR = $(TKDIR)\win\Release
71
72 TIX_DEFINES = -D__WIN32__ $(ITCL_DEFINES)
73
74 TIX_CFLAGS = $(cflagsdll) \
75 $(TIX_INCLUDES) -Fo$@ $(TIX_DEFINES)
76 TEST_CFLAGS = $(cdebug) $(cflagsdll) \
77 $(TIX_INCLUDES) $(TIX_DEFINES) -DTK_TEST
78
79 CON_CFLAGS = $(cdebug) $(cflags) $(cvars) $(include32) -DCONSOLE
80 DUMPEXTS = $(TMPDIR)\dumpexts.exe
81
82 WISHOBJS = \
83 $(TMPDIR)\tixWinMain.obj
84
85 TIXOBJS = \
86 $(TMPDIR)\$(CONSOLE_OBJ) \
87 $(TMPDIR)\tixClass.obj \
88 $(TMPDIR)\tixCmds.obj \
89 $(TMPDIR)\tixCompat.obj \
90 $(TMPDIR)\tixDiImg.obj \
91 $(TMPDIR)\tixDiITxt.obj \
92 $(TMPDIR)\tixDiStyle.obj \
93 $(TMPDIR)\tixDItem.obj \
94 $(TMPDIR)\tixDiText.obj \
95 $(TMPDIR)\tixDiWin.obj \
96 $(TMPDIR)\tixError.obj \
97 $(TMPDIR)\tixForm.obj \
98 $(TMPDIR)\tixFormMisc.obj \
99 $(TMPDIR)\tixGeometry.obj \
100 $(TMPDIR)\tixHLCol.obj \
101 $(TMPDIR)\tixHLHdr.obj \
102 $(TMPDIR)\tixHLInd.obj \
103 $(TMPDIR)\tixImgCmp.obj \
104 $(TMPDIR)\tixHList.obj \
105 $(TMPDIR)\tixList.obj \
106 $(TMPDIR)\tixMethod.obj \
107 $(TMPDIR)\tixOption.obj \
108 $(TMPDIR)\tixSmpLs.obj \
109 $(TMPDIR)\tixWidget.obj \
110 $(TMPDIR)\tixInit.obj \
111 $(TMPDIR)\tixItcl.obj \
112 $(TMPDIR)\tixUtils.obj \
113 $(TMPDIR)\tixImgXpm.obj \
114 $(TMPDIR)\tixNBFrame.obj \
115 $(TMPDIR)\tixTList.obj \
116 $(TMPDIR)\tixGrid.obj \
117 $(TMPDIR)\tixGrData.obj \
118 $(TMPDIR)\tixGrRC.obj \
119 $(TMPDIR)\tixGrFmt.obj \
120 $(TMPDIR)\tixGrSel.obj \
121 $(TMPDIR)\tixGrUtl.obj \
122 $(TMPDIR)\tixScroll.obj \
123 $(TMPDIR)\tixWCmpt.obj \
124 $(TMPDIR)\tixWinDraw.obj \
125 $(TMPDIR)\tixWinXpm.obj \
126 $(TMPDIR)\tixWinWm.obj
127
128 ######################################################################
129 # Link flags
130 ######################################################################
131
132 !IF "$(NODEBUG)" == "1"
133 ldebug = /RELEASE
134 !ELSE
135 ldebug = -debug:full -debugtype:cv
136 !ENDIF
137
138 # declarations common to all linker options
139 lcommon = /NODEFAULTLIB /RELEASE /NOLOGO
140
141 # declarations for use on Intel i386, i486, and Pentium systems
142 !IF "$(MACHINE)" == "IX86"
143 DLLENTRY = @12
144 lflags = $(lcommon) /MACHINE:$(MACHINE)
145 !ELSE
146 lflags = $(lcommon) /MACHINE:$(MACHINE)
147 !ENDIF
148
149 conlflags = $(lflags) -subsystem:console -entry:mainCRTStartup
150 guilflags = $(lflags) -subsystem:windows -entry:WinMainCRTStartup
151 dlllflags = $(lflags) -entry:_DllMainCRTStartup$(DLLENTRY) -dll
152
153 libc = libc$(DBGX).lib oldnames.lib
154 libcdll = msvcrt$(DBGX).lib oldnames.lib
155
156 baselibs = kernel32.lib $(optlibs) advapi32.lib user32.lib
157 winlibs = $(baselibs) gdi32.lib comdlg32.lib winspool.lib
158
159 guilibs = $(libc) $(winlibs)
160 conlibs = $(libc) $(baselibs)
161 guilibsdll = $(libcdll) $(winlibs)
162 conlibsdll = $(libcdll) $(baselibs)
163
164 ######################################################################
165 # Compile flags
166 ######################################################################
167
168 # declarations common to all compiler options (makefile.vc in tk
169 # claims -O2 is buggy and so uses -Ot, so we do the same)
170 #
171 cvarsdll = -D_X86_=1 -DWIN32 -D_WIN32 -D_MT -D_DLL
172 cflagsdll = $(cvarsdll) -c -W3 -nologo -Fp$(TMPDIR)\ -YX -MD \
173 -Oti -Gs -GD
174
175 ######################################################################
176 # Project specific targets
177 ######################################################################
178
179 all: $(TIXDLL) $(TIXWISH)
180
181 $(DUMPEXTS): $(WINDIR)\winDumpExts.c
182 $(cc32) $(CON_CFLAGS) -Fo$(TMPDIR)\ /c $?
183 set LIB="$(TOOLS32)\lib"
184 $(link32) $(ldebug) $(conlflags) $(guilibs) -out:$@ \
185 $(TMPDIR)\winDumpExts.obj
186
187 $(TMPDIR)\tixvc.def: $(TIXOBJS) $(DUMPEXTS)
188 $(DUMPEXTS) -o $@ $(TIXDLL) @<<
189 $(TIXOBJS)
190 <<
191
192 # (ToDo) $(TIXDLL) doesn't have resources to define its icon, etc.
193 #
194 $(TIXDLL): $(TIXOBJS) $(TMPDIR)\tixvc.def
195 set LIB="$(TOOLS32)\lib"
196 $(link32) $(ldebug) $(dlllflags) -def:$(TMPDIR)\tixvc.def \
197 $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) $(guilibsdll) \
198 $(ITCL_LIBS) -out:$@ @<<
199 $(TIXOBJS)
200 <<
201
202
203 $(TIXWISH): $(WISHOBJS) $(TIXOBJS) $(TIXLIB) $(TMPDIR)\tixwish.res
204 set LIB="$(TOOLS32)\lib"
205 $(link32) $(ldebug) $(guilflags) \
206 $(WISHOBJS) $(TMPDIR)\tixwish.res $(TIXLIB) \
207 $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) $(guilibsdll) \
208 $(ITCL_LIBS) -out:$@
209
210
211 #
212 # Special case object file targets
213 #
214
215 $(TMPDIR)\testMain.obj: $(ROOT)\win\tixWinMain.c
216 $(cc32) $(TEST_CFLAGS) -Fo$@ $?
217
218 #
219 # Implicit rules
220 #
221
222 {$(GENERICDIR)}.c{$(TMPDIR)}.obj:
223 $(cc32) $(TIX_CFLAGS) -DBUILD_tix $<
224
225 {$(WINDIR)}.c{$(TMPDIR)}.obj:
226 $(cc32) $(TIX_CFLAGS) -DBUILD_tix $<
227
228 # Could use TIX_INCLUDES
229 {$(WINDIR)\rc}.rc{$(TMPDIR)}.res:
230 $(rc32) -fo $@ -r -i $(GENERICDIR) -i $(TKDIR)\generic \
231 -i $(TKDIR)\win -i $(TKDIR)\xlib -i $(TCLDIR)\generic $(include32) $<
232
233 clean:
234 -del $(TMPDIR)\*.obj
235 -del $(TMPDIR)\*.exp
236 -del $(TMPDIR)\*.res
237 -del $(TMPDIR)\*.def
238 -del $(TMPDIR)\*.pch
239 -del $(TIXLIB)
240 -del $(TIXDLL)
241 -del $(TIXWISH)
242