Add facilities for building source that is outside of the current directory
[oota-llvm.git] / Makefile.rules
1 #===-- Makefile.common - Common make rules for LLVM -------*- makefile -*--====
2 #
3 # This file is included by all of the LLVM makefiles.  This file defines common
4 # rules to do things like compile a .cpp file or generate dependancy info.
5 # These are platform dependant, so this is the file used to specify these
6 # system dependant operations.
7 #
8 # The following functionality can be set by setting incoming variables.
9 # The variable $(LEVEL) *must* be set:
10 #
11 # 1. LEVEL - The level of the current subdirectory from the top of the 
12 #    MagicStats view.  This level should be expressed as a path, for 
13 #    example, ../.. for two levels deep.
14 #
15 # 2. DIRS - A list of subdirectories to be built.  Fake targets are set up
16 #    so that each of the targets "all", "install", and "clean" each build
17 #    the subdirectories before the local target.  DIRS are guaranteed to be
18 #    built in order.
19 #
20 # 3. PARALLEL_DIRS - A list of subdirectories to be built, but that may be
21 #    built in any order.  All DIRS are built in order before PARALLEL_DIRS are
22 #    built, which are then built in any order.
23 #
24 # 4. Source - If specified, this sets the source code filenames.  If this
25 #    is not set, it defaults to be all of the .cpp, .c, .y, and .l files 
26 #    in the current directory.  Also, if you want to build files in addition
27 #    to the local files, you can use the ExtraSource variable
28 #
29 # 5. SourceDir - If specified, this specifies a directory that the source files
30 #    are in, if they are not in the current directory.  This should include a
31 #    trailing / character.
32 #
33 #===-----------------------------------------------------------------------====
34
35 # Configuration file to set paths specific to local installation of LLVM
36
37 include $(LEVEL)/Makefile.config
38
39 # These are options that can either be enabled here, or can be enabled on the
40 # make command line (ie, make ENABLE_PROFILING=1)
41 #
42
43 # When ENABLE_PROFILING is enabled, the llvm source base is built with profile
44 # information to allow gprof to be used to get execution frequencies.
45 #
46 #ENABLE_PROFILING = 1
47
48 # When ENABLE_PURIFY is enabled, the LLVM tools are linked with purify (which
49 # must be locally installed) to allow for some automated memory error debugging.
50 #
51 #ENABLE_PURIFY    = 1
52
53 # When ENABLE_OPTIMIZED is enabled, Release builds of all of the LLVM code are
54 # turned on, and Debug builds are turned off.
55 #
56 #ENABLE_OPTIMIZED = 1
57
58
59 # Figure out how to do platform specific stuff on this platform.  This is really
60 # gross and should be autoconfiscated (automake actually), but should hopefully
61 # work on Linux and solaris (SunOS).
62 #
63 UNAME := $(shell uname)
64 include $(LEVEL)/Makefile.$(UNAME)
65
66 ifdef SHARED_LIBRARY
67 # if SHARED_LIBRARY is specified, the default is to build the dynamic lib
68 dynamic ::
69 endif
70
71 # Default Rule:  Make sure it's also a :: rule
72 all ::
73
74 # Default for install is to at least build everything...
75 install ::
76
77
78 # Figure out which directory to build stuff into.  We want to build into the
79 # /shared directory by default because it is guaranteed to be local to the
80 # current machine.
81 #
82 ifeq ($(LLVM_OBJ_DIR),.)
83 BUILD_ROOT     = $(LLVM_OBJ_DIR)
84 BUILD_ROOT_TOP = $(LEVEL)
85 else
86
87 BUILD_ROOT := $(LLVM_OBJ_DIR)$(patsubst $(HOME)%,%,$(shell pwd))
88
89 # Calculate the BUILD_ROOT_TOP variable, which is the top of the llvm/ tree.
90 # Note that although this is just equal to $(BUILD_ROOT)/$(LEVEL), we cannot use
91 # this expression because some of the directories on the source tree may not
92 # exist in the build tree (for example the test/ heirarchy).  Thus we evaluate
93 # the directory to eliminate the ../'s
94 #
95 TOP_DIRECTORY := $(shell cd $(LEVEL); pwd)
96 BUILD_ROOT_TOP := $(LLVM_OBJ_DIR)$(patsubst $(HOME)%,%,$(TOP_DIRECTORY))
97 endif
98
99 #--------------------------------------------------------------------
100 # Variables derived from configuration options... 
101 #--------------------------------------------------------------------
102
103 #BinInstDir=/usr/local/bin
104 #LibInstDir=/usrl/local/lib/xxx
105 #DocInstDir=/usr/doc/xxx
106
107 BURG_OPTS = -I
108
109 PURIFY := $(PURIFY) -cache-dir="$(BUILD_ROOT_TOP)/../purifycache" -chain-length="30" -messages=all 
110
111 ifdef ENABLE_PROFILING
112   ENABLE_OPTIMIZED = 1
113   CONFIGURATION := Profile
114 else
115   ifdef ENABLE_OPTIMIZED
116     CONFIGURATION := Release
117   else
118     CONFIGURATION := Debug
119   endif
120 endif
121
122 # Shorthand for commonly accessed directories
123 LIBDEBUG    := $(BUILD_ROOT_TOP)/lib/Debug
124 LIBRELEASE  := $(BUILD_ROOT_TOP)/lib/Release
125 LIBPROFILE  := $(BUILD_ROOT_TOP)/lib/Profile
126 LIBCURRENT  := $(BUILD_ROOT_TOP)/lib/$(CONFIGURATION)
127
128 TOOLDEBUG   := $(BUILD_ROOT_TOP)/tools/Debug
129 TOOLRELEASE := $(BUILD_ROOT_TOP)/tools/Release
130 TOOLPROFILE := $(BUILD_ROOT_TOP)/tools/Profile
131 TOOLCURRENT := $(BUILD_ROOT_TOP)/tools/$(CONFIGURATION)
132
133 # Verbosity levels
134 ifndef VERBOSE
135 VERB := @
136 endif
137
138 #---------------------------------------------------------
139 # Compilation options...
140 #---------------------------------------------------------
141
142 # Special tools used while building the LLVM tree.  Burg is built as part of the
143 # utils directory.
144 #
145 BURG    := $(TOOLCURRENT)/burg
146 RunBurg := $(BURG) $(BURG_OPTS)
147
148
149 # Enable this for profiling support with 'gprof'
150 # This automatically enables optimized builds.
151 ifdef ENABLE_PROFILING
152   PROFILE = -pg
153 endif
154
155 # By default, strip symbol information from executable
156 ifndef KEEP_SYMBOLS
157 STRIP = $(PLATFORMSTRIPOPTS)
158 STRIP_WARN_MSG = "(without symbols) "
159 endif
160
161 # Allow gnu extensions...
162 CPPFLAGS += -D_GNU_SOURCE
163
164 # -Wno-unused-parameter
165 CompileCommonOpts := -Wall -W  -Wwrite-strings -Wno-unused -I$(LEVEL)/include
166 CompileOptimizeOpts := -O3 -DNDEBUG -finline-functions -fshort-enums
167
168 # Compile a cpp file, don't link...
169 Compile  := $(CXX) -c $(CPPFLAGS) $(CXXFLAGS) $(CompileCommonOpts)
170 CompileG := $(Compile) -g  -D_DEBUG
171 CompileO := $(Compile) $(CompileOptimizeOpts) -felide-constructors -fomit-frame-pointer
172 CompileP := $(Compile) $(CompileOptimizeOpts) -felide-constructors $(PROFILE)
173
174 # Compile a c file, don't link...
175 CompileC  := $(CC) -c $(CPPFLAGS) $(CCFLAGS) $(CompileCommonOpts)
176 CompileCG := $(CompileC) -g  -D_DEBUG
177 CompileCO := $(CompileC) $(CompileOptimizeOpts) -fomit-frame-pointer
178 CompileCP := $(CompileC) $(CompileOptimizeOpts) $(PROFILE)
179
180
181 # Link final executable
182
183 ifdef ENABLE_PURIFY # To enable purify, build with 'gmake ENABLE_PURIFY=1'
184 Link     := $(PURIFY) $(CXX) -static
185 else
186 Link     := $(CXX)
187 endif
188 LinkG    := $(Link) -g  -L$(LIBDEBUG) $(STRIP)
189 LinkO    := $(Link) -O3 -L$(LIBRELEASE)
190 LinkP    := $(Link) -O3 -L$(LIBPROFILE) $(PROFILE)
191
192 # Create one .o file from a bunch of .o files...
193 Relink = ld -r
194
195 # MakeSO - Create a .so file from a .o files...
196 MakeSO   := $(CXX) $(MakeSharedObjectOption)
197 MakeSOO  := $(MakeSO) -O3
198 MakeSOP  := $(MakeSOO) $(PROFILE)
199
200 # Create dependancy file from CPP file, send to stdout.
201 Depend   := $(CXX) -MM -I$(LEVEL)/include $(CPPFLAGS) 
202 DependC  := $(CC)  -MM -I$(LEVEL)/include $(CPPFLAGS) 
203
204 # Archive a bunch of .o files into a .a file...
205 AR       = ar cq 
206 BISON    = bison
207
208 #----------------------------------------------------------
209
210 # Source includes all of the cpp files, and objects are derived from the
211 # source files...
212 # The local Makefile can list other Source files via ExtraSource = ...
213
214 ifndef Source
215 Source  := $(ExtraSource) $(wildcard *.cpp *.c *.y *.l)
216 endif
217
218 Objs := $(sort $(patsubst Debug/%.o, %.o, $(addsuffix .o,$(notdir $(basename $(Source))))))
219 ObjectsO := $(addprefix $(BUILD_ROOT)/Release/,$(Objs))
220 ObjectsP := $(addprefix $(BUILD_ROOT)/Profile/,$(Objs))
221 ObjectsG := $(addprefix $(BUILD_ROOT)/Debug/,$(Objs))
222
223
224 #---------------------------------------------------------
225 # Handle the DIRS and PARALLEL_DIRS options
226 #---------------------------------------------------------
227
228 ifdef DIRS
229 all install clean test ::
230         $(VERB) for dir in ${DIRS}; do \
231                 (cd $$dir; $(MAKE) $@) || exit 1; \
232         done
233 endif
234
235 # Handle PARALLEL_DIRS
236 ifdef PARALLEL_DIRS
237 all     :: $(addsuffix /.makeall    , $(PARALLEL_DIRS))
238 install :: $(addsuffix /.makeinstall, $(PARALLEL_DIRS))
239 clean   :: $(addsuffix /.makeclean  , $(PARALLEL_DIRS))
240 test    :: $(addsuffix /.maketest   , $(PARALLEL_DIRS))
241
242 %/.makeall %/.makeinstall %/.makeclean %/.maketest:
243         $(VERB) cd $(@D); $(MAKE) $(subst $(@D)/.make,,$@)
244 endif
245
246 #---------------------------------------------------------
247 # Handle the LIBRARYNAME option - used when building libs...
248 #---------------------------------------------------------
249 #
250 #  When libraries are built, they are allowed to optionally define the
251 #  DONT_BUILD_RELINKED make variable, which, when defined, prevents a .o file
252 #  from being built for the library. This .o files may then be linked to by a
253 #  tool if the tool does not need (or want) the semantics a .a file provides
254 #  (linking in only object files that are "needed").  If a library is never to
255 #  be used in this way, it is better to define DONT_BUILD_RELINKED, and define
256 #  BUILD_ARCHIVE instead.
257 #
258 #  Some libraries must be built as .a files (libscalar for example) because if
259 #  it's built as a .o file, then all of the constituent .o files in it will be
260 #  linked into tools (for example gccas) even if they only use one of the parts
261 #  of it.  For this reason, sometimes it's useful to use libraries as .a files.
262
263 ifdef LIBRARYNAME
264
265 # Make sure there isn't any extranous whitespace on the LIBRARYNAME option
266 LIBRARYNAME := $(strip $(LIBRARYNAME))
267
268 LIBNAME_O    := $(LIBRELEASE)/lib$(LIBRARYNAME).so
269 LIBNAME_P    := $(LIBPROFILE)/lib$(LIBRARYNAME).so
270 LIBNAME_G    := $(LIBDEBUG)/lib$(LIBRARYNAME).so
271 LIBNAME_AO   := $(LIBRELEASE)/lib$(LIBRARYNAME).a
272 LIBNAME_AP   := $(LIBPROFILE)/lib$(LIBRARYNAME).a
273 LIBNAME_AG   := $(LIBDEBUG)/lib$(LIBRARYNAME).a
274 LIBNAME_OBJO := $(LIBRELEASE)/$(LIBRARYNAME).o
275 LIBNAME_OBJP := $(LIBPROFILE)/$(LIBRARYNAME).o
276 LIBNAME_OBJG := $(LIBDEBUG)/$(LIBRARYNAME).o
277
278 # dynamic target builds a shared object version of the library...
279 dynamic:: $(LIBCURRENT)/lib$(LIBRARYNAME).so
280
281 # Does the library want a .o version built?
282 ifndef DONT_BUILD_RELINKED
283 all:: $(LIBCURRENT)/$(LIBRARYNAME).o
284 endif
285
286 # Does the library want an archive version built?
287 ifdef BUILD_ARCHIVE
288 all:: $(LIBCURRENT)/lib$(LIBRARYNAME).a
289 endif
290
291 $(LIBNAME_O): $(ObjectsO) $(LibSubDirs) $(LIBRELEASE)/.dir
292         @echo ======= Linking $(LIBRARYNAME) release library =======
293         $(VERB) $(MakeSOO) -o $@ $(ObjectsO) $(LibSubDirs) $(LibLinkOpts)
294
295 $(LIBNAME_P): $(ObjectsP) $(LibSubDirs) $(LIBPROFILE)/.dir
296         @echo ======= Linking $(LIBRARYNAME) profile library =======
297         $(VERB) $(MakeSOP) -o $@ $(ObjectsP) $(LibSubDirs) $(LibLinkOpts)
298
299 $(LIBNAME_G): $(ObjectsG) $(LibSubDirs) $(LIBDEBUG)/.dir
300         @echo ======= Linking $(LIBRARYNAME) debug library =======
301         $(VERB) $(MakeSO) -g -o $@ $(ObjectsG) $(LibSubDirs) $(LibLinkOpts)
302
303 $(LIBNAME_AO): $(ObjectsO) $(LibSubDirs) $(LIBRELEASE)/.dir
304         @echo ======= Linking $(LIBRARYNAME) release library =======
305         @rm -f $@
306         $(VERB) $(AR) $@ $(ObjectsO) $(LibSubDirs)
307
308 $(LIBNAME_AP): $(ObjectsP) $(LibSubDirs) $(LIBPROFILE)/.dir
309         @echo ======= Linking $(LIBRARYNAME) profile library =======
310         @rm -f $@
311         $(VERB) $(AR) $@ $(ObjectsP) $(LibSubDirs)
312
313 $(LIBNAME_AG): $(ObjectsG) $(LibSubDirs) $(LIBDEBUG)/.dir
314         @echo ======= Linking $(LIBRARYNAME) debug library =======
315         @rm -f $@
316         $(VERB) $(AR) $@ $(ObjectsG) $(LibSubDirs)
317
318 $(LIBNAME_OBJO): $(ObjectsO) $(LibSubDirs) $(LIBRELEASE)/.dir
319         @echo "Linking $@"
320         $(VERB) $(Relink) -o $@ $(ObjectsO) $(LibSubDirs)
321
322 $(LIBNAME_OBJP): $(ObjectsP) $(LibSubDirs) $(LIBPROFILE)/.dir
323         @echo "Linking $@"
324         $(VERB) $(Relink) -o $@ $(ObjectsP) $(LibSubDirs)
325
326 $(LIBNAME_OBJG): $(ObjectsG) $(LibSubDirs) $(LIBDEBUG)/.dir
327         @echo "Linking $@"
328         $(VERB) $(Relink) -o $@ $(ObjectsG) $(LibSubDirs)
329
330 endif
331
332 #------------------------------------------------------------------------
333 # Create a TAGS database for emacs
334 #------------------------------------------------------------------------
335
336 ifeq ($(LEVEL), .)
337 tags:
338         etags -l c++ `find include lib tools -name '*.cpp' -o -name '*.h'`
339 all:: tags
340 endif
341
342 #------------------------------------------------------------------------
343 # Handle the TOOLNAME option - used when building tool executables...
344 #------------------------------------------------------------------------
345 #
346 # The TOOLNAME option should be used with a USEDLIBS variable that tells the
347 # libraries (and the order of the libs) that should be linked to the
348 # tool. USEDLIBS should contain a list of library names (some with .a extension)
349 # that are automatically linked in as .o files unless the .a suffix is added.
350 #
351 ifdef TOOLNAME
352
353 # TOOLEXENAME* - These compute the output filenames to generate...
354 TOOLEXENAME_G := $(BUILD_ROOT_TOP)/tools/Debug/$(TOOLNAME)
355 TOOLEXENAME_O := $(BUILD_ROOT_TOP)/tools/Release/$(TOOLNAME)
356 TOOLEXENAME_P := $(BUILD_ROOT_TOP)/tools/Profile/$(TOOLNAME)
357 TOOLEXENAMES  := $(BUILD_ROOT_TOP)/tools/$(CONFIGURATION)/$(TOOLNAME)
358
359 # USED_LIBS_OPTIONS - Compute the options line that add -llib1 -llib2, etc.
360 USED_LIBS_OPTIONS   := $(patsubst %.a.o, -l%, $(addsuffix .o, $(USEDLIBS)))
361 USED_LIBS_OPTIONS_G := $(patsubst %.o, $(LIBDEBUG)/%.o,  $(USED_LIBS_OPTIONS))
362 USED_LIBS_OPTIONS_O := $(patsubst %.o, $(LIBRELEASE)/%.o,$(USED_LIBS_OPTIONS))
363 USED_LIBS_OPTIONS_P := $(patsubst %.o, $(LIBPROFILE)/%.o,$(USED_LIBS_OPTIONS))
364
365
366 # USED_LIB_PATHS - Compute the path of the libraries used so that tools are
367 # rebuilt if libraries change.  This has to make sure to handle .a/.so and .o
368 # files seperately.
369 #
370 STATICUSEDLIBS   := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS)))
371 USED_LIB_PATHS_G := $(addprefix $(LIBDEBUG)/, $(STATICUSEDLIBS))
372 USED_LIB_PATHS_O := $(addprefix $(LIBRELEASE)/, $(STATICUSEDLIBS))
373 USED_LIB_PATHS_P := $(addprefix $(LIBPROFILE)/, $(STATICUSEDLIBS))
374 LINK_OPTS        := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS)
375
376
377 # Tell make that we need to rebuild subdirectories before we can link the tool.
378 # This affects things like LLI which has library subdirectories.
379 $(USED_LIB_PATHS_G) $(USED_LIB_PATHS_O) $(USED_LIB_PATHS_P): \
380         $(addsuffix /.makeall, $(PARALLEL_DIRS))
381
382 all::   $(TOOLEXENAMES)
383 clean::
384         $(VERB) rm -f $(TOOLEXENAMES)
385
386 $(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(TOOLDEBUG)/.dir
387         @echo ======= Linking $(TOOLNAME) debug executable $(STRIP_WARN_MSG) =======
388         $(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(LINK_OPTS)
389
390 $(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(TOOLRELEASE)/.dir
391         @echo ======= Linking $(TOOLNAME) release executable =======
392         $(VERB) $(LinkO) -o $@ $(ObjectsO) $(USED_LIBS_OPTIONS_O) $(LINK_OPTS)
393
394 $(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(TOOLPROFILE)/.dir
395         @echo ======= Linking $(TOOLNAME) profile executable =======
396         $(VERB) $(LinkP) -o $@ $(ObjectsP) $(USED_LIBS_OPTIONS_P) $(LINK_OPTS)
397
398 endif
399
400
401
402 #---------------------------------------------------------
403 .PRECIOUS: $(BUILD_ROOT)/Depend/.dir
404 .PRECIOUS: $(BUILD_ROOT)/Debug/.dir $(BUILD_ROOT)/Release/.dir
405
406 # Create .o files in the ObjectFiles directory from the .cpp and .c files...
407 $(BUILD_ROOT)/Release/%.o: $(SourceDir)%.cpp $(BUILD_ROOT)/Release/.dir
408         @echo "Compiling $<"
409         $(VERB) $(CompileO) $< -o $@
410
411 $(BUILD_ROOT)/Release/%.o: $(SourceDir)%.c $(BUILD_ROOT)/Release/.dir
412         $(VERB) $(CompileCO) $< -o $@
413
414 $(BUILD_ROOT)/Profile/%.o: $(SourceDir)%.cpp $(BUILD_ROOT)/Profile/.dir
415         @echo "Compiling $<"
416         $(VERB) $(CompileP) $< -o $@
417
418 $(BUILD_ROOT)/Profile/%.o: $(SourceDir)%.c $(BUILD_ROOT)/Profile/.dir
419         @echo "Compiling $<"
420         $(VERB) $(CompileCP) $< -o $@
421
422 $(BUILD_ROOT)/Debug/%.o: $(SourceDir)%.cpp $(BUILD_ROOT)/Debug/.dir
423         @echo "Compiling $<"
424         $(VERB) $(CompileG) $< -o $@
425
426 $(BUILD_ROOT)/Debug/%.o: $(SourceDir)%.c $(BUILD_ROOT)/Debug/.dir 
427         $(VERB) $(CompileCG) $< -o $@
428
429 #
430 # Rules for building lex/yacc files
431 #
432 LEX_FILES   = $(filter %.l, $(Source))
433 LEX_OUTPUT  = $(LEX_FILES:%.l=%.cpp)
434 YACC_FILES  = $(filter %.y, $(Source))
435 YACC_OUTPUT = $(addprefix $(YACC_FILES:%.y=%), .h .cpp .output)
436 .PRECIOUS: $(LEX_OUTPUT) $(YACC_OUTPUT)
437
438 # Create a .cpp source file from a flex input file... this uses sed to cut down
439 # on the warnings emited by GCC...
440 #
441 # The last line is a gross hack to work around flex aparently not being able to
442 # resize the buffer on a large token input.  Currently, for uninitialized string
443 # buffers in LLVM we can generate very long tokens, so this is a hack around it.
444 # FIXME.  (f.e. char Buffer[10000]; )
445 #
446 %.cpp: %.l
447         flex -t $< | sed '/^find_rule/d' | \
448                      sed 's/void yyunput/inline void yyunput/' | \
449           sed 's/void \*yy_flex_realloc/inline void *yy_flex_realloc/' | \
450           sed 's/#define YY_BUF_SIZE 16384/#define YY_BUF_SIZE (16384*64)/' > $@
451
452 # Rule for building the bison parsers...
453 %.c: %.y     # Cancel built-in rules for yacc
454 %.h: %.y     # Cancel built-in rules for yacc
455 %.cpp %.h : %.y
456         @echo Bison\'ing $<...
457         $(VERB) $(BISON) -v -d -p $(<:%Parser.y=%) $*.y
458         $(VERB) mv -f $*.tab.c $*.cpp
459         $(VERB) mv -f $*.tab.h $*.h
460
461 # To create the directories...
462 %/.dir:
463         $(VERB) mkdir -p $*
464         @date > $@
465
466 # To create postscript files from dot files...
467 %.ps: %.dot
468         dot -Tps < $< > $@
469
470 # 'make clean' nukes the tree
471 clean::
472         $(VERB) rm -rf $(BUILD_ROOT)/Debug $(BUILD_ROOT)/Release $(BUILD_ROOT)/Profile $(BUILD_ROOT)/Depend
473         $(VERB) rm -f core core.[0-9][0-9]* *.o *.d *.so *~ *.flc
474         $(VERB) rm -f $(LEX_OUTPUT) $(YACC_OUTPUT)
475
476 # If dependencies were generated for the file that included this file,
477 # include the dependancies now...
478 #
479 SourceBaseNames := $(basename $(notdir $(filter-out Debug/%, $(Source))))
480 SourceDepend := $(SourceBaseNames:%=$(BUILD_ROOT)/Depend/%.d)
481
482 # Create dependencies for the *.cpp files...
483 #$(SourceDepend): \x
484 $(BUILD_ROOT)/Depend/%.d: $(SourceDir)%.cpp $(BUILD_ROOT)/Depend/.dir
485         $(VERB) $(Depend) $< | sed 's|$*\.o *|$(BUILD_ROOT)/Release/& $(BUILD_ROOT)/Profile/& $(BUILD_ROOT)/Debug/& $(BUILD_ROOT)/Depend/$(@F)|g' > $@
486
487 # Create dependencies for the *.c files...
488 #$(SourceDepend): \x
489 $(BUILD_ROOT)/Depend/%.d: $(SourceDir)%.c $(BUILD_ROOT)/Depend/.dir
490         $(VERB) $(DependC) $< | sed 's|$*\.o *|Release/& Profile/& Debug/& Depend/$(@F)|g' > $@
491
492 ifneq ($(SourceDepend),)
493 -include $(SourceDepend)
494 endif