1 #----------------------------------------------------------------------------
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 #----------------------------------------------------------------------------
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)%>
20 <%if(type_is_static || need_staticflags)%>
22 STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
26 DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
30 POSTLINKRM = <%postlinkrmext%>
33 EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
37 !error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%>
38 <%foreach(configurations)%>
43 UC_CFLAGS = <%unicode_flags%>
44 UNICODE_DIR = Unicode\\
46 ULIBMODIFIER = <%unicode_lib_modifier%>
47 UEXEMODIFIER = <%unicode_lib_modifier%>
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%>
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%>
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%>
90 DLLFLAGS = <%dllflags%>
91 LIBFLAGS = <%libflags%>
92 EXEFLAGS = <%exeflags%>
93 CCFLAGS = <%ccflags%><%if(type_is_binary)%> $(BINARYFLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
96 STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>
98 VCL_CFLAGS = -D_NO_VCL
99 STARTUP_LETTER = <%startup_letter%>
101 STARTUP_OBJ = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)
103 INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
105 NAME = <%exename%>$(EXEMODIFIER)
108 NAME = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER)
111 NAME = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER)
117 <%if(exename || sharedname || staticname)%>
120 <%foreach(source_files)%>
121 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
135 <%if(StackReserveSize)%>
136 /S:<%StackReserveSize%> \
138 <%if(StackCommitSize)%>
139 /Sc:<%StackCommitSize%> \
142 -v<%if(libpaths)%> \<%endif%>
144 <%foreach(libpaths)%>
145 -L"<%libpath%>" -j"<%libpath%>"<%fornotlast(" \\")%>
150 COMMON_LIBS = <%common_libs%> <%common64_libs%>
153 COMMON_LIBS = $(CG_LIB) <%common_libs%> <%common32_libs%>
155 COMMON_LIBS = <%common_libs%> <%common32c_libs%>
160 <%foreach(reverse(libs))%>
161 <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
163 <%foreach(reverse(lit_libs))%>
164 <%lit_lib%>$(LIB_EXT) \
166 <%foreach(reverse(pure_libs))%>
171 <%if(resource_files)%>
175 <%foreach(resource_files)%>
176 $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
181 <%foreach(includes)%>
182 -i"<%include%>"<%fornotlast(" \\")%>
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.
195 <%foreach(pch_defines)%>
198 -H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
206 <%foreach(common64_flags)%>
207 <%common64_flag%><%fornotlast(" \\")%>
212 <%foreach(common32_flags)%>
213 <%common32_flag%><%fornotlast(" \\")%>
217 <%foreach(common32c_flags)%>
218 <%common32c_flag%><%fornotlast(" \\")%>
224 <%if(common64_defines)%>
226 <%foreach(common64_defines)%>
227 -D<%common64_define%><%fornotlast(" \\")%>
232 <%if(common32_defines)%>
234 <%foreach(common32_defines)%>
235 -D<%common32_define%><%fornotlast(" \\")%>
239 <%if(common32c_defines)%>
241 <%foreach(common32c_defines)%>
242 -D<%common32c_define%><%fornotlast(" \\")%>
254 <%foreach(macros common_defines)%>
257 <%foreach(includes)%>
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)"
278 $(EXEFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE)
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)"
297 $(DLLFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE)
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) @&&!
316 <%if(!exename && !sharedname && !staticname)%>
317 all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%>
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%>
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)%>"
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)%>
339 <%if(custom_type->postcommand)%>
340 <%foreach(custom_type->input_file)%>
341 <%custom_type->postcommand%>
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%>
358 <%if(exename || sharedname || staticname)%>
360 $(OBJFILES): $(GENERATED_DIRTY)
362 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
365 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
369 generated: $(GENERATED_DIRTY)
372 .path$(OBJ_EXT) = $(INTERMEDIATE)
374 .path.cpp = $(CPPDIR)
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) $<
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) $<
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) $<
391 .path.cxx = $(CPPDIR)
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) $<
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) $<
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) $<
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) $<
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) $<
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) $<
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) $<
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) $<
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) $<
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) $<
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) $<
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) $<
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)%>"
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%>
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%>
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%>
475 <%if(resource_files)%>
477 .path.res = $(INTERMEDIATE)
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%>
496 @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
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
506 @del "<%custom_type->input_file->output_file%>" 2>NUL
513 @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL
516 @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL
519 @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL
522 <%if(exename || sharedname || staticname)%>
523 @del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL