Clear out the previous custom_multi_details hash map so that we don't have extraneous...
[MPC.git] / templates / bmake.mpd
blobdda37a7b6d7b6315a1c83d2ad9bb8926eda21980
1 #----------------------------------------------------------------------------
2 #       Borland Makefile
4 # This file was automatically generated by MPC.  Any changes made directly to
5 # this file will be lost the next time it is generated.
7 #----------------------------------------------------------------------------
8 <%marker(top)%>
9 <%foreach(configurations)%>
10 !ifdef <%normalize(uc(configuration))%>
11 OCFLAGS32    = <%if(optimize)%>-O1<%else%><%if(debug_prj)%>-v -y -Od -vi- -k<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
12 OCFLAGS32C   = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-Od -vi- <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
13 OCFLAGS64    = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-g -O0 <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
14 CFG_DIR      = <%intermediate_dir%>\\
15 LIBMODIFIER  = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
16 EXEMODIFIER  = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
17 <%if(type_is_static)%>
18 STATIC_CFG   = 1
19 <%endif%>
20 <%if(type_is_static || need_staticflags)%>
21 <%if(staticflags)%>
22 STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
23 <%endif%>
24 <%else%>
25 <%if(dynamicflags)%>
26 DYN_FLAGS    =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
27 <%endif%>
28 <%endif%>
29 <%if(postlinkrmext)%>
30 POSTLINKRM   = <%postlinkrmext%>
31 <%endif%>
32 <%if(exename)%>
33 EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
34 <%endif%>
35 !else
36 <%endfor%>
37 !error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%>
38 <%foreach(configurations)%>
39 !endif
40 <%endfor%>
42 !ifdef UNICODE
43 UC_CFLAGS    = <%unicode_flags%>
44 UNICODE_DIR  = Unicode\\
45 UC_MAIN      = w
46 ULIBMODIFIER = <%unicode_lib_modifier%>
47 UEXEMODIFIER = <%unicode_lib_modifier%>
48 !endif
50 !ifdef CODEGUARD
51 CG_CFLAGS = -vG
52 CG_LIB    = cg32.lib
53 !endif
55 DLL_EXT      = <%dll_ext%>
56 EXE_EXT      = <%exe_ext%>
57 <%if(build64bit)%>
58 STARTUP_BITS = 64
59 CC64         = <%cc64%>
60 LINK64       = <%link64%>
61 LIB_EXT      = <%lib64_ext%>
62 OBJ_EXT      = <%obj64_ext%>
63 THREADFLAGS  = <%thrflags64%>
64 BINARYFLAGS  = <%binaryflags64%>
65 LINKERPATHS  = -L"$(BDS)\lib\win64\debug" -L"$(BDS)\lib\win64\release" -GE:HIGHENTROPYVA=off
66 WARNFLAGS64  = <%warnflags64%>
67 <%else%>
68 LINK32       = <%link32%>
69 STARTUP_BITS = 32
70 !ifdef CLASSIC
71 CC32         = <%cc32%>
72 LIB_EXT      = <%lib32_ext%>
73 OBJ_EXT      = <%obj32_ext%>
74 THREADFLAGS  = <%thrflags32%>
75 BINARYFLAGS  = <%binaryflags32%>
76 LINKERPATHS  = -L"$(BDS)\lib\win32\release" -L"$(BDS)\lib\win32\debug"
77 WARNFLAGS32  = <%warnflags32%>
78 !else
79 CC32C        = <%cc32c%>
80 LIB_EXT      = <%lib32c_ext%>
81 OBJ_EXT      = <%obj32c_ext%>
82 THREADFLAGS  = <%thrflags32c%>
83 BINARYFLAGS  = <%binaryflags32c%>
84 LINKERPATHS  = -L"$(BDS)\lib\win32c\debug" -L"$(BDS)\lib\win32c\release"
85 WARNFLAGS32C = <%warnflags32c%>
86 !endif
87 <%endif%>
88 RC           = <%rc%>
89 TLIB32       = <%tlib32%>
90 DLLFLAGS     = <%dllflags%>
91 LIBFLAGS     = <%libflags%>
92 EXEFLAGS     = <%exeflags%>
93 CCFLAGS      = <%ccflags%><%if(type_is_binary)%> $(BINARYFLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
95 <%if(use_vcl)%>
96 STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>
97 <%else%>
98 VCL_CFLAGS     = -D_NO_VCL
99 STARTUP_LETTER = <%startup_letter%>
100 <%endif%>
101 STARTUP_OBJ    = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)
103 INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
104 <%if(exename)%>
105 NAME         = <%exename%>$(EXEMODIFIER)
106 <%else%>
107 <%if(sharedname)%>
108 NAME         = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER)
109 <%else%>
110 <%if(staticname)%>
111 NAME         = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER)
112 <%endif%>
113 <%endif%>
114 <%endif%>
115 CPPDIR       = <%cppdir%>
116 RESDIR       = <%rcdir%>
117 <%if(exename || sharedname || staticname)%>
119 OBJFILES = \
120 <%foreach(source_files)%>
121            "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
122 <%endfor%>
123 <%endif%>
124 <%if(libpaths)%>
126 LFLAGS   = \
127            $(LINKERPATHS) \
128 <%if(debug_prj)%>
129            -v \
130            -r \
131 <%endif%>
132 <%if(linkflags)%>
133         <%linkflags%> \
134 <%endif%>
135 <%if(StackReserveSize)%>
136            /S:<%StackReserveSize%> \
137 <%endif%>
138 <%if(StackCommitSize)%>
139            /Sc:<%StackCommitSize%> \
140 <%endif%>
141 <%if(!optimize)%>
142            -v<%if(libpaths)%> \<%endif%>
143 <%endif%>
144 <%foreach(libpaths)%>
145            -L"<%libpath%>" -j"<%libpath%>"<%fornotlast(" \\")%>
146 <%endfor%>
147 <%endif%>
149 <%if(build64bit)%>
150 COMMON_LIBS = <%common_libs%> <%common64_libs%>
151 <%else%>
152 !ifdef CLASSIC
153 COMMON_LIBS = $(CG_LIB) <%common_libs%> <%common32_libs%>
154 !else
155 COMMON_LIBS = <%common_libs%> <%common32c_libs%>
156 !endif
157 <%endif%>
159 LIBFILES = \
160 <%foreach(reverse(libs))%>
161            <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
162 <%endfor%>
163 <%foreach(reverse(lit_libs))%>
164            <%lit_lib%>$(LIB_EXT) \
165 <%endfor%>
166 <%foreach(reverse(pure_libs))%>
167            <%pure_lib%> \
168 <%endfor%>
169            $(COMMON_LIBS)
171 <%if(resource_files)%>
173 !ifndef STATIC_CFG
174 RESOURCE = \
175 <%foreach(resource_files)%>
176            $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
177 <%endfor%>
178 <%if(includes)%>
180 RC_FLAGS = \
181 <%foreach(includes)%>
182         -i"<%include%>"<%fornotlast(" \\")%>
183 <%endfor%>
184 <%endif%>
185 !endif
186 <%endif%>
187 <%if(!build64bit)%>
188 <%if(pch_header)%>
190 # Borland bcc32 precompiled headers can choke on some header files.
191 # Set NO_USE_PCH if you do not want to use precompiled headers.
192 !ifndef NO_USE_PCH
193 !ifdef CLASSIC
194 PCH_CFLAGS = \
195 <%foreach(pch_defines)%>
196              -D<%pch_define%> \
197 <%endfor%>
198              -H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
199 !endif
200 !endif
201 <%endif%>
202 <%endif%>
204 <%if(build64bit)%>
205 COMMON_FLAGS = \
206 <%foreach(common64_flags)%>
207          <%common64_flag%><%fornotlast(" \\")%>
208 <%endfor%>
209 <%else%>
210 !ifdef CLASSIC
211 COMMON_FLAGS = \
212 <%foreach(common32_flags)%>
213          <%common32_flag%><%fornotlast(" \\")%>
214 <%endfor%>
215 !else
216 COMMON_FLAGS = \
217 <%foreach(common32c_flags)%>
218          <%common32c_flag%><%fornotlast(" \\")%>
219 <%endfor%>
220 !endif
221 <%endif%>
223 <%if(build64bit)%>
224 <%if(common64_defines)%>
225 COMMON_DEFINES = \
226 <%foreach(common64_defines)%>
227          -D<%common64_define%><%fornotlast(" \\")%>
228 <%endfor%>
229 <%endif%>
230 <%else%>
231 !ifdef CLASSIC
232 <%if(common32_defines)%>
233 COMMON_DEFINES = \
234 <%foreach(common32_defines)%>
235          -D<%common32_define%><%fornotlast(" \\")%>
236 <%endfor%>
237 <%endif%>
238 !else
239 <%if(common32c_defines)%>
240 COMMON_DEFINES = \
241 <%foreach(common32c_defines)%>
242          -D<%common32c_define%><%fornotlast(" \\")%>
243 <%endfor%>
244 <%endif%>
245 !endif
246 <%endif%>
248 CFLAGS = \
249 <%foreach(cflags)%>
250          <%cflag%> \
251 <%endfor%>
252          $(COMMON_FLAGS) \
253          $(COMMON_DEFINES) \
254 <%foreach(macros common_defines)%>
255          -D<%macro%> \
256 <%endfor%>
257 <%foreach(includes)%>
258          -I"<%include%>" \
259 <%endfor%>
260          $(PCH_CFLAGS) \
261          $(VCL_CFLAGS)
263 <%marker(macros)%>
264 <%if(exename)%>
265 OUTPUTDIR = $(EXEOUTPUTDIR)
266 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
268 $(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
269   @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
270 <%if(prelink)%>
271   <%eval(prelink)%>
272 <%endif%>
273 <%if(build64bit)%>
274   $(LINK64) @&&!
275 <%else%>
276   $(LINK32) @&&!
277 <%endif%>
278   $(EXEFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE)
281 <%endif%>
282 <%if(sharedname)%>
283 !ifndef STATIC_CFG
284 OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
285 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>
287 $(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
288   @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
289 <%if(prelink)%>
290   <%eval(prelink)%>
291 <%endif%>
292 <%if(build64bit)%>
293   $(LINK64) @&&!
294 <%else%>
295   $(LINK32) @&&!
296 <%endif%>
297   $(DLLFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE)
299 !endif
301 <%endif%>
302 <%if(staticname)%>
303 !ifdef STATIC_CFG
304 OUTPUTDIR = <%libout%>\\
305 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
307 $(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
308   @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
309   $(TLIB32) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
310 + $(**: = &^
311 + )
313 !endif
315 <%endif%>
316 <%if(!exename && !sharedname && !staticname)%>
317 all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%>
318   @-rem
320 <%endif%>
321 <%if(custom_types)%>
322 GENERATED_DIRTY =<%foreach(custom_types)%><%foreach(custom_type->input_files)%><%if(custom_type->input_file->output_files)%><%foreach(custom_type->input_file->output_files)%> <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%endfor%><%endif%><%endfor%><%endfor%>
323 <%foreach(custom_types)%>
324 <%if(custom_type->libpath)%>
325 PATH = $(PATH);<%custom_type->libpath%>
326 <%endif%>
327 <%foreach(custom_type->input_files)%>
328 <%if(custom_type->input_file->output_files)%>
329 <%foreach(custom_type->input_file->output_files)%><%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%><%else%><%custom_type->input_file->output_file%><%endif%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
330 <%if(flag_overrides(custom_type->input_file, gendir))%>
331         @if not exist "<%flag_overrides(custom_type->input_file, gendir)%>" mkdir "<%flag_overrides(custom_type->input_file, gendir)%>"
332 <%endif%>
333   <%if(flag_overrides(custom_type->input_file, command))%><%flag_overrides(custom_type->input_file, command)%><%else%><%custom_type->command%><%endif%> <%if(flag_overrides(custom_type->input_file, commandflags))%><%flag_overrides(custom_type->input_file, commandflags)%><%else%><%custom_type->commandflags%><%endif%> <%if(custom_type->output_option)%><%custom_type->input_file%> <%custom_type->output_option%> $@<%else%><%custom_type->input_file%><%endif%>
334 <%if(flag_overrides(custom_type->input_file, postcommand))%>
335 <%foreach(custom_type->input_file)%>
336   <%flag_overrides(custom_type->input_file, postcommand)%>
337 <%endfor%>
338 <%else%>
339 <%if(custom_type->postcommand)%>
340 <%foreach(custom_type->input_file)%>
341   <%custom_type->postcommand%>
342 <%endfor%>
343 <%endif%>
344 <%endif%>
345 <%if(pch_header)%>
346 <%if(custom_type->pch_postrule)%>
347 <%foreach(custom_type->input_file->source_output_files)%>
348   @echo \#include "<%pch_header%>" > temporary.src
349   @type <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%> >> temporary.src
350   @move /y temporary.src <%if(flag_overrides(custom_type->input_file, gendir))%><%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->source_output_file)%><%else%><%custom_type->input_file->source_output_file%><%endif%>
351 <%endfor%>
352 <%endif%>
353 <%endif%>
355 <%endif%>
356 <%endfor%>
357 <%endfor%>
358 <%if(exename || sharedname || staticname)%>
359 <%if(source_files)%>
360 $(OBJFILES): $(GENERATED_DIRTY)
361 <%else%>
362 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
363 <%endif%>
364 <%else%>
365 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
366 <%endif%>
368 <%endif%>
369 generated: $(GENERATED_DIRTY)
370   @-rem
372 .path$(OBJ_EXT) = $(INTERMEDIATE)
374 .path.cpp = $(CPPDIR)
375 <%if(build64bit)%>
376 .cpp$(OBJ_EXT):
377   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
378         $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
379 <%else%>
380 !ifdef CLASSIC
381 .cpp$(OBJ_EXT):
382   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
383         $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
384 !else
385 .cpp$(OBJ_EXT):
386   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
387         $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
388 !endif
389 <%endif%>
391 .path.cxx = $(CPPDIR)
392 <%if(build64bit)%>
393 .cxx$(OBJ_EXT):
394   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
395         $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
396 <%else%>
397 !ifdef CLASSIC
398 .cxx$(OBJ_EXT):
399   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
400         $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
401 !else
402 .cxx$(OBJ_EXT):
403   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
404         $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
405 !endif
406 <%endif%>
408 .path.cc = $(CPPDIR)
409 <%if(build64bit)%>
410 .cc$(OBJ_EXT):
411   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
412         $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
413 <%else%>
414 !ifdef CLASSIC
415 .cc$(OBJ_EXT):
416   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
417         $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
418 !else
419 .cc$(OBJ_EXT):
420   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
421         $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
422 !endif
423 <%endif%>
425 .path.C = $(CPPDIR)
426 <%if(build64bit)%>
427 .C$(OBJ_EXT):
428   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
429         $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
430 <%else%>
431 !ifdef CLASSIC
432 .C$(OBJ_EXT):
433   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
434         $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
435 !else
436 .C$(OBJ_EXT):
437   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
438         $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
439 !endif
440 <%endif%>
442 .path.c = $(CPPDIR)
443 <%if(build64bit)%>
444 .c$(OBJ_EXT):
445   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
446         $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
447 <%else%>
448 !ifdef CLASSIC
449 .c$(OBJ_EXT):
450   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
451         $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
452 !else
453 .c$(OBJ_EXT):
454   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
455         $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
456 !endif
457 <%endif%>
459 <%foreach(source_files)%>
460 <%if(transdir(source_file) || flag_overrides(source_file, buildflags))%>
461 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
462   @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
463 <%if(build64bit)%>
464   $(CC64) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) <%source_file%>
465 <%else%>
466 !ifdef CLASSIC
467   $(CC32) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) <%source_file%>
468 !else
469   $(CC32C) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) <%source_file%>
470 !endif
471 <%endif%>
473 <%endif%>
474 <%endfor%>
475 <%if(resource_files)%>
476 !ifndef STATIC_CFG
477 .path.res = $(INTERMEDIATE)
479 .path.rc = $(RESDIR)
480 .rc.res:
481   @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
482         $(RC) $(RC_FLAGS) -fo$@ $<
484 <%foreach(resource_files)%>
485 <%if(transdir(resource_file))%>
486 "$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res":
487   @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>"
488   $(RC) -fo$@ <%resource_file%>
490 <%endif%>
491 <%endfor%>
492 !endif
494 <%endif%>
495 clean:
496         @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
498 realclean: clean
499 <%foreach(custom_types)%>
500 <%foreach(custom_type->input_files)%>
501 <%if(custom_type->input_file->output_files)%>
502 <%foreach(custom_type->input_file->output_files)%>
503 <%if(flag_overrides(custom_type->input_file, gendir))%>
504         @del "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" 2>NUL
505 <%else%>
506         @del "<%custom_type->input_file->output_file%>" 2>NUL
507 <%endif%>
508 <%endfor%>
509 <%endif%>
510 <%endfor%>
511 <%endfor%>
512 <%if(exename)%>
513         @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL
514 <%else%>
515 <%if(sharedname)%>
516         @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL
517 <%endif%>
518 <%if(staticname)%>
519         @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL
520 <%endif%>
521 <%endif%>
522 <%if(exename || sharedname || staticname)%>
523         @del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL
524 <%endif%>
525 <%if(postclean)%>
526   -<%eval(postclean)%>
527 <%endif%>
529 <%if(prebuild)%>
530 __prebuild__:
531   @<%eval(prebuild)%>
533 <%endif%>
534 <%if(postbuild)%>
535 __postbuild__:
536   @<%eval(postbuild)%>
538 <%endif%>
539 <%marker(local)%>
540 <%marker(bottom)%>