Debian Codegraph @

pTk/mTk/tixWin/makefile.bc

raw
1 #
2 # $Id: makefile.bc,v 1.2 2000/11/03 01:43:19 idiscovery Exp $
3 #
4 # makefile.bc --
5 #
6 # Borland C++ 4.5/5.0 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 # uncomment the following two lines to compile with TCL_MEM_DEBUG
16 #DEBUGDEFINES =TCL_MEM_DEBUG
17
18 #----------------------------------------------------------------------
19 # Environment setting
20
21 #
22 # ROOT = top of source tree
23
24 ROOT = ..
25
26 # TMPDIR = location where .obj files should be stored during build
27 #
28 !INCLUDE common.mak
29
30 #
31 # Borland C++ tools
32 #
33
34 BORLAND = $(TOOLS)
35 IMPLIB = Implib
36 BCC32 = Bcc32
37 BCC = Bcc
38 RC = brcc32
39 CP = copy
40 RM = del
41
42 TCL_INCLUDES = $(TCLDIR)\generic;$(TCLDIR)\win;$(ITCL_INCLUDES)
43 TK_INCLUDES = $(TKDIR)\generic;$(TKDIR)\xlib;$(TKDIR)\win
44 TIX_INCLUDES = $(ROOT)\generic;$(ROOT)\win
45 INCLUDES = $(BORLAND)\include;$(TIX_INCLUDES);$(TK_INCLUDES);$(TCL_INCLUDES)
46
47 LIBDIRS = $(BORLAND)\lib;$(ROOT)\win
48 TCLLIBDIR = $(TCLDIR)\win
49 TKLIBDIR = $(TKDIR)\win
50
51 !ifndef DEBUG
52
53 # these macros cause maximum optimization and no symbols
54 DEBUGLDFLAGS =
55 DEBUGCCFLAGS = -v- -vi- -O2
56
57 !else
58
59 # these macros enable debugging
60 DEBUGLDFLAGS = -v
61 DEBUGCCFLAGS = -k -Od -v
62
63 !endif
64
65 DEFINES = _RTLDLL;$(DEBUGDEFINES);__BORLAND;$(ITCL_DEFINES)
66
67
68 PROJECTCCFLAGS= $(DEBUGCCFLAGS) -w-par -w-stu
69
70 LNFLAGS_exe = -Tpe -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0w32
71 LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32
72
73 LNLIBS_exe=$(TIXLIB) $(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) \
74 $(ITCL_LIBS) import32 cw32i
75 LNLIBS_dll=$(TKLIBDIR)\$(TKLIB) $(TCLLIBDIR)\$(TCLLIB) \
76 $(ITCL_LIBS) import32 cw32i
77
78 #
79 # Global makefile settings
80 #
81
82 .AUTODEPEND
83 .CACHEAUTODEPEND
84
85 .suffixes: .c .dll .lib .obj .exe
86
87 .path.c=$(ROOT)\win;$(ROOT)\generic;$(ROOT)\xlib
88 .path.obj=$(TMPDIR)
89
90 #
91 # Targets
92 #
93
94 all: cfgdll $(TIXDLL) cfgexe $(TIXWISH) cfgcln
95 test: cfgdll $(TIXDLL) cfgtest $(TKTEST) cfgcln
96
97 # Implicit Targets
98
99 .c.obj:
100 @$(BCC32) {$< }
101
102 .dll.lib:
103 $(IMPLIB) -c $@ $<
104
105 .rc.res:
106 $(RC) -i$(INCLUDES) $<
107
108 #
109 # Special case object file targets
110 #
111
112 $(TMPDIR)\testMain.obj : $(ROOT)\win\tixWinMain.c
113 $(BCC32) -c -o$@ $(ROOT)\win\tixWinMain.c
114
115 #
116 # Configuration file targets - these files are implicitly used by the compiler
117 #
118
119 cfgdll:
120 @$(CP) &&|
121 -n$(TMPDIR) -I$(INCLUDES) -c -WD
122 -D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
123 | bcc32.cfg >NUL
124
125 cfgexe:
126 @$(CP) &&|
127 -n$(TMPDIR) -I$(INCLUDES) -c -W
128 -D$(DEFINES) -3 -d $(PROJECTCCFLAGS)
129 | bcc32.cfg >NUL
130
131 cfgtest:
132 @$(CP) &&|
133 -n$(TMPDIR) -I$(INCLUDES) -c -W
134 -D$(DEFINES);TCL_TEST -3 -d $(PROJECTCCFLAGS)
135 | bcc32.cfg >NUL
136
137 cfgcln:
138 @$(RM) bcc32.cfg
139
140 #
141 # Executable targets
142 #
143
144 $(TIXDLL): $(TIXOBJS) tix.def
145 tlink32 -L$(LIBDIRS) @&&|
146 $(LNFLAGS_dll) $(TIXOBJS)
147 $@
148 -x
149 $(LNLIBS_dll)
150 tix.def
151 |
152
153 $(TIXWISH): $(WISHOBJS) $(TIXLIB) $(TIXOBJS)
154 tlink32 -L$(LIBDIRS) @&&|
155 $(LNFLAGS_exe) $(WISHOBJS)
156 $@
157 -x
158 $(LNLIBS_exe)
159 |, &&|
160 EXETYPE WINDOWS
161 CODE PRELOAD MOVEABLE DISCARDABLE
162 DATA PRELOAD MOVEABLE MULTIPLE
163 |,
164
165 #
166 # Other dependencies
167 #
168
169 # The following rule automatically generates a tix.def file containing
170 # an export entry for every public symbol in the $(TKDLL) library.
171
172 tix.def: $(TIXOBJS)
173 $(TCLLIBDIR)\dumpexts.exe -o $@ $(TKDLL) @&&|
174 $(TIXOBJS)
175 |
176
177 # remove all generated files
178
179 clean:
180 -del $(TMPDIR)\*.obj
181 -del $(TMPDIR)\*.exp
182 -del $(TMPDIR)\*.res
183 -del $(TMPDIR)\*.def
184 -del $(TIXLIB)
185 -del $(TIXDLL)
186 -del $(TIXWISH)
187 -del bcc32.cfg
188
189 dist:
190 $(MAKE) TCL_VER=8.0
191 $(MAKE) TCL_VER=2.2i
192
193 distclean:
194 $(MAKE) -f makefile.bc TCL_VER=8.0 clean
195 $(MAKE) -f makefile.bc TCL_VER=2.2i clean
196
197