| 227 |
dpurdie |
1 |
#--- Auto-generated Platform Dependent Makefile -----------------------------
|
|
|
2 |
# -*- mode: mak; tabs: 9; -*-
|
|
|
3 |
# Generated from GBE_MAKELIB=/work/Devl/TOOLS/makelib.pl2 (version 2.22)
|
|
|
4 |
# and makefile.pl
|
|
|
5 |
# on Fri Jun 28 15:09:22 2002
|
|
|
6 |
#
|
|
|
7 |
# Copyright (C) 1995-2002 ERG Transit Systems, All rights reserved
|
|
|
8 |
#
|
|
|
9 |
# Platform DOS16
|
|
|
10 |
# Located in e:/WORK/NET/SRC/RPC40/RPCGEN
|
|
|
11 |
#............................................................................
|
|
|
12 |
GBE_ROOT = e:/WORK/NET
|
|
|
13 |
GBE_MAKELIB = /work/Devl/TOOLS/makelib.pl2
|
|
|
14 |
GBE_TARGET = DOS16
|
|
|
15 |
GBE_TARGETMACH =
|
|
|
16 |
GBE_PLATFORM = DOS16
|
|
|
17 |
ifeq "$(DEBUG)" "0"
|
|
|
18 |
GBE_TYPE = P
|
|
|
19 |
else
|
|
|
20 |
GBE_TYPE = D
|
|
|
21 |
endif
|
|
|
22 |
|
|
|
23 |
SHELL = /work/Devl/BIN.win32/sh
|
|
|
24 |
SHELLARGS =
|
|
|
25 |
EXTENDED_LINE = /work/Devl/BIN.win32/extend.lst
|
|
|
26 |
export EXTENDED_LINE MAKE
|
|
|
27 |
|
|
|
28 |
MFLAGS = --no-print --warn -r
|
|
|
29 |
|
|
|
30 |
#--------- Targets ----------------------------------------------------------
|
|
|
31 |
|
|
|
32 |
.PHONY: default all build install package unpackage uninstall \
|
|
|
33 |
clean unbuild clobber
|
|
|
34 |
|
|
|
35 |
default: make_usage
|
|
|
36 |
all: install package
|
|
|
37 |
build: make_init makefiles generate install_hdr depend make_lib \
|
|
|
38 |
install_lib make_shlib install_shlib make_prog \
|
|
|
39 |
install_class
|
|
|
40 |
install: build install_prog
|
|
|
41 |
package: package_hdr package_lib package_prog package_class
|
|
|
42 |
unpackage: unpackage_prog unpackage_lib unpackage_hdr
|
|
|
43 |
uninstall: uninstall_hdr uninstall_lib uninstall_prog
|
|
|
44 |
clean: make_init2 unmake_prog unmake_test unmake_lib unobj \
|
|
|
45 |
undepend ungenerate rmlitter make_undir
|
|
|
46 |
unbuild: clean uninstall
|
|
|
47 |
clobber: unpackage unbuild
|
|
|
48 |
|
|
|
49 |
#--------- Macros -----------------------------------------------------------
|
|
|
50 |
|
|
|
51 |
OBJDIR = $(GBE_TARGET)$(GBE_TYPE).OBJ
|
|
|
52 |
LIBDIR = $(GBE_TARGET).LIB
|
|
|
53 |
BINDIR = $(GBE_TARGET)$(GBE_TYPE).BIN
|
|
|
54 |
CLSDIR = classes$(GBE_TYPE)
|
|
|
55 |
|
|
|
56 |
PKGDIR = $(GBE_ROOT)/pkg
|
|
|
57 |
INCDIR_PKG = $(PKGDIR)/include
|
|
|
58 |
LIBDIR_PKG = $(PKGDIR)/lib/$(GBE_TARGET)
|
|
|
59 |
BINDIR_PKG = $(PKGDIR)/bin/$(GBE_TARGET)$(GBE_TYPE)
|
|
|
60 |
CLSDIR_PKG = $(PKGDIR)/classes
|
|
|
61 |
|
|
|
62 |
LOCALDIR = $(GBE_ROOT)/local
|
|
|
63 |
INCDIR_LOCAL = $(LOCALDIR)/inc
|
|
|
64 |
LIBDIR_LOCAL = $(LOCALDIR)/lib/$(GBE_TARGET)
|
|
|
65 |
BINDIR_LOCAL = $(LOCALDIR)/bin/$(GBE_TARGET)$(GBE_TYPE)
|
|
|
66 |
CLSDIR_LOCAL = $(LOCALDIR)/classes
|
|
|
67 |
|
|
|
68 |
INTERFACEDIR = $(GBE_ROOT)/interface
|
|
|
69 |
INCDIR_INTERFACE= $(INTERFACEDIR)/include
|
|
|
70 |
LIBDIR_INTERFACE= $(INTERFACE)/lib/$(GBE_TARGET)
|
|
|
71 |
BINDIR_INTERFACE= $(INTERFACE)/bin/$(GBE_TARGET)$(GBE_TYPE)
|
|
|
72 |
CLSDIR_INTERFACE= $(INTERFACE)/classes
|
|
|
73 |
|
|
|
74 |
.SUFFIXES: .c .C .cc .cpp
|
|
|
75 |
|
|
|
76 |
#
|
|
|
77 |
##############################################################################
|
|
|
78 |
# Windows toolset:
|
|
|
79 |
##############################################################################
|
|
|
80 |
#
|
|
|
81 |
|
|
|
82 |
echo := echo
|
|
|
83 |
cmdfile := $(GBE_BIN)/cmdfile
|
|
|
84 |
rm := $(GBE_BIN)/rm
|
|
|
85 |
cp := $(GBE_BIN)/cp
|
|
|
86 |
mv := $(GBE_BIN)/mv
|
|
|
87 |
mkdir := $(GBE_BIN)/mkdir
|
|
|
88 |
rmdir := $(GBE_BIN)/rmdir
|
|
|
89 |
chmod := $(GBE_BIN)/chmod
|
|
|
90 |
pwd := $(GBE_BIN)/sh -c pwd
|
|
|
91 |
grep := $(GBE_BIN)/grep
|
|
|
92 |
touch := $(GBE_BIN)/touch
|
|
|
93 |
awk := $(GBE_BIN)/awk
|
|
|
94 |
|
|
|
95 |
flex := $(GBE_BIN)/flex
|
|
|
96 |
yacc := $(GBE_BIN)/yacc
|
|
|
97 |
rpcgen := $(GBE_BIN)/rpcgen
|
|
|
98 |
|
|
|
99 |
#
|
|
|
100 |
##############################################################################
|
|
|
101 |
# Compat for older (embedded) makefiles
|
|
|
102 |
##############################################################################
|
|
|
103 |
#
|
|
|
104 |
|
|
|
105 |
SCM_ROOT = $(GBE_ROOT)
|
|
|
106 |
SCM_TYPE = $(GBE_TYPE)
|
|
|
107 |
SCM_BIN = $(GBE_BIN)
|
|
|
108 |
SCM_PLATFORM = $(GBE_PLATFORM)
|
|
|
109 |
|
|
|
110 |
#
|
|
|
111 |
###############################################################################
|
|
|
112 |
# Brain hurts stuff... $(space) becomes a macro containing 1 space
|
|
|
113 |
# other aren't so bad. These are used to make argument lists is a few
|
|
|
114 |
# places where we have to translate from a space seperated list to a
|
|
|
115 |
# something else seperated list (or vicky verka).
|
|
|
116 |
###############################################################################
|
|
|
117 |
#
|
|
|
118 |
comma := ,
|
|
|
119 |
plus := +
|
|
|
120 |
semicolon := ;
|
|
|
121 |
empty :=
|
|
|
122 |
space := $(empty) $(empty)
|
|
|
123 |
|
|
|
124 |
|
|
|
125 |
#
|
|
|
126 |
###############################################################################
|
|
|
127 |
# A little macro used within each of the rules for translating a file from
|
|
|
128 |
# one type to another to print the environment if the variable SHOWENV has
|
|
|
129 |
# been defined.
|
|
|
130 |
###############################################################################
|
|
|
131 |
#
|
|
|
132 |
ifdef SHOWENV
|
|
|
133 |
define show_environment
|
|
|
134 |
$(GBE_BIN)/printenv
|
|
|
135 |
endef
|
|
|
136 |
else
|
|
|
137 |
define show_environment
|
|
|
138 |
endef
|
|
|
139 |
endif
|
|
|
140 |
|
|
|
141 |
#
|
|
|
142 |
###############################################################################
|
|
|
143 |
# File: dos16.def
|
|
|
144 |
# Contents: DOS16 defines
|
|
|
145 |
###############################################################################
|
|
|
146 |
|
|
|
147 |
#
|
|
|
148 |
###############################################################################
|
|
|
149 |
# File: TOOLSET/wcdos.def
|
|
|
150 |
# Contents: WATCOM defines
|
|
|
151 |
###############################################################################
|
|
|
152 |
|
|
|
153 |
toolset = wcdos
|
|
|
154 |
|
|
|
155 |
o = obj
|
|
|
156 |
s = asm
|
|
|
157 |
a = lib
|
|
|
158 |
exe = exe
|
|
|
159 |
|
|
|
160 |
.SUFFIXES: .asm
|
|
|
161 |
|
|
|
162 |
.PHONY: watcom
|
|
|
163 |
watcom:
|
|
|
164 |
@$(echo) [Toolset WCDOS - Watcom C/C++ 16 bit]; \
|
|
|
165 |
if [ -z "$$WATCOM" ]; then echo WATCOM env var not set; exit 2; fi
|
|
|
166 |
|
|
|
167 |
|
|
|
168 |
watcom := $(subst \,/,$(strip $(WATCOM)))
|
|
|
169 |
ifeq "$(findstring $(PATH),$(WATCOM))" ""
|
|
|
170 |
PATH := $(PATH);$(watcom)/bin;$(watcom)/binb
|
|
|
171 |
endif
|
|
|
172 |
|
|
|
173 |
ifdef MASM
|
|
|
174 |
masm := $(subst \,/,$(strip $(MASM)))
|
|
|
175 |
ifneq "$(masm)" ""
|
|
|
176 |
ifeq "$(findstring $(PATH),$(MASM))" ""
|
|
|
177 |
PATH := $(PATH);$(masm)/bin
|
|
|
178 |
endif
|
|
|
179 |
endif
|
|
|
180 |
else
|
|
|
181 |
masm :=
|
|
|
182 |
endif
|
|
|
183 |
|
|
|
184 |
ifdef TASM
|
|
|
185 |
tasm := $(subst \,/,$(strip $(TASM)))
|
|
|
186 |
ifneq "$(tasm)" ""
|
|
|
187 |
ifeq "$(findstring $(PATH),$(TASM))" ""
|
|
|
188 |
PATH := $(PATH);$(tasm)/bin
|
|
|
189 |
endif
|
|
|
190 |
endif
|
|
|
191 |
else
|
|
|
192 |
tasm :=
|
|
|
193 |
endif
|
|
|
194 |
|
|
|
195 |
#
|
|
|
196 |
|
|
|
197 |
CFLAGS = \
|
|
|
198 |
-DFUSION\
|
|
|
199 |
-DEMBEDDED
|
|
|
200 |
CLINTFLAGS = \
|
|
|
201 |
-DFUSION\
|
|
|
202 |
-DEMBEDDED
|
|
|
203 |
CDEPENDFLAGS = \
|
|
|
204 |
-DFUSION\
|
|
|
205 |
-DEMBEDDED
|
|
|
206 |
CXXFLAGS = \
|
|
|
207 |
-DFUSION
|
|
|
208 |
CXXLINTFLAGS = \
|
|
|
209 |
-DFUSION
|
|
|
210 |
CXXDEPENDFLAGS = \
|
|
|
211 |
-DFUSION
|
|
|
212 |
ASFLAGS =
|
|
|
213 |
LDFLAGS =
|
|
|
214 |
|
|
|
215 |
INCDIRS =
|
|
|
216 |
INCDIRS += \
|
|
|
217 |
.
|
|
|
218 |
INCDIRS += $(INCDIR_LOCAL)
|
|
|
219 |
INCDIRS += $(GBE_ROOT)/interface/include
|
|
|
220 |
INCDIRS += \
|
|
|
221 |
$(GBE_ROOT)/../EOS/LOCAL/INC
|
|
|
222 |
|
|
|
223 |
NODEPDIRS =
|
|
|
224 |
|
|
|
225 |
DIRS = .
|
|
|
226 |
|
|
|
227 |
LIBDIRS = $(LIBDIR)
|
|
|
228 |
LIBDIRS += $(LIBDIR_LOCAL)
|
|
|
229 |
LIBDIRS += $(GBE_ROOT)/interface/lib/$(GBE_MACHTYPE)
|
|
|
230 |
LIBDIRS += $(GBE_ROOT)/interface/lib/$(GBE_TARGET)
|
|
|
231 |
LIBDIRS += \
|
|
|
232 |
$(GBE_ROOT)/../EOS/LOCAL/LIB/$(GBE_TARGET)\
|
|
|
233 |
$(GBE_ROOT)/../EOS/LOCAL/LIB/$(EOS_KERNEL)
|
|
|
234 |
|
|
|
235 |
CSRCS = \
|
|
|
236 |
rpc_clnt.c\
|
|
|
237 |
rpc_cout.c\
|
|
|
238 |
rpc_hout.c\
|
|
|
239 |
rpc_main.c\
|
|
|
240 |
rpc_pars.c\
|
|
|
241 |
rpc_samp.c\
|
|
|
242 |
rpc_scan.c\
|
|
|
243 |
rpc_svco.c\
|
|
|
244 |
rpc_tblo.c\
|
|
|
245 |
rpc_util.c\
|
|
|
246 |
rindex.c
|
|
|
247 |
CXXSRCS =
|
|
|
248 |
ASSRCS =
|
|
|
249 |
INITS = \
|
|
|
250 |
watcom
|
|
|
251 |
OBJS =
|
|
|
252 |
OBJS += \
|
|
|
253 |
$(OBJDIR)/rpc_clnt.obj\
|
|
|
254 |
$(OBJDIR)/rpc_cout.obj\
|
|
|
255 |
$(OBJDIR)/rpc_hout.obj\
|
|
|
256 |
$(OBJDIR)/rpc_main.obj\
|
|
|
257 |
$(OBJDIR)/rpc_pars.obj\
|
|
|
258 |
$(OBJDIR)/rpc_samp.obj\
|
|
|
259 |
$(OBJDIR)/rpc_scan.obj\
|
|
|
260 |
$(OBJDIR)/rpc_svco.obj\
|
|
|
261 |
$(OBJDIR)/rpc_tblo.obj\
|
|
|
262 |
$(OBJDIR)/rpc_util.obj\
|
|
|
263 |
$(OBJDIR)/rindex.obj
|
|
|
264 |
SHOBJS =
|
|
|
265 |
PROGOBJS =
|
|
|
266 |
TESTPROGOBJS =
|
|
|
267 |
LIBS =
|
|
|
268 |
SHDIRS =
|
|
|
269 |
SHLIBS =
|
|
|
270 |
PROGS = \
|
|
|
271 |
$(BINDIR)/rpcgen.exe
|
|
|
272 |
|
|
|
273 |
#--------- Special targets --------------------------------------------------
|
|
|
274 |
|
|
|
275 |
.PHONY: debug
|
|
|
276 |
debug:
|
|
|
277 |
@$(MAKE) -f $(GBE_PLATFORM).mk DEBUG=1 build
|
|
|
278 |
|
|
|
279 |
.PHONY: prod
|
|
|
280 |
prod:
|
|
|
281 |
@$(MAKE) -f $(GBE_PLATFORM).mk DEBUG=0 build
|
|
|
282 |
|
|
|
283 |
rpcgen: make_init $(BINDIR)/rpcgen.exe
|
|
|
284 |
|
|
|
285 |
|
|
|
286 |
|
|
|
287 |
.PHONY: package_setALL
|
|
|
288 |
package_setALL:
|
|
|
289 |
|
|
|
290 |
|
|
|
291 |
#--------- Standard rules ---------------------------------------------------
|
|
|
292 |
|
|
|
293 |
.PHONY: make_usage
|
|
|
294 |
make_usage:
|
|
|
295 |
@echo -e\
|
|
|
296 |
" make [SHOWENV=1] [LEAVETMP=1] [OPTIONS=[opt][,...]] {DEBUG=0|1} target(s)\n"\
|
|
|
297 |
"\n"\
|
|
|
298 |
"Build one or more of the following targets for the platform\n"\
|
|
|
299 |
"DOS16, recursively checking each configured sub directories.\n"\
|
|
|
300 |
"\n"\
|
|
|
301 |
"Valid targets include:\n"\
|
|
|
302 |
" all: build, install and package\n"\
|
|
|
303 |
" build: build everything\n"\
|
|
|
304 |
" debug: build all things for debug\n"\
|
|
|
305 |
" prod: build all things for production\n"\
|
|
|
306 |
" install: install of public usage\n"\
|
|
|
307 |
" depend: construct the dependencies\n"\
|
|
|
308 |
" lint: lints C and C++ source\n"\
|
|
|
309 |
" package: build all packages\n"\
|
|
|
310 |
" package-{set}: build specific package\n"\
|
|
|
311 |
" unpackage: remove all packages\n"\
|
|
|
312 |
" run_tests: Run the tests specified in the makefile\n"\
|
|
|
313 |
" makefiles: rebuild the makefile recursively\n"\
|
|
|
314 |
" rmlitter: remove litter (core, bak, tmp, err and cmd files)\n"\
|
|
|
315 |
" clean: delete generate, obj, libraries and programs\n"\
|
|
|
316 |
" unbuild: delete everything which can be remade\n"\
|
|
|
317 |
"\n"\
|
|
|
318 |
"Application targets:\n"\
|
|
|
319 |
" rpcgen\n"\
|
|
|
320 |
"\n"
|
|
|
321 |
|
|
|
322 |
.PHONY: make_init make_init2
|
|
|
323 |
make_init: make_init2 make_dir $(INITS)
|
|
|
324 |
make_init2:
|
|
|
325 |
@if [ -z "$(GBE_BIN)" ]; then echo GBE_BIN not available; exit 2; fi; \
|
|
|
326 |
if [ -z "$(GBE_PERL)" ]; then echo GBE_PERL not available; exit 2; fi; \
|
|
|
327 |
if [ -z "$(DEBUG)" ]; then echo DEBUG not defined; exit 2; fi
|
|
|
328 |
|
|
|
329 |
.PHONY: rmlitter
|
|
|
330 |
rmlitter:
|
|
|
331 |
-$(rm) -f core *.bak *.tmp *.err $(OBJDIR)/*.err $(OBJDIR)/*.cmd
|
|
|
332 |
|
|
|
333 |
.PHONY: make_dir
|
|
|
334 |
make_dir:
|
|
|
335 |
@$(mkdir) -p $(OBJDIR) $(BINDIR)
|
|
|
336 |
|
|
|
337 |
.PHONY: make_undir
|
|
|
338 |
make_undir: toolset_undir
|
|
|
339 |
-@$(rmdir) $(SHDIRS) $(OBJDIR) $(LIBDIR) $(BINDIR)
|
|
|
340 |
|
|
|
341 |
.PHONY: generate
|
|
|
342 |
generate: make_init
|
|
|
343 |
|
|
|
344 |
.PHONY: ungenerate
|
|
|
345 |
ungenerate: toolset_ungen
|
|
|
346 |
|
|
|
347 |
|
|
|
348 |
.PHONY: unobj
|
|
|
349 |
unobj: toolset_unobj
|
|
|
350 |
-$(rm) -f $(OBJS) $(SHOBJS) $(PROGOBJS) $(TESTPROGOBJS)
|
|
|
351 |
|
|
|
352 |
.PHONY: make_lib
|
|
|
353 |
make_lib:
|
|
|
354 |
|
|
|
355 |
.PHONY: make_shlib
|
|
|
356 |
make_shlib:
|
|
|
357 |
|
|
|
358 |
.PHONY: unmake_lib
|
|
|
359 |
unmake_lib: toolset_unlib
|
|
|
360 |
|
|
|
361 |
|
|
|
362 |
.PHONY: make_script
|
|
|
363 |
make_script:
|
|
|
364 |
|
|
|
365 |
.PHONY: unmake_script
|
|
|
366 |
unmake_script:
|
|
|
367 |
|
|
|
368 |
|
|
|
369 |
.PHONY: make_prog
|
|
|
370 |
make_prog: $(PROGS)
|
|
|
371 |
|
|
|
372 |
.PHONY: run_tests
|
|
|
373 |
run_tests: $(PROGS)
|
|
|
374 |
|
|
|
375 |
.PHONY: unmake_prog
|
|
|
376 |
unmake_prog: toolset_unprog unmake_script
|
|
|
377 |
-$(rm) -f $(PROGS)
|
|
|
378 |
|
|
|
379 |
.PHONY: make_test
|
|
|
380 |
make_test:
|
|
|
381 |
|
|
|
382 |
.PHONY: unmake_prog
|
|
|
383 |
unmake_test: toolset_untestprog unmake_script
|
|
|
384 |
|
|
|
385 |
|
|
|
386 |
install_class:
|
|
|
387 |
|
|
|
388 |
install_hdr:
|
|
|
389 |
|
|
|
390 |
install_lib:
|
|
|
391 |
|
|
|
392 |
install_shlib:
|
|
|
393 |
|
|
|
394 |
install_prog:
|
|
|
395 |
|
|
|
396 |
.PHONY: uninstall_prog
|
|
|
397 |
uninstall_prog:
|
|
|
398 |
|
|
|
399 |
.PHONY: uninstall_lib
|
|
|
400 |
uninstall_lib: uninstall_shlib
|
|
|
401 |
|
|
|
402 |
.PHONY: uninstall_shlib
|
|
|
403 |
uninstall_shlib:
|
|
|
404 |
|
|
|
405 |
.PHONY: uninstall_hdr
|
|
|
406 |
uninstall_hdr:
|
|
|
407 |
|
|
|
408 |
uninstall_class:
|
|
|
409 |
|
|
|
410 |
package_hdr:
|
|
|
411 |
|
|
|
412 |
package_class:
|
|
|
413 |
|
|
|
414 |
package_lib: package_shlib
|
|
|
415 |
|
|
|
416 |
package_shlib:
|
|
|
417 |
|
|
|
418 |
package_prog:
|
|
|
419 |
|
|
|
420 |
.PHONY: unpackage_prog
|
|
|
421 |
unpackage_prog:
|
|
|
422 |
|
|
|
423 |
.PHONY: unpackage_lib
|
|
|
424 |
unpackage_lib: unpackage_shlib
|
|
|
425 |
|
|
|
426 |
unpackage_shlib:
|
|
|
427 |
|
|
|
428 |
.PHONY: unpackage_hdr
|
|
|
429 |
unpackage_hdr:
|
|
|
430 |
|
|
|
431 |
|
|
|
432 |
#--------- Depend -----------------------------------------------------------
|
|
|
433 |
|
|
|
434 |
depend: $(OBJDIR)/depend
|
|
|
435 |
|
|
|
436 |
$(OBJDIR)/depend: DOS16.mk $(GBE_MAKELIB)
|
|
|
437 |
$(OBJDIR)/depend: $(CSRCS) $(CXXSRCS)
|
|
|
438 |
@echo [$@] Doing a make depend..
|
|
|
439 |
-@$(rm) -f $(OBJDIR)/depend
|
|
|
440 |
$(CCDEPEND)
|
|
|
441 |
-@$(touch) -f $(OBJDIR)/depend
|
|
|
442 |
undepend:
|
|
|
443 |
-@$(rm) -f $(OBJDIR)/depend
|
|
|
444 |
|
|
|
445 |
#--------- Automated tests --------------------------------------------------
|
|
|
446 |
|
|
|
447 |
|
|
|
448 |
#--------- Construct Programs -----------------------------------------------
|
|
|
449 |
|
|
|
450 |
$(BINDIR)/rpcgen.exe: \
|
|
|
451 |
$(OBJDIR)/rpc_clnt.obj \
|
|
|
452 |
$(OBJDIR)/rpc_cout.obj \
|
|
|
453 |
$(OBJDIR)/rpc_hout.obj \
|
|
|
454 |
$(OBJDIR)/rpc_main.obj \
|
|
|
455 |
$(OBJDIR)/rpc_pars.obj \
|
|
|
456 |
$(OBJDIR)/rpc_samp.obj \
|
|
|
457 |
$(OBJDIR)/rpc_scan.obj \
|
|
|
458 |
$(OBJDIR)/rpc_svco.obj \
|
|
|
459 |
$(OBJDIR)/rpc_tblo.obj \
|
|
|
460 |
$(OBJDIR)/rpc_util.obj \
|
|
|
461 |
$(OBJDIR)/rindex.obj
|
|
|
462 |
$(BINDIR)/rpcgen.exe:
|
|
|
463 |
$(LD)
|
|
|
464 |
|
|
|
465 |
$(BINDIR)/rpcgen.dep: $(SCM_PLATFORM).mk
|
|
|
466 |
$(LDDEPEND)
|
|
|
467 |
|
|
|
468 |
ifeq "$(IFLAG)" "2"
|
|
|
469 |
-include $(BINDIR)/rpcgen.dep
|
|
|
470 |
endif
|
|
|
471 |
|
|
|
472 |
rpcgen_ld += FORMAT DOS\\n
|
|
|
473 |
ifdef DEBUG
|
|
|
474 |
rpcgen_ld += DEBUG Watcom All\\n
|
|
|
475 |
endif
|
|
|
476 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_clnt)).obj\\n
|
|
|
477 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_cout)).obj\\n
|
|
|
478 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_hout)).obj\\n
|
|
|
479 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_main)).obj\\n
|
|
|
480 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_pars)).obj\\n
|
|
|
481 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_samp)).obj\\n
|
|
|
482 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_scan)).obj\\n
|
|
|
483 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_svco)).obj\\n
|
|
|
484 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_tblo)).obj\\n
|
|
|
485 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rpc_util)).obj\\n
|
|
|
486 |
rpcgen_ld += FILE $(subst /,\\\\,$(strip $(OBJDIR)/rindex)).obj\\n
|
|
|
487 |
rpcgen_ld += $(patsubst %,LIBPATH %\\n,$(subst /,\\\\,$(LIBDIRS)))\\n
|
|
|
488 |
rpcgen_ld += LIBRARY $(subst /,\\\\,$(strip $(watcom)/lib286/dos/clibl)).lib\\n
|
|
|
489 |
rpcgen_ld += LIBRARY $(subst /,\\\\,$(strip $(watcom)/lib286/dos/emu87)).lib\\n
|
|
|
490 |
rpcgen_ld += LIBRARY $(subst /,\\\\,$(strip $(watcom)/lib286/math87l)).lib\\n
|
|
|
491 |
rpcgen_ld += OPTION DosSeg\\n
|
|
|
492 |
rpcgen_ld += OPTION CaseExact\\n
|
|
|
493 |
rpcgen_ld += OPTION NoDefaultLibs\\n
|
|
|
494 |
rpcgen_ld += OPTION Map=$(subst /,\\\\,$(BINDIR)/rpcgen.map)\\n
|
|
|
495 |
rpcgen_ld += OPTION Verbose\\n
|
|
|
496 |
rpcgen_ld += NAME $(subst /,\\\\,$(BINDIR)/rpcgen.exe)\\n
|
|
|
497 |
|
|
|
498 |
rpcgen_dp += $(BINDIR)/rpcgen.exe: @(vpath2,$(watcom)/lib286/dos/clibl.lib,WCX86_LIB)\\n
|
|
|
499 |
rpcgen_dp += $(BINDIR)/rpcgen.exe: @(vpath2,$(watcom)/lib286/dos/emu87.lib,WCX86_LIB)\\n
|
|
|
500 |
rpcgen_dp += $(BINDIR)/rpcgen.exe: @(vpath2,$(watcom)/lib286/math87l.lib,WCX86_LIB)\\n
|
|
|
501 |
|
|
|
502 |
#--------- Construct Libraries ----------------------------------------------
|
|
|
503 |
|
|
|
504 |
|
|
|
505 |
#--------- Construct Objects ------------------------------------------------
|
|
|
506 |
|
|
|
507 |
$(OBJDIR)/rindex.obj: rindex.c DOS16.mk
|
|
|
508 |
$(CC)
|
|
|
509 |
$(OBJDIR)/rpc_clnt.obj: rpc_clnt.c DOS16.mk
|
|
|
510 |
$(CC)
|
|
|
511 |
$(OBJDIR)/rpc_cout.obj: rpc_cout.c DOS16.mk
|
|
|
512 |
$(CC)
|
|
|
513 |
$(OBJDIR)/rpc_hout.obj: rpc_hout.c DOS16.mk
|
|
|
514 |
$(CC)
|
|
|
515 |
$(OBJDIR)/rpc_main.obj: rpc_main.c DOS16.mk
|
|
|
516 |
$(CC)
|
|
|
517 |
$(OBJDIR)/rpc_pars.obj: rpc_pars.c DOS16.mk
|
|
|
518 |
$(CC)
|
|
|
519 |
$(OBJDIR)/rpc_samp.obj: rpc_samp.c DOS16.mk
|
|
|
520 |
$(CC)
|
|
|
521 |
$(OBJDIR)/rpc_scan.obj: rpc_scan.c DOS16.mk
|
|
|
522 |
$(CC)
|
|
|
523 |
$(OBJDIR)/rpc_svco.obj: rpc_svco.c DOS16.mk
|
|
|
524 |
$(CC)
|
|
|
525 |
$(OBJDIR)/rpc_tblo.obj: rpc_tblo.c DOS16.mk
|
|
|
526 |
$(CC)
|
|
|
527 |
$(OBJDIR)/rpc_util.obj: rpc_util.c DOS16.mk
|
|
|
528 |
$(CC)
|
|
|
529 |
|
|
|
530 |
#--------- Installations ----------------------------------------------------
|
|
|
531 |
|
|
|
532 |
|
|
|
533 |
#--------- Packaging --------------------------------------------------------
|
|
|
534 |
|
|
|
535 |
|
|
|
536 |
#--------- Makefile targets -------------------------------------------------
|
|
|
537 |
|
|
|
538 |
GBE_DEPENDS +=
|
|
|
539 |
ifndef NOSCMDEPEND
|
|
|
540 |
GBE_DEPENDS += \
|
|
|
541 |
e:/WORK/NET/makefile.pl\
|
|
|
542 |
/work/Devl/TOOLS/makelib.pl2\
|
|
|
543 |
/work/Devl/CFG/rules.win\
|
|
|
544 |
/work/Devl/CFG/Rules\
|
|
|
545 |
/work/Devl/CFG/PLATFORM/dos16.def\
|
|
|
546 |
/work/Devl/CFG/PLATFORM/DOS16\
|
|
|
547 |
/work/Devl/CFG/TOOLSET/wcdos.def\
|
|
|
548 |
/work/Devl/CFG/TOOLSET/wcdos.rul\
|
|
|
549 |
/work/Devl/CFG/TOOLSET/standard.rul\
|
|
|
550 |
/work/Devl/CFG/TOOLSET/wcdos
|
|
|
551 |
endif
|
|
|
552 |
|
|
|
553 |
.PHONY: makefile
|
|
|
554 |
$(GBE_PLATFORM).mk: $(GBE_DEPENDS)
|
|
|
555 |
@echo One or more SCM components have changed, "rebuild" required
|
|
|
556 |
@exit 10
|
|
|
557 |
|
|
|
558 |
.PHONY: makefiles
|
|
|
559 |
makefiles:
|
|
|
560 |
$(MAKE) -srf Makefile makefiles
|
|
|
561 |
|
|
|
562 |
.PHONY: unmakefiles
|
|
|
563 |
unmakefiles:
|
|
|
564 |
$(MAKE) -srf Makefile unmakefiles
|
|
|
565 |
|
|
|
566 |
#--------- Custom Rules -----------------------------------------------------
|
|
|
567 |
|
|
|
568 |
|
|
|
569 |
#--------- Toolset rules ----------------------------------------------------
|
|
|
570 |
|
|
|
571 |
TOOLSETGENERATED = \
|
|
|
572 |
$(BINDIR)/rpcgen.ld\
|
|
|
573 |
$(BINDIR)/rpcgen.dep\
|
|
|
574 |
$(BINDIR)/rpcgen.map
|
|
|
575 |
|
|
|
576 |
.PHONY: toolset_ungen
|
|
|
577 |
toolset_ungen:
|
|
|
578 |
-$(rm) -f $(TOOLSETGENERATED)
|
|
|
579 |
|
|
|
580 |
.PHONY: toolset_unobj
|
|
|
581 |
toolset_unobj:
|
|
|
582 |
|
|
|
583 |
|
|
|
584 |
.PHONY: toolset_unlib
|
|
|
585 |
toolset_unlib:
|
|
|
586 |
|
|
|
587 |
|
|
|
588 |
.PHONY: toolset_unprog
|
|
|
589 |
toolset_unprog:
|
|
|
590 |
|
|
|
591 |
|
|
|
592 |
.PHONY: toolset_untestprog
|
|
|
593 |
toolset_untestprog:
|
|
|
594 |
|
|
|
595 |
|
|
|
596 |
.PHONY: toolset_undir
|
|
|
597 |
toolset_undir:
|
|
|
598 |
|
|
|
599 |
|
|
|
600 |
#..
|
|
|
601 |
# Copyright (c) 1996-2001 ERG Transit Systems.
|
|
|
602 |
#
|
|
|
603 |
# File: TOOLSET/wcdos.rul[e]
|
|
|
604 |
# Contents: WATCOM/DOS rules
|
|
|
605 |
#
|
|
|
606 |
# Revision History:
|
|
|
607 |
# xx/08/99 APY Created
|
|
|
608 |
# 22/03/00 APY NODEPDIRS
|
|
|
609 |
# 08/06/00 APY TS_TASM_AS
|
|
|
610 |
# 14/06/00 APY LDDEPEND
|
|
|
611 |
# 13/11/01 APY ; appended to several directives, forcing use of
|
|
|
612 |
# 'sh.exe' during execution. Required by WIN32
|
|
|
613 |
# toolsets,
|
|
|
614 |
###############################################################################
|
|
|
615 |
# Additional options above those supported by the basic build
|
|
|
616 |
# environment are...
|
|
|
617 |
#
|
|
|
618 |
# TS_MASM_AS:
|
|
|
619 |
# If this variable is defined then the masm assembler will be
|
|
|
620 |
# used rather than the watcom one.
|
|
|
621 |
#
|
|
|
622 |
# TS_TASM_AS:
|
|
|
623 |
# If this variable is defined then the tasm assembler will be
|
|
|
624 |
# used rather than the watcom one.
|
|
|
625 |
#
|
|
|
626 |
###############################################################################
|
|
|
627 |
|
|
|
628 |
###############################################################################
|
|
|
629 |
#.. Remove "undef" warnings
|
|
|
630 |
#
|
|
|
631 |
cc_includes +=
|
|
|
632 |
cc_defines +=
|
|
|
633 |
cxx_includes +=
|
|
|
634 |
cxx_defines +=
|
|
|
635 |
|
|
|
636 |
###############################################################################
|
|
|
637 |
#.. C Compiler definition
|
|
|
638 |
#
|
|
|
639 |
cc = @export INCLUDE; INCLUDE='\
|
|
|
640 |
$(patsubst %,%;,$(INCDIRS))\
|
|
|
641 |
$(patsubst %,%;,$(cc_includes))\
|
|
|
642 |
$(patsubst %,%;,$(wc_includes))';\
|
|
|
643 |
export WCC; WCC='\
|
|
|
644 |
$(patsubst %, %,$(CFLAGS))\
|
|
|
645 |
$(patsubst %, -d%,$(cc_defines))\
|
|
|
646 |
$(patsubst %, %,$(wc_flags))';\
|
|
|
647 |
wcc
|
|
|
648 |
cc_init =
|
|
|
649 |
cc_o_switch = $(subst /,\\,-fo=$@)
|
|
|
650 |
cc_source = $(subst /,\\,$<) > $(subst /,\\,$(basename $<)).err 2>&1
|
|
|
651 |
cc_cmdfile =
|
|
|
652 |
cc_flags =
|
|
|
653 |
cc_term = ; # ; force use of 'sh.exe'
|
|
|
654 |
|
|
|
655 |
wc_includes += $(watcom)/h
|
|
|
656 |
|
|
|
657 |
wc_flags = -ml -ei -zq -fpi
|
|
|
658 |
#wc_flags += -s
|
|
|
659 |
ifeq "$(DEBUG)" "1"
|
|
|
660 |
wc_flags += -dDEBUG -d2
|
|
|
661 |
else
|
|
|
662 |
wc_flags += -ox
|
|
|
663 |
endif
|
|
|
664 |
ifdef ALVL
|
|
|
665 |
wc_flags += -dALVL=$(ALVL)
|
|
|
666 |
endif
|
|
|
667 |
ifdef DLVL
|
|
|
668 |
wc_flags += -dDLVL=$(DLVL)
|
|
|
669 |
endif
|
|
|
670 |
|
|
|
671 |
define cc_pre
|
|
|
672 |
@echo [\$<] compiling..
|
|
|
673 |
endef
|
|
|
674 |
|
|
|
675 |
define cc_post
|
|
|
676 |
endef
|
|
|
677 |
|
|
|
678 |
#.. C/C++ dependencies
|
|
|
679 |
#
|
|
|
680 |
wc_depend = -D__STDC__ -D__WATCOMC__=1000 -D__LARGE__ -DMSDOS
|
|
|
681 |
ifeq "$(DEBUG)" "1"
|
|
|
682 |
wc_depend += -DDEBUG
|
|
|
683 |
endif
|
|
|
684 |
ifdef ALVL
|
|
|
685 |
wc_depend += -DALVL=$(ALVL)
|
|
|
686 |
endif
|
|
|
687 |
ifdef DLVL
|
|
|
688 |
wc_depend += -DDLVL=$(DLVL)
|
|
|
689 |
endif
|
|
|
690 |
|
|
|
691 |
ccdep = @$(SCM_BIN)/mkdepend
|
|
|
692 |
ccdep_init =
|
|
|
693 |
ccdep_o_switch = -f -
|
|
|
694 |
ccdep_source = $(filter %.c %.cc %.cpp, $+) > $(subst /,\\,$@) 2> depend.err
|
|
|
695 |
ccdep_flags = -MM \
|
|
|
696 |
$(patsubst %,%,$(CFLAGS)) \
|
|
|
697 |
$(patsubst %,-D%,$(cc_defines)) \
|
|
|
698 |
$(patsubst %,%,$(wc_depend)) \
|
|
|
699 |
$(patsubst %,-I %,$(INCDIRS)) \
|
|
|
700 |
$(patsubst %,-Y %,$(cc_includes)) \
|
|
|
701 |
$(patsubst %,-Y %,$(wc_includes)) \
|
|
|
702 |
$(patsubst %,-Y %,$(NODEPDIRS))
|
|
|
703 |
ccdep_pre =
|
|
|
704 |
ccdep_post =
|
|
|
705 |
|
|
|
706 |
#.. C++ Compiler definition
|
|
|
707 |
#
|
|
|
708 |
cxx = @export INCLUDE; INCLUDE='\
|
|
|
709 |
$(patsubst %,%;,$(INCDIRS))\
|
|
|
710 |
$(patsubst %,%;,$(cc_includes))\
|
|
|
711 |
$(patsubst %,%;,$(wc_includes))';\
|
|
|
712 |
export WCC; WCC='\
|
|
|
713 |
$(patsubst %, %,$(CXXFLAGS))\
|
|
|
714 |
$(patsubst %, -d%,$(cc_defines))\
|
|
|
715 |
$(patsubst %, %,$(wc_flags))';\
|
|
|
716 |
wcc
|
|
|
717 |
cxx_init =
|
|
|
718 |
cxx_o_switch = $(subst /,\\,-fo=$@)
|
|
|
719 |
cxx_source = $(subst /,\\,$<) > $(subst /,\\,$(basename $<)).err 2>&1
|
|
|
720 |
cxx_cmdfile =
|
|
|
721 |
cxx_flags =
|
|
|
722 |
cxx_term = ; # ; force use of 'sh.exe'
|
|
|
723 |
|
|
|
724 |
define cxx_pre
|
|
|
725 |
@echo [\$<] compiling..
|
|
|
726 |
endef
|
|
|
727 |
|
|
|
728 |
define cxx_post
|
|
|
729 |
endef
|
|
|
730 |
|
|
|
731 |
|
|
|
732 |
###############################################################################
|
|
|
733 |
#.. Assembler definition
|
|
|
734 |
#
|
|
|
735 |
|
|
|
736 |
ifdef TS_TASM_AS
|
|
|
737 |
#.. Assembler (TASM)
|
|
|
738 |
#
|
|
|
739 |
as = tasm
|
|
|
740 |
as_init =
|
|
|
741 |
as_i_switch = -i
|
|
|
742 |
as_flags =
|
|
|
743 |
as_o_switch =
|
|
|
744 |
as_source = $(subst /,\\,$<), $(subst /,\\,$@) @$(as_cmdfile)
|
|
|
745 |
as_cmdfile = $(subst /,\\,$(basename $@).cmd)
|
|
|
746 |
as_term = ; # ; force use of 'sh.exe'
|
|
|
747 |
|
|
|
748 |
as_includes +=
|
|
|
749 |
as_defines +=
|
|
|
750 |
|
|
|
751 |
tasm_flags = -mx -t -w2
|
|
|
752 |
ifeq "$(DEBUG)" "1"
|
|
|
753 |
tasm_flags += -zi /dDEBUG
|
|
|
754 |
endif
|
|
|
755 |
ifdef DLVL
|
|
|
756 |
tasm_flags += -dDLVL=$(DLVL)
|
|
|
757 |
endif
|
|
|
758 |
ifdef ALVL
|
|
|
759 |
tasm_flags += -dALVL=$(ALVL)
|
|
|
760 |
endif
|
|
|
761 |
as_defines := $(addprefix -d,$(as_defines))
|
|
|
762 |
as_defines += $(tasm_flags)
|
|
|
763 |
|
|
|
764 |
else
|
|
|
765 |
ifdef TS_MASM_AS
|
|
|
766 |
#.. Assembler (Microsoft 6.11)
|
|
|
767 |
#
|
|
|
768 |
as = ml
|
|
|
769 |
as_init =
|
|
|
770 |
as_i_switch = /I
|
|
|
771 |
as_flags = @$(as_cmdfile)
|
|
|
772 |
as_o_switch = /Fo$(subst /,\\,$@)
|
|
|
773 |
as_source = $(subst /,\\,$<)
|
|
|
774 |
as_cmdfile = $(subst /,\\,$(basename $@).cmd)
|
|
|
775 |
as_term = ; # ; force use of 'sh.exe'
|
|
|
776 |
|
|
|
777 |
as_includes += $(masm)/include
|
|
|
778 |
as_defines +=
|
|
|
779 |
|
|
|
780 |
ml_flags = /c /Zm /Cp /X /nologo
|
|
|
781 |
ifeq "$(DEBUG)" "1"
|
|
|
782 |
ml_flags += /W2 /Zd /DDEBUG
|
|
|
783 |
endif
|
|
|
784 |
ifdef DLVL
|
|
|
785 |
ml_flags += /DDLVL=$(DLVL)
|
|
|
786 |
endif
|
|
|
787 |
ifdef ALVL
|
|
|
788 |
ml_flags += /DALVL=$(ALVL)
|
|
|
789 |
endif
|
|
|
790 |
as_defines := $(addprefix /D,$(as_defines))
|
|
|
791 |
as_defines += $(ml_flags)
|
|
|
792 |
|
|
|
793 |
else
|
|
|
794 |
#... WASM (default)
|
|
|
795 |
#
|
|
|
796 |
ifndef TS_WASM_AS
|
|
|
797 |
TS_WASM_AS = 1
|
|
|
798 |
endif
|
|
|
799 |
as = wasm
|
|
|
800 |
as_init =
|
|
|
801 |
as_i_switch = -i=
|
|
|
802 |
as_flags = @$(as_cmdfile)
|
|
|
803 |
as_o_switch = /fo=$(subst /,\\,$@)
|
|
|
804 |
as_source = $(subst /,\\,$<)
|
|
|
805 |
as_cmdfile = $(subst /,\\,$(basename $@).cmd)
|
|
|
806 |
as_term = ; # ; force use of 'sh.exe'
|
|
|
807 |
|
|
|
808 |
as_includes +=
|
|
|
809 |
as_defines +=
|
|
|
810 |
|
|
|
811 |
wasm_flags = /we /zq
|
|
|
812 |
ifdef DLVL
|
|
|
813 |
wasm_flags += -dDLVL=$(DLVL)
|
|
|
814 |
endif
|
|
|
815 |
ifdef ALVL
|
|
|
816 |
wasm_flags += -dALVL=$(ALVL)
|
|
|
817 |
endif
|
|
|
818 |
ifeq "$(DEBUG)" "1"
|
|
|
819 |
wasm_flags += /dDEBUG /d2
|
|
|
820 |
endif
|
|
|
821 |
as_defines := $(addprefix /d,$(as_defines))
|
|
|
822 |
as_defines += $(wasm_flags)
|
|
|
823 |
|
|
|
824 |
endif #MASM
|
|
|
825 |
endif #TASM
|
|
|
826 |
|
|
|
827 |
define as_pre
|
|
|
828 |
@$(cmdfile) -ko$(as_cmdfile) "\
|
|
|
829 |
$(patsubst %,%\\n,$(ASFLAGS)) \
|
|
|
830 |
$(patsubst %,%\\n,$(as_defines)) \
|
|
|
831 |
$(patsubst %,$(as_i_switch)%\\n,$(subst /,\\\\,$(INCDIRS))) \
|
|
|
832 |
$(patsubst %,$(as_i_switch)%\\n,$(subst /,\\\\,$(as_includes)))"
|
|
|
833 |
endef
|
|
|
834 |
|
|
|
835 |
ifndef LEAVETMP
|
|
|
836 |
define as_post
|
|
|
837 |
@$(rm) -f $(as_cmdfile)
|
|
|
838 |
endef
|
|
|
839 |
else
|
|
|
840 |
define as_post
|
|
|
841 |
endef
|
|
|
842 |
endif #LEAVETMP
|
|
|
843 |
|
|
|
844 |
|
|
|
845 |
#.. Archiver
|
|
|
846 |
#
|
|
|
847 |
ar = wlib
|
|
|
848 |
ar_init =
|
|
|
849 |
ar_cmdfile = $(subst /,\\,$(basename $@).ar)
|
|
|
850 |
ar_flags = -b -c -n -q -p=512
|
|
|
851 |
ar_o_switch = $(subst /,\\,$@) @$(ar_cmdfile)
|
|
|
852 |
ar_term = ; # ; force use of 'sh.exe'
|
|
|
853 |
|
|
|
854 |
define ar_pre
|
|
|
855 |
@$(cmdfile) -ko$(ar_cmdfile) \
|
|
|
856 |
"$(patsubst %,%\\n,$(subst /,\\\\,$^))"
|
|
|
857 |
endef
|
|
|
858 |
|
|
|
859 |
ifndef LEAVETMP
|
|
|
860 |
define ar_post
|
|
|
861 |
@$(rm) -f $(ar_cmdfile)
|
|
|
862 |
endef
|
|
|
863 |
else
|
|
|
864 |
define ar_post
|
|
|
865 |
endef
|
|
|
866 |
endif
|
|
|
867 |
|
|
|
868 |
#.. Linker
|
|
|
869 |
#
|
|
|
870 |
ld = wlink
|
|
|
871 |
ld_cmdfile = $(subst /,\\,$(basename $@).ld)
|
|
|
872 |
ld_flags = @$(ld_cmdfile)
|
|
|
873 |
ld_o_switch =
|
|
|
874 |
ld_term = ; # ; force use of 'sh.exe'
|
|
|
875 |
|
|
|
876 |
define ld_pre
|
|
|
877 |
@export WCX86_LIB; \
|
|
|
878 |
WCX86_LIB="$(subst $(space),;,$(LIBDIRS))"; \
|
|
|
879 |
$(cmdfile) -ko$(ld_cmdfile) "$($(notdir $(basename $@))_ld)"
|
|
|
880 |
endef
|
|
|
881 |
|
|
|
882 |
ifndef LEAVETMP
|
|
|
883 |
define ld_post
|
|
|
884 |
@$(rm) -f $(ld_cmdfile)
|
|
|
885 |
endef
|
|
|
886 |
else
|
|
|
887 |
define ld_post
|
|
|
888 |
endef
|
|
|
889 |
endif
|
|
|
890 |
|
|
|
891 |
define LDDEPEND
|
|
|
892 |
@export WCX86_LIB; \
|
|
|
893 |
WCX86_LIB="$(subst $(space),;,$(LIBDIRS))"; \
|
|
|
894 |
$(cmdfile) -ko$(BINDIR)/$(notdir $(basename $@)).dep "$($(notdir $(basename $@))_dp)"
|
|
|
895 |
endef
|
|
|
896 |
|
|
|
897 |
#
|
|
|
898 |
###############################################################################
|
|
|
899 |
# Copyright (c) ERG Electronics Ltd. 1996-99
|
|
|
900 |
#
|
|
|
901 |
# File: TOOLSET/standard.rul[e]
|
|
|
902 |
#
|
|
|
903 |
# Contents: Toplevel toolset driver for doing stuff
|
|
|
904 |
#
|
|
|
905 |
# CC Compile a C source file
|
|
|
906 |
# CCDEPEND
|
|
|
907 |
# CXX Compile a C++ source file
|
|
|
908 |
# CCDEPEND
|
|
|
909 |
# AS Compile an assembler file
|
|
|
910 |
# ASDEPEND
|
|
|
911 |
# AR Archive
|
|
|
912 |
# LD Linker
|
|
|
913 |
# SHLD Linked (shared library)
|
|
|
914 |
#
|
|
|
915 |
# Revision History:
|
|
|
916 |
# `95 JONW CMOS dev env
|
|
|
917 |
# xx/08/99 APY Ported
|
|
|
918 |
# 10/03/00 APY Modified 'cc' output filtering
|
|
|
919 |
# 13/11/00 ${exe} now embeddes '.' if required.
|
|
|
920 |
# 29/11/00 SHLD and SHLDDEPEND
|
|
|
921 |
# 16/11/01 xx_term
|
|
|
922 |
#
|
|
|
923 |
###############################################################################
|
|
|
924 |
|
|
|
925 |
###############################################################################
|
|
|
926 |
# Compile a C file.
|
|
|
927 |
###############################################################################
|
|
|
928 |
|
|
|
929 |
cc_term +=
|
|
|
930 |
|
|
|
931 |
ifdef cc_error_filter
|
|
|
932 |
ifdef cc_redirect
|
|
|
933 |
define CC
|
|
|
934 |
@$(cc_pre)
|
|
|
935 |
@$(show_environment)
|
|
|
936 |
$(cc) $(cc_flags) $(cc_o_switch) $(cc_source) > $(basename $@).err $(cc_term)
|
|
|
937 |
@$(cc_error_filter) < $(basename $@).err
|
|
|
938 |
@$(cc_post)
|
|
|
939 |
endef
|
|
|
940 |
else
|
|
|
941 |
ifdef cc_redirect_stderr
|
|
|
942 |
define CC
|
|
|
943 |
@$(cc_pre)
|
|
|
944 |
@$(show_environment)
|
|
|
945 |
$(cc) $(cc_flags) $(cc_o_switch) $(cc_source) 2>&1 | $(cc_error_filter) $(cc_term)
|
|
|
946 |
@$(cc_post)
|
|
|
947 |
endef
|
|
|
948 |
else
|
|
|
949 |
define CC
|
|
|
950 |
@$(cc_pre)
|
|
|
951 |
@$(show_environment)
|
|
|
952 |
$(cc) $(cc_flags) $(cc_o_switch) $(cc_source) | $(cc_error_filter) $(cc_term)
|
|
|
953 |
@$(cc_post)
|
|
|
954 |
endef
|
|
|
955 |
endif
|
|
|
956 |
endif
|
|
|
957 |
else
|
|
|
958 |
define CC
|
|
|
959 |
@$(cc_pre)
|
|
|
960 |
$(cc) $(cc_flags) $(cc_o_switch) $(cc_source) $(cc_term)
|
|
|
961 |
@$(cc_post)
|
|
|
962 |
endef
|
|
|
963 |
endif
|
|
|
964 |
|
|
|
965 |
$(OBJDIR)/%.${o}: %.c $(cc_init)
|
|
|
966 |
$(CC)
|
|
|
967 |
|
|
|
968 |
define CCDEPEND
|
|
|
969 |
@$(ccdep_pre)
|
|
|
970 |
@$(show_environment)
|
|
|
971 |
$(ccdep) $(ccdep_flags) $(ccdep_o_switch) $(ccdep_source) $(cc_term)
|
|
|
972 |
@$(ccdep_post)
|
|
|
973 |
endef
|
|
|
974 |
|
|
|
975 |
|
|
|
976 |
###############################################################################
|
|
|
977 |
# Compile a C++ file.
|
|
|
978 |
###############################################################################
|
|
|
979 |
|
|
|
980 |
cxx_term +=
|
|
|
981 |
|
|
|
982 |
ifdef cxx_error_filter
|
|
|
983 |
ifdef cxx_redirect
|
|
|
984 |
define CXX
|
|
|
985 |
@$(cxx_pre)
|
|
|
986 |
@$(show_environment)
|
|
|
987 |
$(cxx) $(cxx_flags) $(cxx_o_switch) $(cxx_source) > $(basename $@).err $(cxx_term)
|
|
|
988 |
@$(cxx_error_filter) < $(basename $@).err
|
|
|
989 |
@$(rm) $(basename $@).err
|
|
|
990 |
@$(cxx_post)
|
|
|
991 |
endef
|
|
|
992 |
else
|
|
|
993 |
ifdef cxx_redirect_stderr
|
|
|
994 |
define CXX
|
|
|
995 |
@$(cxx_pre)
|
|
|
996 |
@$(show_environment)
|
|
|
997 |
$(cxx) $(cxx_flags) $(cxx_o_switch) $(cxx_source) 2>&1 | $(cxx_error_filter) $(cxx_term)
|
|
|
998 |
@$(cxx_post)
|
|
|
999 |
endef
|
|
|
1000 |
else
|
|
|
1001 |
define CXX
|
|
|
1002 |
@$(cxx_pre)
|
|
|
1003 |
@$(show_environment)
|
|
|
1004 |
$(cxx) $(cxx_flags) $(cxx_o_switch) $(cxx_source) | $(cxx_error_filter) $(cxx_term)
|
|
|
1005 |
@$(cxx_post)
|
|
|
1006 |
endef
|
|
|
1007 |
endif
|
|
|
1008 |
endif
|
|
|
1009 |
else
|
|
|
1010 |
define CXX
|
|
|
1011 |
@$(cxx_pre)
|
|
|
1012 |
$(cxx) $(cxx_flags) $(cxx_o_switch) $(cxx_source) $(cxx_term)
|
|
|
1013 |
@$(cxx_post)
|
|
|
1014 |
endef
|
|
|
1015 |
endif
|
|
|
1016 |
|
|
|
1017 |
$(OBJDIR)/%.${o}: %.cc $(cxx_init)
|
|
|
1018 |
$(CXX)
|
|
|
1019 |
|
|
|
1020 |
$(OBJDIR)/%.${o}: %.cpp $(cxx_init)
|
|
|
1021 |
$(CXX)
|
|
|
1022 |
|
|
|
1023 |
###############################################################################
|
|
|
1024 |
# Assemble a file of assembler.
|
|
|
1025 |
###############################################################################
|
|
|
1026 |
|
|
|
1027 |
as_term +=
|
|
|
1028 |
|
|
|
1029 |
|
|
|
1030 |
ifdef as_error_filter
|
|
|
1031 |
ifdef as_redirect
|
|
|
1032 |
define AS
|
|
|
1033 |
@$(as_pre)
|
|
|
1034 |
@$(show_environment)
|
|
|
1035 |
$(as) $(as_flags) $(as_o_switch) $(as_source) > $(basename $@).as $(as_term)
|
|
|
1036 |
@$(as_error_filter) < $(basename $@).as
|
|
|
1037 |
@$(rm) $(basename $@).as
|
|
|
1038 |
@$(as_post)
|
|
|
1039 |
endef
|
|
|
1040 |
else
|
|
|
1041 |
define AS
|
|
|
1042 |
@$(as_pre)
|
|
|
1043 |
@$(show_environment)
|
|
|
1044 |
$(as) $(as_flags) $(as_o_switch) $(as_source) | $(as_error_filer) $(as_term)
|
|
|
1045 |
@$(as_post)
|
|
|
1046 |
endef
|
|
|
1047 |
endif
|
|
|
1048 |
else
|
|
|
1049 |
define AS
|
|
|
1050 |
@$(as_pre)
|
|
|
1051 |
$(as) $(as_flags) $(as_o_switch) $(as_source) $(as_term)
|
|
|
1052 |
@$(as_post)
|
|
|
1053 |
endef
|
|
|
1054 |
endif
|
|
|
1055 |
|
|
|
1056 |
$(OBJDIR)/%.${o}: %.${s} $(as_init)
|
|
|
1057 |
$(AS)
|
|
|
1058 |
|
|
|
1059 |
###############################################################################
|
|
|
1060 |
# Build a library
|
|
|
1061 |
###############################################################################
|
|
|
1062 |
|
|
|
1063 |
ar_term +=
|
|
|
1064 |
|
|
|
1065 |
define AR
|
|
|
1066 |
@$(ar_pre)
|
|
|
1067 |
@$(show_environment)
|
|
|
1068 |
$(ar) $(ar_flags) $(ar_o_switch) $(ar_term)
|
|
|
1069 |
@$(ar_post)
|
|
|
1070 |
endef
|
|
|
1071 |
|
|
|
1072 |
ifdef ar_depend
|
|
|
1073 |
$(BINDIR)/%.${a}: $(ar_depend) $(ar_init)
|
|
|
1074 |
$(AR)
|
|
|
1075 |
endif
|
|
|
1076 |
|
|
|
1077 |
###############################################################################
|
|
|
1078 |
# Generate a large relocatable object module from a bunch of object
|
|
|
1079 |
# modules. Only bother with this if the compiler suite defines a
|
|
|
1080 |
# `rel' extension for file names.
|
|
|
1081 |
###############################################################################
|
|
|
1082 |
|
|
|
1083 |
rel_ld_term +=
|
|
|
1084 |
|
|
|
1085 |
ifdef rel
|
|
|
1086 |
ifneq (${a},${rel})
|
|
|
1087 |
#
|
|
|
1088 |
# Only have the rules for a large relocatable build if it's not
|
|
|
1089 |
# the same as a normal library build.
|
|
|
1090 |
#
|
|
|
1091 |
$(BINDIR)/%.$(rel): $(rel_ld_init)
|
|
|
1092 |
@$(rel_ld_pre)
|
|
|
1093 |
@$(show_environment)
|
|
|
1094 |
$(rel_ld) $(rel_ldflags) $(rel_ld_o_switch) $(rel_ld_term)
|
|
|
1095 |
@$(rel_ld_post)
|
|
|
1096 |
endif
|
|
|
1097 |
endif
|
|
|
1098 |
|
|
|
1099 |
###############################################################################
|
|
|
1100 |
# Link a shared library
|
|
|
1101 |
###############################################################################
|
|
|
1102 |
|
|
|
1103 |
shld_term +=
|
|
|
1104 |
|
|
|
1105 |
ifdef shld
|
|
|
1106 |
define SHLD
|
|
|
1107 |
@$(shld_pre)
|
|
|
1108 |
@$(show_environment)
|
|
|
1109 |
$(shld) $(shld_flags) $(shld_o_switch) $(shld_term)
|
|
|
1110 |
@$(shld_post)
|
|
|
1111 |
endef
|
|
|
1112 |
endif
|
|
|
1113 |
|
|
|
1114 |
###############################################################################
|
|
|
1115 |
# Link an executable
|
|
|
1116 |
###############################################################################
|
|
|
1117 |
|
|
|
1118 |
ld_term +=
|
|
|
1119 |
|
|
|
1120 |
define LD
|
|
|
1121 |
@$(ld_pre)
|
|
|
1122 |
@$(show_environment)
|
|
|
1123 |
$(ld) $(ld_flags) $(ld_o_switch) $(ld_term)
|
|
|
1124 |
@$(ld_post)
|
|
|
1125 |
endef
|
|
|
1126 |
|
|
|
1127 |
ifdef ld_depend
|
|
|
1128 |
$(BINDIR)/%$(exe): $(ld_depend) $(ld_init)
|
|
|
1129 |
$(LD)
|
|
|
1130 |
endif
|
|
|
1131 |
|
|
|
1132 |
#
|
|
|
1133 |
|
|
|
1134 |
#--------- Dependencies -----------------------------------------------------
|
|
|
1135 |
|
|
|
1136 |
ifndef NODEPEND
|
|
|
1137 |
ifdef IFLAG
|
|
|
1138 |
ifneq "$(IFLAG)" "0"
|
|
|
1139 |
-include $(OBJDIR)/depend
|
|
|
1140 |
endif
|
|
|
1141 |
endif
|
|
|
1142 |
endif
|
|
|
1143 |
|
|
|
1144 |
#DO NOT DELETE - mkdepend depends on it
|