Subversion Repositories DevTools

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
227 dpurdie 1
# -*- mode: mak; -*-
2
###############################################################################
3
# File:         TOOLSET/vcwin32.rul[e]
4
# Contents:     Visual C/C++ WIN32 rules
5
#
6
# Version   Who      Date        Description#
7
#           APY      xx/08/99    Created
8
#                    22/03/00    NODEPDIRS
9
#                    30/06/01    V/C++ 6.0/CL 12.xx support
10
#                    23/08/01    Import INCLUDE and LIB
11
#                    12/03/04    mkdepend -b -o -p
12
#                    20/05/04    armerge -t
13
#                    04/10/04    PCLINT support
14
#
15
# $Source: /cvsroot/etm/devl/CFG/TOOLSET/VCWIN32.RUL,v $
16
# $Revision: 1.11 $ $Date: 2004/10/08 03:07:03 $ $State: Exp $
17
# $Author: ayoung $ $Locker:  $
18
#............................................................................#
19
 
20
###############################################################################
21
#..     Remove "undef" warnings
22
#
23
cc_includes	+=
24
cc_defines	+=
25
cxx_includes	+=
26
cxx_defines	+=
27
purecov_ld_flags +=
28
 
29
###############################################################################
30
#..     Parse user options
31
#       Global options already parsed
32
#       These options extend the global options
33
#
34
 
35
ifdef OPTIONS
36
 
37
ifneq "$(findstring purify,$(OPTIONS))" ""      # Enable purify
38
else
39
ifneq "$(findstring purecov,$(OPTIONS))" ""     # Enable pure coverage
40
purecov_ld_flags += FIXED:NO
41
endif
42
endif
43
 
44
ifneq "$(findstring ccdepend,$(OPTIONS))" ""    # Build depends using CC
45
endif
46
 
47
ifneq "$(findstring wall,$(OPTIONS))" ""        # Enable all warnings
48
USE_WALL	= 1
49
endif
50
 
51
ifneq "$(findstring gensbr,$(OPTIONS))" ""     # Generate Source Browser Files
52
GEN_SBR_FILES	= 1
53
endif
54
 
55
endif
56
 
255 dpurdie 57
################################################################################
58
#   Define a macro to assist in selecting compiler options based on the
59
#   type of compiler being being used. New versions of compilers will deprecate
60
#   options or replace some
61
#
62
#   select_co	- Select Compiler Option
63
#		- Arguments are for the different compilers as defined by VSCOMPILER
64
#		  VSCOMPILER in the range 1.. as defined in the .PL file
65
#
66
#		  Current usage
67
#			1 - vc6
68
#			2 - vc7
69
#			3 - vc8
70
#
71
$(if $(VSCOMPILER),,$(error VCWIN32 toolset requires VSCOMPILER to be defined))
72
select_co = $(subst --,,$(word $(VSCOMPILER),$1 $2 $3))
73
 
227 dpurdie 74
###############################################################################
75
#   Standard library paths
76
#   Export LIB as this is used by the compiler (#import) as well as the
77
#   librarian and the linker. It is also used by the library generation
78
#   process.
79
#
255 dpurdie 80
#	VC_LIB	    - Lib paths from Compiler toolkit
81
#		    - ';' seperated path list
82
#		    - Uses \ or / as a dir sep
83
#		    - Uses real spaces in pathnames
84
#		    - Should be Absolute Paths
85
#                   
86
#	LIBDIRS	    - Lib paths from JATS
87
#		    - Space seperated path list
88
#		    - Uses / as dir sep
89
#		    - Must not contain spaces
90
#		    - Will be Relative
91
#
92
#	ALL_LIBDIRS and LIB
93
#		    - Only contain valid paths
94
#		      VS2005 will complain about bad LIB entries
95
#		      Use $(wildcard ...) to limit to test for existence
96
#		    - Contain absolute paths
97
#		      msdev/devenv don't work with relative paths
98
#		      Use $(abspath ...) to convert
99
#
100
#	ALL_LIBDIRS - Used internally
101
#		    - Space seperated path list
102
#		    - Uses / as dir sep
103
#		    - Uses %20 as a altspace in pathnames
104
#                   
105
#	LIB         - Exported to tools
106
#		    - ';' seperated path list
107
#		    - Uses \ as a dir sep
108
#		    - Uses real spaces in pathnames
227 dpurdie 109
#..
110
 
255 dpurdie 111
#
112
#   Work around for a bug in make 3.81 where abspath assumes that the input
113
#   is a relative path. The work around checks for paths that have a : or start
114
#   with a '/ - and assumes these are absolute.
115
#   It will only call makes 'abspath' for relative paths.
116
#
117
myabspath = $(foreach dir,$1,$(call myabs1path,$(dir)))
118
myabs1path = $(if $(or $(findstring :,$1),$(filter /%,$1)),$1,$(abspath $1))
227 dpurdie 119
 
255 dpurdie 120
vc_libs     := $(subst ;,$(space),$(subst \,/,$(subst $(space),$(spacealt),$(VC_LIB))))
121
ALL_LIBDIRS := $(wildcard $(call myabspath,$(LIBDIRS))) $(vc_libs)
122
LIB         := $(subst $(spacealt),$(space),$(subst $(space),$(empty),$(patsubst %,%;,$(subst /,\,$(ALL_LIBDIRS)))))
227 dpurdie 123
export LIB
124
 
255 dpurdie 125
#one_per_line = $(foreach aa,$2,$(info $1 :: $(subst $(spacealt),$(space),$(aa))))
126
#$(call one_per_line,Good LIBDIRS,$(ALL_LIBDIRS))
127
 
227 dpurdie 128
###############################################################################
129
#..     Compiler definitions
130
#
131
 
132
#..     C Compiler definition
133
#
134
 
135
	# Standard defines
136
	#
137
	#..
138
vc_defines	+= -DWIN32 -D_WIN32
139
 
140
ifdef USE_JATS_V1
141
#.. These are the swicthes used by Jats Version-1
142
#
143
vc_defines  += -D_WIN32_IE=0x0300 -DWINVER=0x0400 -D_WIN32_WINNT=0x0400
144
endif
145
 
146
 
147
#.. vc_defines	+= -D_WIN32_WINNT=0x0400	# force use of winsock2.h
148
#.. vc_defines	+= -DWINVER=0x0400		# default
149
#.. vc_defines	+= -D_WIN32_IE=0x0300		# default is 0400
150
#.. vc_defines	+= -DCRTAPI1=_cdecl		# default
151
#.. vc_defines	+= -DCRTAPI2=_cdecl		# default
152
#..
153
#.. if (TARGET) == NT
154
#.. vc_defines	+= -D_WINNT -D_WIN32_WINNT=0x0400
155
#.. elif (TARGET) == 95
156
#.. vc_defines	+= -D_WIN95 -D_WIN32_WINDOWS=0x400
157
#.. else GENERIC (default)
158
#.. endif
159
#.. if (CONSOLE)
160
#.. vc_defines	+= -D_CONSOLE -D_MBCS
161
#.. endif
162
 
163
#vc_defines	+= -D_MT			    # implied via -MD
164
vc_defines	+= -D_X86_=1			# assume target
165
 
166
ifdef ALVL
167
vc_defines	+= -DALVL=$(ALVL)
168
endif
169
ifdef DLVL
170
vc_defines	+= -DDLVL=$(DLVL)
171
endif
172
vc_defines	+= -D__SOURCE__=\"$(notdir $<)\"
173
 
174
	# Standard flags
175
	#
176
	# Both compilers now use the same front end - you must still define either
177
	# _X86_ or _ALPHA_.  These have replaced the i386 and ALPHA definitions
178
	# which are not ANSI compliant.
179
	#
180
	# Common compiler flags:
255 dpurdie 181
	#   -c    - compile without linking
182
	#   -W3   - Set warning level to level 3
183
	#   -Zi   - generate debugging information
184
	#   -Zd   - generate only public symbols and line numbers for debugging
185
	#   -Od   - disable all optimizations
186
	#   -Ox   - use maximum optimizations
187
	#   -Ge   - enable stack checks
188
	#   -Gm   - enable min builds
189
	#   -GX   - (Deprecated: Use -EHsc) Enables synchronous exception handling (C++)
190
        #   -EHsc - Enables synchronous exception handling (C++)
191
	#   -YX   - (Deprecated: Don't use) Automatically generate precompiled headers
192
	#   -Yd   - Place debug info within objects.
193
	#   -GZ   - (Deprecated: Use -RTC1)Enable runtime debug checks
194
	#   -GR   - Enables run-time type information (RTTI)
195
	#   -MD   - Creates a multithreaded DLL, using MSVCRT.LIB
196
	#   -MDd  - Creates a debug multithreaded DLL, using MSVCRTD.LIB
227 dpurdie 197
	#
198
	# Output options:
199
	#   -Fo<file>      name object file
200
	#   -Fp<file>      name precompiled header file
201
	#   -Fd[file]      name .PDB file
202
	#   -Fm[file]      name map file
203
	#   -FR[file]      name source browser file (Complete)
204
	#   -Fr[file]      name source browser file (No locals)
205
	#
206
	# i386 specific compiler flags:
207
	#   -Gz  - stdcall
208
	#   -Gd  - cdecl
209
	#
210
	# Plus:
211
	#   -DCRTAPI1=_cdecl -DCRTAPI2=_cdecl
212
	#   _X86_ | _MIPS_ | _PPC_
213
	#   WINNT | WIN95
214
	#   WINVER=0x0500 (5.0) | WINVER=0x0400 (4.0) | WINVER=0x030A (3.51)
215
	#   _MT
216
	#
217
	# Linker
218
	#   -MT[d]  using MT safe C library
219
	#
220
	# ! Warning !
221
	#   If you are going to call C run-time routines from a program
222
	#   built with LIBCMT.LIB, you must start your threads with the
223
	#   _beginthread function.  Do not use the Win32 functions
224
	#   ExitThread and CreateThread.  Using SuspendThread can lead to
225
	#   a deadlock when more than one thread is blocked waiting for
226
	#   the suspend thread to complete its access to a C run-time
227
	#   data structure.
228
	#..
229
vc_flags	+= -c -nologo
230
vc_flags	+= -GR
231
vc_flags	+= -Gd
255 dpurdie 232
vc_flags	+= $(call select_co,-GX,-GX,-EHsc)
227 dpurdie 233
ifdef USE_WALL
234
vc_flags	+= -W4
235
else
236
vc_flags	+= -W3
237
endif
238
 
239
vc_compile_flags = -TC          # Force C unless otherwise demanded
240
ifdef FORCE_C_COMPILE
241
vc_compile_flags = -TC
242
endif
243
 
244
ifdef FORCE_CC_COMPILE
245
vc_compile_flags = -TP
246
endif
247
 
248
ifdef USE_OPTIMISE				# default for production
249
vc_flags	+= -Od              # Don't optimise production code. Too many problems. Ship what we test
250
else
251
vc_flags	+= -Od
252
endif
253
 
254
ifdef USE_DEBUGINFO				# default for debug
255 dpurdie 255
vc_flags	+= $(call select_co,-GZ,-GZ,-RTC1)
227 dpurdie 256
vc_defines	+= -DDEBUG
257
else
258
vc_flags	+=
259
endif
260
 
261
ifdef LEAVETMP                  # Create an assembly listing
262
vc_flags       += -FAs  -Fa$(subst /,\\,$(basename $@).src)
263
endif
264
 
265
ifndef THREADMODE
266
    THREADMODE = "D"
267
endif
268
 
269
ifeq "$(DEBUG)" "1"				# debug/prod specific
270
vc_flags	+= -M$(THREADMODE)d
271
vc_defines	+= -D_DEBUG
272
else
273
vc_flags	+= -M$(THREADMODE)
274
vc_defines	+= -DNDEBUG
275
endif
276
 
277
ifdef USE_STRICT_ANSI				# default OFF
278
vc_flags	+= -Za
279
else
280
vc_flags	+=
281
endif
282
 
283
ifdef USE_RTTI
284
vc_flags	+= -GR
285
endif
286
 
287
ifndef PDB_NONE                 		# Supress PDB generation
288
vc_flags	+= -Zi
289
endif
290
 
291
ifdef PRECOMPILEHDRS                           	# Precompile headers
255 dpurdie 292
vc_flags	+= $(call select_co,-YX,-YX,--)
227 dpurdie 293
endif
294
 
295
vc_flags	+= -Fp$(subst /,\\,$(OBJDIR)/)
296
vc_flags	+= -Fd$(subst /,\\,$(PDB))
297
 
298
ifdef GEN_SBR_FILES
299
vc_flags	+= -FR$(subst /,\\,$(basename $@).sbr)
300
endif
301
 
302
SHCFLAGS	+= -GD
303
SHCXXFLAGS	+= -GD
304
 
305
	# Standard includes
255 dpurdie 306
	# INCLUDE    - a ';' seperated list of paths
307
        # vc_include - a 'space' seperated list of paths
308
        #            - Using / for path sep
309
        #            - Using 'spacealt'(%20) for 'space' placeholder
227 dpurdie 310
	#..
311
vc_includes	=\
312
		$(subst ;,$(space),$(subst \,/,$(subst $(space),$(spacealt),$(INCLUDE))))
313
 
314
	# Command
315
	#
316
	#..
317
cc		= $(CC_PRE) cl
318
cc_init		=
319
cc_o_switch	= $(subst /,\\,-Fo$@)
320
cc_source	= $(subst /,\\,$<)
321
# CFLAGS must follow vc_flags to build with netbula headers
322
# these should be the ONLY c files that must be built with the C compiler
323
# until netbula support the C++ compiler
324
cc_flags	= \
325
		$(strip $(vc_compile_flags)) \
326
		$(strip $(patsubst %,%,$(vc_flags))) \
327
		$(strip $(patsubst %,%,$(vc_defines))) \
328
		$(patsubst %,%,$(CFLAGS)) \
329
		$(patsubst %,-D%,$(cc_defines)) \
255 dpurdie 330
		$(subst $(spacealt),$(space),$(patsubst %,"-I%",$(subst /,\,$(INCDIRS)))) \
331
		$(subst $(spacealt),$(space),$(patsubst %,"-I%",$(subst /,\,$(cc_includes)))) \
332
		$(subst $(spacealt),$(space),$(patsubst %,"-I%",$(subst /,\,$(vc_includes))))
227 dpurdie 333
cc_term		=
334
 
335
define cc_pre
336
	@$(echo) [$<] Compiling..
337
endef
338
 
339
	# Note:  The compiler gets the case of the PDB file
340
	#        wrong, force to be mixed case.  Also generating of the
341
	#        PDB image is optional based on debugging options, must
342
	#        test if file exists.
343
	#
344
	#        Leave the $(PDB).tmp file otherwise clearaudit gets upset
345
	#
346
define cc_post
347
	@if [ -f $(PDB) ]; then \
348
	$(rm) -f $(PDB).tmp; \
349
	$(mv) $(PDB) $(PDB).tmp; \
350
	$(cp) $(PDB).tmp $(PDB); \
351
	fi
352
endef
353
 
354
cc_filter	:= "$(notdir $(wildcard $(GBE_ROOT)/warnings.visualc))"
355
ifeq ($(strip $(cc_filter)), "warnings.visualc")
356
cc_filter	= $(GBE_ROOT)/warnings.visualc
357
else
358
cc_filter	=
359
endif
360
 
361
ifdef cc_filter
362
cc_redirect_stderr = 1
363
cc_error_filter = $(awk) -f $(cc_filter)
364
endif
365
 
366
 
367
###############################################################################
368
#..     C/C++ dependencies
369
#       depend and depend.err
370
#
371
vc_depend	=  -D_MSC_VER=1200 -D_MSC_EXTENSIONS=1
372
vc_depend	+= -D_MT
373
vc_depend	+= -D_X86_=1 -D_M_IX86=300
374
vc_depend	+= -D_INTEGRAL_MAX_BITS=64
375
 
376
ccdep		= $(XX_PRE) $(GBE_BIN)/mkdepend
377
ccdep_init	=
378
ccdep_o_switch	= -f -
379
ccdep_source	= $(filter %.c %.cc %.cpp, $+) > $@ 2> $@.err
380
ccdep_flags	= -MM -b -We -p '$$(OBJDIR)/' \
381
		$(foreach shname,$(SHNAMES),-p '$$(OBJDIR)/$(shname)/') \
382
		-o ".$(o)" \
383
		$(patsubst %,%,$(vc_depend)) \
384
		$(patsubst %,%,$(vc_defines)) \
385
		$(patsubst %,%,$(CFLAGS)) \
386
		$(patsubst %,%,$(CXXFLAGS)) \
387
		$(patsubst %,-D%,$(cc_defines)) \
388
		$(patsubst %,-D%,$(cxx_defines)) \
389
		$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(subst /,\,$(INCDIRS)))) \
390
		$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(subst /,\,$(cc_includes)))) \
391
		$(subst $(spacealt),$(space),$(patsubst %,-Y"%",$(subst /,\,$(vc_includes)))) \
392
		$(patsubst %,-Y %,$(NODEPDIRS))
393
 
394
ccdep_pre	=
395
ccdep_post	=
396
 
397
#..     C/C++ Lint definitions
398
#       -D Definition is not allowed: PCLINT does not like the space
399
#
400
lint_flags	+= \
401
	$(patsubst %,%,$(vc_depend)) \
402
	$(subst -D$(space),-D,$(patsubst %,%,$(vc_defines))) \
403
	$(patsubst %,%,$(CLINTFLAGS)) \
404
	$(patsubst %,-D%,$(cc_defines)) \
405
	$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(INCDIRS))) \
406
	$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(cc_includes))) \
407
	$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(vc_includes)))
408
 
409
lint_libpath	= $(LIB)
410
 
411
#..     C++ Compiler definitions
412
#
413
cxx		= $(CC_PRE) cl
414
cxx_init	=
415
cxx_o_switch	= $(subst /,\\,-Fo$@)
416
cxx_source	= $(subst /,\\,$<)
417
# CXXFLAGS must follow vc_flags to build with netbula headers
418
# these should be the ONLY c files that must be built with the C compiler
419
# until netbula support the C++ compiler
420
cxx_flags	= -TP \
421
		$(patsubst %,%,$(vc_flags)) \
422
		$(patsubst %,%,$(vc_defines)) \
423
		$(patsubst %,%,$(CXXFLAGS)) \
424
		$(patsubst %,-D%,$(cxx_defines)) \
425
		$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(subst /,\,$(INCDIRS)))) \
426
		$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(subst /,\,$(cxx_includes)))) \
427
		$(subst $(spacealt),$(space),$(patsubst %,-I"%",$(subst /,\,$(vc_includes))))
428
cxx_term	=
429
 
430
define cxx_pre
431
	@echo [$<] compiling..
432
endef
433
 
434
define cxx_post
435
endef
436
 
437
 
438
###############################################################################
439
#..     Assembler definition
440
#
441
 
442
#..     Assembler (Microsoft 6.11)
443
#
444
as		= $(XX_PRE) ml
445
as_init 	=
446
as_i_switch	= /I
447
as_o_switch	= /Fo$(subst /,\\,$@)
448
as_source	= $(subst /,\\,$<)
449
as_cmdfile	= $(subst /,\\,$(basename $@).cmd)
450
as_flags	= @$(as_cmdfile)
451
as_term		=
452
 
453
as_includes	+= $(masm)/include
454
as_defines	+=
455
 
456
ml_flags	= /c /Zm /Cp /X
457
ifeq "$(DEBUG)" "1"
458
ml_flags	+= /W2 /Zd /DDEBUG
459
endif
460
ifdef DLVL
461
ml_flags	+= /DDLVL=$(DLVL)
462
endif
463
ifdef ALVL
464
ml_flags	+= /DALVL=$(ALVL)
465
endif
466
as_defines	:= $(addprefix /D,$(as_defines))
467
as_defines	+= $(ml_flags)
468
 
469
define as_pre
470
	@$(cmdfile) -wko$(as_cmdfile) "\
471
		$(patsubst %,%\\n,$(ASFLAGS)) \
472
		$(patsubst %,%\\n,$(as_defines)) \
473
		$(patsubst %,$(as_i_switch)%\\n,$(subst /,\\\\,$(INCLUDES))) \
474
		$(patsubst %,$(as_i_switch)%\\n,$(subst /,\\\\,$(as_includes)))"
475
endef
476
 
477
ifndef LEAVETMP
478
define as_post
479
	@$(rm) -f $(as_cmdfile)
480
endef
481
else
482
define as_post
483
endef
484
endif
485
 
486
 
487
###############################################################################
488
#..     Archiver definition
489
#
490
 
491
#..     Archiver
492
#
493
ar		= $(XX_PRE)lib
494
ar_init 	=
495
ar_flags	= -nologo -machine:IX86
496
ifeq "$(DEBUG)" "1"
497
ar_flags	+= -debugtype:cv
498
endif
499
 
500
LIBDEF		+=
501
ar_flags	+= $(patsubst %,-def:%,$(LIBDEF))
502
LIBNAME     +=
503
ar_flags	+= $(patsubst %,-name:%,$(LIBNAME))
504
ar_o_switch	= -out:$(subst /,\\,$@) $(subst /,\\,$(filter %.obj,$^)) $(subst /,\\,$(filter %.res,$^))
505
ar_term		=
506
 
507
define ar_pre
508
	echo [$@] Building library ..;
509
endef
510
 
511
define ar_post
512
endef
513
 
514
 
515
#..     Archive Merge
516
#
517
armerge		= $(XX_PRE) $(GBE_TOOLS)/armerge
518
armerge_init	=
519
armerge_cmdfile =
520
armerge_flags	= -d $(OBJDIR) -t MSVC
521
armerge_o_switch= $(subst /,\\,$@) $(subst /,\\,$^)
522
 
523
define armerge_pre
524
	-echo [$@] Merging library ..; $(rm) -f $@
525
endef
526
armerge_post	=
527
 
528
###############################################################################
529
#..     Linker
530
#
531
 
532
	# Standard flags
533
	#
534
	#..
535
vc_ldflags	= \
536
		-nologo\\n\
537
		-incremental:no\\n\
255 dpurdie 538
		-debug\\n\
539
		$(subst $(spacealt),$(space),$(patsubst %,-libpath:\"%\"\\n,$(subst /,\\\\,$(ALL_LIBDIRS))))\
227 dpurdie 540
		$(patsubst %,-%\\n,$(LDFLAGS))\
541
		$(patsubst %,-%\\n,$(purecov_ld_flags))
542
 
543
ifdef LDSUBSYSTEM
544
vc_ldflags += -subsystem:$(LDSUBSYSTEM)\\n
545
endif
546
 
547
#..     Shared library (dll)
548
#
549
 
550
shld		= $(CC_PRE) link
551
shld_cmdfile	= $(subst /,\\,$(basename $@).ld)
552
shld_flags	=
553
shld_o_switch	= @$(shld_cmdfile)
554
shld_term	=
555
 
556
define shld_pre
557
	@$(cmdfile) -wkWeo$(shld_cmdfile) \
558
		"$(vc_ldflags) $($(notdir $(SHBASE))_shld)"; \
559
	echo [$@] Linking shared library ..;
560
endef
561
 
562
ifndef LEAVETMP
563
define shld_post
564
	@$(rm) -f $(shld_cmdfile)
565
endef
566
else
567
define shld_post
568
endef
569
endif
570
 
571
define SHLDDEPEND
572
	@$(cmdfile) -wkWeo$(@) \
573
		"$($(notdir $(SHNAME))_shdp)";
574
endef
575
 
576
#..      Application
577
#
578
 
579
ld		= $(CC_PRE) link
580
ld_cmdfile	= $(subst /,\\,$(basename $@).ld)
581
ld_depfile	= $(subst /,\\,$(basename $@).dep)
582
ld_flags	=
583
ld_o_switch	= @$(ld_cmdfile)
584
ld_term		=
585
 
586
define ld_pre
587
	@$(cmdfile) -wkWeo$(ld_cmdfile) \
588
		"$(vc_ldflags) $($(notdir $(basename $@))_ld)"; \
589
	echo [$@] Linking application ..
590
endef
591
 
592
ifndef LEAVETMP
593
define ld_post
594
	@$(rm) -f $(ld_cmdfile)
595
endef
596
else
597
define ld_post
598
endef
599
endif
600
 
601
define LDDEPEND
602
	@$(cmdfile) -wkWeo$(ld_depfile) \
603
		"$($(notdir $(basename $@))_dp)";
604
endef
605
 
606
#.. Resource Compiler
607
#   Convert a .rc file into a .res file
608
#       Set up the INCLUDE envar to conatin the path to locate required
609
#       files and the local and interface directories then the compiler directories
610
#
611
#       Currently RC has a limit of 100 include paths to seach
612
#       Simply limit the list to the system paths and the directories
613
#       required by the prerequisite files
614
#
615
rc_defines = $(subst -D,/d ,$(vc_defines))
616
rc_dirs = $(subst /,\,$(sort $(dir $^)))
617
rc_dirs += $(LINCDIRS)
618
rc_dirs += $(vc_includes)
619
rc_include = $(subst $(spacealt),$(space),$(subst $(space),$(empty),$(patsubst %,%;,$(subst /,\,$(rc_dirs)))))
620
rc_include1 = $(subst \;,;,$(rc_include))
621
 
622
define RC
623
	@$(echo) [$@] Compile Resource File ..
624
	@$(show_environment)
625
	$(XX_PRE) export INCLUDE; INCLUDE="$(rc_include1)"; \
626
	RC /l 0xC09 $(rc_defines) /fo $(subst /,\\,$@) $(subst /,\\,$<)
627
endef
628
 
629
#.. Browser Information
630
#   Create a .BSC file from many .SBR files
631
#   Filter out non .SBR files to assist in rule creation
632
#
633
define BSCMAKE
634
	@$(echo) [$@] Create Source Browser Information ..
635
	@$(show_environment)
636
	$(XX_PRE) bscmake -nologo -n -o $(subst /,\\,$@) $(subst /,\\,$(filter %.sbr,$^))
637
endef
638
 
639
#