1#
2# $Id: makefile.vc4,v 1.2 2000/11/03 01:57:45 idiscovery Exp $
3#
4# makefile.vc --
5#
6#	Visual C++ 4.x makefile for Tix.
7#
8# Copyright (c) 1996, Expert Interface Technologies
9#
10# See the file "license.terms" for information on usage and redistribution
11# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
12#
13# Edit common.mak to set the common settings
14#----------------------------------------------------------------------
15# Environment setting
16#
17# You can set these variables in the command line to nmake. E.g.:
18#
19#	nmake TCL_VER=8.0 -f makefile.vc
20#
21# TOOLS32     = location of VC++ 32-bit development tools.
22# TIX_DEBUG   = Compile Tix with debug information.
23# TCL_VER     = version of Tcl to compile with. Should be either 8.0 8.1
24#               or 8.2
25#----------------------------------------------------------------------
26
27!IFNDEF TOOLS32
28TOOLS32	= C:\msdev
29!ENDIF
30
31!IFNDEF TIX_DEBUG
32NODEBUG=1
33!ENDIF
34
35# Project directories
36#
37# ROOT = top of source tree
38
39ROOT	= ..
40
41# TMPDIR = location where .obj files should be stored during build
42# TCLDIR = location of top of Tcl source heirarchy
43#
44!INCLUDE common.mak
45
46# uncomment the following two lines to compile with TCL_MEM_DEBUG
47#DEBUGDEFINES	=-DTCL_MEM_DEBUG
48
49# Make sure the VC++ tools are at the head of the path
50PATH=$(TOOLS32)\bin;$(PATH)
51
52TCLLIBDIR       = $(TCLDIR)\win
53TKLIBDIR	= $(TKDIR)\win
54WINDIR		= $(ROOT)\win
55GENERICDIR	= $(ROOT)\generic
56XLIBDIR		= $(ROOT)\xlib
57
58cc32 = $(TOOLS32)\bin\cl -I$(TOOLS32)\include
59rc32 = $(TOOLS32)\bin\rc
60link32 = $(TOOLS32)\bin\link
61
62#----------------------------------------------------------------------
63# You shouldn't normally modify anything below this line
64#----------------------------------------------------------------------
65
66X_TK_INCLUDES = -I$(TOOLS32)\include \
67	-I$(ROOT)\win -I$(ROOT)\generic \
68	-I$(TKDIR)\generic -I$(TKDIR)\win -I$(TKDIR)\xlib \
69	-I$(TCLDIR)\generic
70
71TK_INCLUDES = /ML -D_Windows $(X_TK_INCLUDES)
72
73TK_DEFINES = \
74	-nologo $(DEBUGDEFINES)
75
76CP = copy
77
78!include    <ntwin32.mak>
79
80all:    $(TIXDLL) $(TIXWISH)
81
82$(TMPDIR)\tixvc.def: $(TIXOBJS)
83	$(TCLLIBDIR)\dumpexts.exe -o $@ $(TIXDLL) @<<
84		$(TIXOBJS)
85<<
86
87# USE THESE IF YOU DO NOT WANT TO LINK TO ON MSVCRT.DLL
88#XGUILIBS = $(guilibs)
89#XCVARS   = $(cvars)
90
91XGUILIBS = $(guilibsdll)
92XCVARS   = $(cvarsdll)
93
94# (ToDo) $(TIXDLL) doesn't have resources to define its icon, etc.
95#
96$(TIXDLL): $(TIXOBJS) $(TMPDIR)\tixvc.def
97	$(link32) $(linkdebug) $(dlllflags) -def:$(TMPDIR)\tixvc.def \
98		$(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) $(XGUILIBS) \
99		$(ITCL_LIBS) \
100		-out:$(TIXDLL) @<<
101		$(TIXOBJS)
102<<
103
104
105$(TIXWISH): $(WISHOBJS) $(TIXOBJS) $(TIXLIB) $(TMPDIR)\tixwish.res
106	$(link32) $(linkdebug) $(guilflags) \
107		$(WISHOBJS) $(TMPDIR)\tixwish.res $(TIXLIB) \
108		$(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) $(XGUILIBS) \
109		$(ITCL_LIBS) \
110		-out:$(TIXWISH)
111
112
113#
114# Special case object file targets
115#
116
117$(TMPDIR)\testMain.obj: $(ROOT)\win\tixWinMain.c
118	$(cc32) $(cdebug) $(cflags) $(ITCL_CFLAGS) $(XCVARS) $(TK_INCLUDES) \
119		$(TK_DEFINES) -DTK_TEST -Fo$@ $?
120
121#
122# Implicit rules
123#
124
125{$(ROOT)\xlib}.c{$(TMPDIR)}.obj:
126	$(cc32) $(cdebug) $(cflags) $(ITCL_CFLAGS) $(XCVARS) $(TK_INCLUDES) \
127		$(TK_DEFINES) -Fo$(TMPDIR)\ $<
128
129{$(ROOT)\generic}.c{$(TMPDIR)}.obj:
130	$(cc32) $(cdebug) $(cflags) $(ITCL_CFLAGS) $(XCVARS) $(TK_INCLUDES) \
131		$(TK_DEFINES) -Fo$(TMPDIR)\ $<
132
133{$(ROOT)\win}.c{$(TMPDIR)}.obj:
134	$(cc32) $(cdebug) $(cflags) $(ITCL_CFLAGS) $(XCVARS) $(TK_INCLUDES) \
135		$(TK_DEFINES) -Fo$(TMPDIR)\ $<
136
137{$(ROOT)\win\rc}.rc{$(TMPDIR)}.res:
138	$(rc32) -fo $@ -r -i $(ROOT)\generic -i $(X_TK_INCLUDES) $<
139
140clean:
141	-del $(TMPDIR)\*.obj
142	-del $(TMPDIR)\*.exp
143	-del $(TMPDIR)\*.res
144	-del $(TMPDIR)\*.def
145	-del $(TIXLIB)
146	-del $(TIXDLL)
147	-del $(TIXWISH)
148