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 OCFLAGS64 = <%if(optimize)%>-O2<%else%><%if(debug_prj)%>-O3 <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
13 CFG_DIR = <%intermediate_dir%>\\
14 LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
15 EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
16 <%if(type_is_static)%>
19 <%if(type_is_static || need_staticflags)%>
21 STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
25 DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
29 POSTLINKRM = <%postlinkrmext%>
32 EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
36 !error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%>
37 <%foreach(configurations)%>
42 UC_CFLAGS = <%unicode_flags%>
43 UNICODE_DIR = Unicode\\
45 ULIBMODIFIER = <%unicode_lib_modifier%>
46 UEXEMODIFIER = <%unicode_lib_modifier%>
55 OBJ_EXT = <%obj64_ext%>
57 OBJ_EXT = <%obj32_ext%>
61 STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>
63 VCL_CFLAGS = -D_NO_VCL
64 STARTUP_LETTER = <%startup_letter%>
71 STARTUP_OBJ = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)
75 LIB_EXT = <%lib64_ext%>
77 LIB_EXT = <%lib32_ext%>
87 THREADFLAGS = <%thflags%>
88 DLLFLAGS = <%dllflags%>
89 LIBFLAGS = <%libflags%>
90 EXEFLAGS = <%exeflags%>
91 WARNFLAGS32 = <%warnflags32%>
92 WARNFLAGS64 = <%warnflags64%>
93 CCFLAGS = <%ccflags%><%if(type_is_binary)%> <%binary_compile_flags("-tWR -tWD")%><%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
95 INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
97 NAME = <%exename%>$(EXEMODIFIER)
100 NAME = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER)
103 NAME = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER)
109 <%if(exename || sharedname || staticname)%>
112 <%foreach(source_files)%>
113 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
120 -L"$(BDS)\lib\win64\release" -L"$(BDS)\lib\win64\debug" \
122 -L"$(BDS)\lib\win32\release" -L"$(BDS)\lib\win32\debug" \
127 <%if(StackReserveSize)%>
128 /S:<%StackReserveSize%> \
130 <%if(StackCommitSize)%>
131 /Sc:<%StackCommitSize%> \
134 -v<%if(libpaths)%> \<%endif%>
136 <%foreach(libpaths)%>
137 -L"<%libpath%>" -j"<%libpath%>"<%fornotlast(" \\")%>
142 <%foreach(reverse(libs))%>
143 <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
145 <%foreach(reverse(lit_libs))%>
146 <%lit_lib%>$(LIB_EXT) \
148 <%foreach(reverse(pure_libs))%>
152 <%common_libs%> <%common64_libs%>
154 $(CG_LIB) <%common_libs%> <%common32_libs%>
157 <%if(resource_files)%>
161 <%foreach(resource_files)%>
162 $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
167 <%foreach(includes)%>
168 -i"<%include%>"<%fornotlast(" \\")%>
176 # Borland precompiled headers can choke on some header files.
177 # Set NO_USE_PCH if you do not want to use precompiled headers.
180 <%foreach(pch_defines)%>
183 -H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
193 <%foreach(common64_flags)%>
197 <%foreach(common32_flags)%>
201 <%foreach(macros common_defines)%>
204 <%foreach(includes)%>
212 OUTPUTDIR = $(EXEOUTPUTDIR)
213 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
215 $(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
216 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
225 $(EXEFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE)
231 OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
232 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>
234 $(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
235 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
244 $(DLLFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE)
251 OUTPUTDIR = <%libout%>\\
252 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
254 $(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
255 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
256 $(TLIB) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
263 <%if(!exename && !sharedname && !staticname)%>
264 all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%>
269 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%>
270 <%foreach(custom_types)%>
271 <%if(custom_type->libpath)%>
272 PATH = $(PATH);<%custom_type->libpath%>
274 <%foreach(custom_type->input_files)%>
275 <%if(custom_type->input_file->output_files)%>
276 <%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%>
277 <%if(flag_overrides(custom_type->input_file, gendir))%>
278 @if not exist "<%flag_overrides(custom_type->input_file, gendir)%>" mkdir "<%flag_overrides(custom_type->input_file, gendir)%>"
280 <%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%>
281 <%if(flag_overrides(custom_type->input_file, postcommand))%>
282 <%foreach(custom_type->input_file)%>
283 <%flag_overrides(custom_type->input_file, postcommand)%>
286 <%if(custom_type->postcommand)%>
287 <%foreach(custom_type->input_file)%>
288 <%custom_type->postcommand%>
293 <%if(custom_type->pch_postrule)%>
294 <%foreach(custom_type->input_file->source_output_files)%>
295 @echo \#include "<%pch_header%>" > temporary.src
296 @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
297 @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%>
305 <%if(exename || sharedname || staticname)%>
307 $(OBJFILES): $(GENERATED_DIRTY)
309 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
312 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
316 generated: $(GENERATED_DIRTY)
319 .path$(OBJ_EXT) = $(INTERMEDIATE)
321 .path.cpp = $(CPPDIR)
323 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
325 $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
327 $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
330 .path.cxx = $(CPPDIR)
332 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
334 $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
336 $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
341 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
343 $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
345 $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
350 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
352 $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
354 $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
359 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
361 $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
363 $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
366 <%foreach(source_files)%>
367 <%if(transdir(source_file) || flag_overrides(source_file, buildflags))%>
368 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
369 @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
371 $(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%>
373 $(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%>
378 <%if(resource_files)%>
380 .path.res = $(INTERMEDIATE)
384 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
385 $(RC32) $(RC_FLAGS) -fo$@ $<
387 <%foreach(resource_files)%>
388 <%if(transdir(resource_file))%>
389 "$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res":
390 @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>"
391 $(RC32) -fo$@ <%resource_file%>
399 @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
402 <%foreach(custom_types)%>
403 <%foreach(custom_type->input_files)%>
404 <%if(custom_type->input_file->output_files)%>
405 <%foreach(custom_type->input_file->output_files)%>
406 <%if(flag_overrides(custom_type->input_file, gendir))%>
407 @del "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" 2>NUL
409 @del "<%custom_type->input_file->output_file%>" 2>NUL
416 @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL
419 @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL
422 @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL
425 <%if(exename || sharedname || staticname)%>
426 @del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL