File: makefile.bc

package info (click to toggle)
scotty 2.1.9-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 9,984 kB
  • ctags: 4,313
  • sloc: ansic: 35,946; sh: 12,591; tcl: 8,122; yacc: 2,442; makefile: 898; lex: 370
file content (225 lines) | stat: -rw-r--r-- 5,384 bytes parent folder | download
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
217
218
219
220
221
222
223
224
225
# Makefile.bc
#
# This makefile builds tnm.dll as a dynamically loadable Tcl extension.
# This makefile is suitable for use with Borland C++ 4.5x and 5.0 and
# is derived from the example provided by Sun Microsystems.
#

TNM_VERSION = 2.1.9
TKI_VERSION = 1.4.9

#
# Project directories -- these may need to be customized for your site
#
# ROOT --	top of the source tree.
# TMPDIR --	location for .obj files.
# BORLAND --	location of Borland compiler installation.
# TCL --	location where Tcl is installed.
# TNM --	location where Tnm will be installed.
# TKI --	location where Tkined will be installed.
#

ROOT	= .\..
TMPDIR	= .
BORLAND	= c:\bc5
TCL	= c:\tcl
TNM	= $(TCL)\lib\tnm$(TNM_VERSION)
TKI	= $(TCL)\lib\tkined$(TKI_VERSION)

# uncomment the following line to compile with symbols
# DEBUG=1

#
# Borland C++ tools
#

IMPLIB  = $(BORLAND)\bin\Implib
BCC32   = $(BORLAND)\bin\Bcc32
TLINK32 = $(BORLAND)\bin\tlink32

CP      = copy
RM      = del

INCLUDES = $(ROOT)\tnm\generic;$(ROOT)\tnm\snmp;$(ROOT)\compat;$(ROOT)\compat\res;$(ROOT)\tkined\generic;$(BORLAND)\include;$(TCL)\include
LIBDIRS	= $(BORLAND)\LIB;$(ROOT)

!ifndef DEBUG
# these macros cause maximum optimization and no symbols
DEBUGLDFLAGS = 
DEBUGCCFLAGS = -v- -vi- -O2
!else
# these macros enable debugging
DEBUGLDFLAGS = -v
DEBUGCCFLAGS = -k -Od -v
!endif

DEFINES = _RTLDLL;WIN32;i386;$(DEBUGDEFINES)
PROJECTCCFLAGS= $(DEBUGCCFLAGS) -w-par -w-stu -w-aus -g0

LNFLAGS_dll = -Tpd -aa -c $(DEBUGLDFLAGS) $(BORLAND)\lib\c0d32
TNM_LNLIBS_dll = tcl75 import32 cw32i
TKI_LNLIBS_dll = tcl75 tk41 import32 cw32i

# 
# Global makefile settings
#

.AUTODEPEND
.CACHEAUTODEPEND

.suffixes: .c .dll .lib .obj .exe

.path.c=$(ROOT)\tnm\generic;$(ROOT)\tnm\snmp;$(ROOT)\compat;$(ROOT)\compat\res;$(ROOT)\compat\rpc;$(ROOT)\tkined\generic;$(TMPDIR)
.path.obj=$(TMPDIR)
.path.dll=$(TMPDIR);$(TCL)\bin

TNMOBJS = \
	$(TMPDIR)\tnmDns.obj \
	$(TMPDIR)\tnmEvent.obj \
	$(TMPDIR)\tnmHttp.obj \
	$(TMPDIR)\tnmIcmp.obj \
	$(TMPDIR)\tnmIned.obj \
	$(TMPDIR)\tnmInit.obj \
	$(TMPDIR)\tnmJob.obj \
	$(TMPDIR)\tnmNetdb.obj \
	$(TMPDIR)\tnmNtp.obj \
	$(TMPDIR)\tnmSunrpc.obj \
	$(TMPDIR)\tnmSyslog.obj \
	$(TMPDIR)\tnmUdp.obj \
	$(TMPDIR)\tnmUtil.obj \
	$(TMPDIR)\tnmAsn1.obj \
	$(TMPDIR)\tnmMD5.obj \
	$(TMPDIR)\tnmSnmpAgent.obj \
	$(TMPDIR)\tnmSnmpInst.obj \
	$(TMPDIR)\tnmSnmpNet.obj \
	$(TMPDIR)\tnmSnmpRecv.obj \
	$(TMPDIR)\tnmSnmpSend.obj \
	$(TMPDIR)\tnmSnmpTcl.obj \
	$(TMPDIR)\tnmSnmpUtil.obj \
	$(TMPDIR)\tnmMibFrozen.obj \
	$(TMPDIR)\tnmMibParser.obj   \
	$(TMPDIR)\tnmMibQuery.obj \
	$(TMPDIR)\tnmMibTcl.obj \
	$(TMPDIR)\tnmMibTree.obj \
	$(TMPDIR)\tnmWinIcmp.obj \
	$(TMPDIR)\tnmWinInit.obj \
	$(TMPDIR)\tnmWinLog.obj \
	$(TMPDIR)\tnmWinSocket.obj \
	$(TMPDIR)\ether_xdr.obj \
	$(TMPDIR)\ether_clnt.obj \
	$(TMPDIR)\mount_xdr.obj \
	$(TMPDIR)\mount_clnt.obj \
	$(TMPDIR)\rstat_xdr.obj \
	$(TMPDIR)\rstat_clnt.obj \
	$(TMPDIR)\pcnfsd_clnt.obj \
	$(TMPDIR)\pcnfsd_xdr.obj

TKIOBJS = \
	$(TMPDIR)\tkiEditor.obj \
	$(TMPDIR)\tkiObjects.obj \
	$(TMPDIR)\tkiMethods.obj \
	$(TMPDIR)\tkiMisc.obj \
	$(TMPDIR)\tkiFlash.obj \
	$(TMPDIR)\tkiStripchart.obj \
	$(TMPDIR)\tkiBarchart.obj \
	$(TMPDIR)\tkiUtil.obj \
	$(TMPDIR)\tkiInit.obj \
	$(TMPDIR)\tkiWinInit.obj

# Targets

all: cfgdll tnm.dll tkined.dll

tnm.dll: $(TNMOBJS) tcl75.lib oncrpc.lib resolv.lib
	$(TLINK32) $(LNFLAGS_dll) @&&|
		$(TNMOBJS) oncrpc.lib resolv.lib
$@
-x
$(TNM_LNLIBS_dll)
|,,

tkined.dll: $(TKIOBJS) tcl75.lib tk41.lib
	$(TLINK32) $(LNFLAGS_dll) @&&|
		$(TKIOBJS)
$@
-x
$(TKI_LNLIBS_dll)
|,,

# Implicit Targets

.c.obj:
	$(BCC32) {$< }

.dll.lib:
	$(IMPLIB) -c $@ $<

#
# Configuration file targets - these files are implicitly used by the compiler
#

cfgdll:
	@$(CP) &&|
		-n$(TMPDIR) -I$(INCLUDES) -c -WD
		-D$(DEFINES) -3 -d -w $(PROJECTCCFLAGS)
| bcc32.cfg >NUL

#
# Lots of installation targets.
#

install: tnm-install

tnm-install: tnm-install-bin tnm-install-library tnm-install-mibs tnm-install-agents tnm-install-examples

tnm-install-bin: tnm.dll
	-mkdir $(TNM)
	copy tnm.dll $(TCL)\bin\tnm$(TNM_VERSION).dll
	echo package ifneeded Tnm $(TNM_VERSION) \"load c:/tcl/bin/tnm$(TNM_VERSION).dll\" > $(TNM)\pkgIndex.tcl

tnm-install-library:
	-mkdir $(TNM)\library
	copy $(ROOT)\tnm\library\* $(TNM)\library

tnm-install-mibs:
	-mkdir $(TNM)\mibs
	copy $(ROOT)\tnm\mibs\*.smi $(TNM)\mibs
        copy $(ROOT)\tnm\mibs\*.tc  $(TNM)\mibs
        copy $(ROOT)\tnm\mibs\*.mib $(TNM)\mibs

tnm-install-agents:
	-mkdir $(TNM)\agents
	copy $(ROOT)\tnm\agents\* $(TNM)\agents

tnm-install-examples:
	-mkdir $(TNM)\examples
	copy $(ROOT)\tnm\examples\* $(TNM)\examples

tki-install: tki-install-bin tki-install-library tki-install-bitmaps tki-install-apps

tki-install-bin: tkined.dll
	-mkdir $(TKI)
	copy tkined.dll $(TCL)\bin\tkined$(TKI_VERSION).dll
	copy tkined $(TCL)\bin\tkined
	copy $(ROOT)\tkined\tkined.defaults $(TKI)
	echo package ifneeded Tkined $(TKI_VERSION) \"load c:/tcl/bin/tkined$(TKI_VERSION).dll\" > $(TKI)\pkgIndex.tcl

tki-install-library:
	-mkdir $(TKI)\library
	copy $(ROOT)\tkined\library\* $(TKI)\library

tki-install-bitmaps:
	-mkdir $(TKI)\bitmaps
	copy $(ROOT)\tkined\bitmaps\* $(TKI)\bitmaps

tki-install-apps:
	-mkdir $(TKI)\apps
	copy $(ROOT)\tkined\apps $(TKI)\apps

clean:
	-$(RM) $(TMPDIR)\*.obj
	-$(RM) $(TMPDIR)\tnm.dll
	-$(RM) $(TMPDIR)\tkined.dll
	-$(RM) $(TMPDIR)\*.lib
	-$(RM) $(TMPDIR)\*.exp
	-$(RM) $(TMPDIR)\bcc32.cfg