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