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 #----------------------------------------------------------------------------
10 !ifdef <%normalize(uc(compiler))%>
12 OPTIMIZE_CFLAGS = <%optimize_flags%>
13 PDB_FLAGS = <%pdb_flags%>
14 DEBUG_CFLAGS = <%debug_flags%>
15 RELEASE_CFLAGS = <%release_flags%>
16 CC_CFLAGS = <%ccflags%>
17 STACK_LFLAG = <%stack_flag%>
18 WARN_FLAGS = <%warn_flags%>
19 BINARY_FLAGS = <%binary_flags%>
20 THREAD_FLAGS = <%thr_flags%>
22 COMMON_DEFINES =<%foreach(common_defines)%> -D<%common_define%><%endfor%>
23 COMMON_FLAGS = <%foreach(common_flags)%><%common_flag%><%endfor%>
24 PLATFORM_LIBS_PREFIX = <%platform_libs_prefix%>
26 LINKER_PATHS = <%linker_paths%>
27 STARTUP_BITS = <%startup_bits%>
29 COMMON_LIBS = <%common_libs%>
30 DLLLIBS = <%dll_libs%>
31 EXELIBS = <%exe_libs%>
33 DLLFLAGS = <%dllflags%>
34 <%if(pch)%>PCH = 1<%endif%>
35 <%if(objectsearchpath)%>
38 -j"<%libpath%>"<%fornotlast(" \\")%>
41 EXEFLAGS = <%exeflags%>
42 LINKER_DLL_ARGUMENTS = <%linker_dll_arguments%>
43 LINKER_EXE_ARGUMENTS = <%linker_exe_arguments%>
46 !error You must select one of these compilers:<%foreach(compilers)%> <%normalize(uc(compiler))%><%endfor%>
47 <%foreach(compilers)%>
51 <%foreach(configurations)%>
52 !ifdef <%normalize(uc(configuration))%>
53 OCFLAGS = <%if(optimize)%>$(OPTIMIZE_CFLAGS) <%else%><%if(debug_prj)%>$(DEBUG_CFLAGS)<%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%><%if(!debug_prj)%> $(RELEASE_CFLAGS)<%endif%>
54 LFLAGS =<%if(debug_prj)%> $(PDB_FLAGS)<%endif%>
55 CFG_DIR = <%intermediate_dir%>\\
56 LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
57 EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
58 <%if(type_is_static)%>
61 <%if(type_is_static || need_staticflags)%>
63 STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
67 DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
71 POSTLINKRM = <%postlinkrmext%>
74 EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
78 !error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%>
79 <%foreach(configurations)%>
84 UC_CFLAGS = <%unicode_flags%>
85 UNICODE_DIR = Unicode\\
87 ULIBMODIFIER = <%unicode_lib_modifier%>
88 UEXEMODIFIER = <%unicode_lib_modifier%>
99 LIBFLAGS = <%libflags%>
100 CCFLAGS = $(CC_CFLAGS)<%if(type_is_binary)%> $(BINARY_FLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
103 STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>
105 VCL_CFLAGS = -D_NO_VCL
106 STARTUP_LETTER = <%startup_letter%>
108 STARTUP_OBJ = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)
110 INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
112 NAME = <%exename%>$(EXEMODIFIER)
115 NAME = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER)
118 NAME = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER)
124 <%if(exename || sharedname || staticname)%>
127 <%foreach(source_files)%>
128 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
143 <%if(StackReserveSize)%>
144 $(STACK_LFLAG)<%StackReserveSize%> \
146 <%if(StackCommitSize)%>
147 /Sc:<%StackCommitSize%> \
150 -v<%if(libpaths)%> \<%endif%>
152 <%foreach(libpaths)%>
159 <%foreach(reverse(libs))%>
160 <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
162 <%foreach(reverse(lit_libs))%>
163 <%lit_lib%>$(LIB_EXT) \
165 <%foreach(reverse(platform_libs))%>
166 $(PLATFORM_LIBS_PREFIX)<%platform_libs%> \
168 <%foreach(reverse(pure_libs))%>
173 <%if(resource_files)%>
177 <%foreach(resource_files)%>
178 $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
183 <%foreach(includes)%>
184 -i"<%include%>"<%fornotlast(" \\")%>
191 # Set NO_USE_PCH if you do not want to use precompiled headers.
194 PCH_CFLAGS = <%foreach(pch_defines)%>-D<%pch_define%> <%endfor%>-H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
205 <%foreach(macros common_defines)%>
208 <%foreach(includes)%>
216 OUTPUTDIR = $(EXEOUTPUTDIR)
217 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
219 $(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
220 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
225 $(LINKER_EXE_ARGUMENTS)
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)"
240 $(LINKER_DLL_ARGUMENTS)
247 OUTPUTDIR = <%libout%>\\
248 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
250 $(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
251 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
252 $(TLIB) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
259 <%if(!exename && !sharedname && !staticname)%>
260 all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%>
265 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%>
266 <%foreach(custom_types)%>
267 <%if(custom_type->libpath)%>
268 PATH = $(PATH);<%custom_type->libpath%>
270 <%foreach(custom_type->input_files)%>
271 <%if(custom_type->input_file->output_files)%>
272 <%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%>
273 <%if(flag_overrides(custom_type->input_file, gendir))%>
274 @if not exist "<%flag_overrides(custom_type->input_file, gendir)%>" mkdir "<%flag_overrides(custom_type->input_file, gendir)%>"
276 <%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%>
277 <%if(flag_overrides(custom_type->input_file, postcommand))%>
278 <%foreach(custom_type->input_file)%>
279 <%flag_overrides(custom_type->input_file, postcommand)%>
282 <%if(custom_type->postcommand)%>
283 <%foreach(custom_type->input_file)%>
284 <%custom_type->postcommand%>
289 <%if(custom_type->pch_postrule)%>
290 <%foreach(custom_type->input_file->source_output_files)%>
291 @echo \#include "<%pch_header%>" > temporary.src
292 @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
293 @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%>
301 <%if(exename || sharedname || staticname)%>
303 $(OBJFILES): $(GENERATED_DIRTY)
305 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
308 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
312 generated: $(GENERATED_DIRTY)
315 .path$(OBJ_EXT) = $(INTERMEDIATE)
317 .path.cpp = $(CPPDIR)
319 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
320 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
322 .path.cxx = $(CPPDIR)
324 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
325 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
329 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
330 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
334 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
335 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
339 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
340 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
342 <%foreach(source_files)%>
343 <%if(transdir(source_file) || flag_overrides(source_file, buildflags))%>
344 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
345 @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
346 $(CC) <%if(flag_overrides(source_file, buildflags))%><%flag_overrides(source_file, buildflags)%> <%endif%>$(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) <%source_file%>
349 <%if(resource_files)%>
351 .path.res = $(INTERMEDIATE)
354 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
355 $(RC) $(RC_FLAGS) -fo$@ $<
356 <%foreach(resource_files)%>
357 <%if(transdir(resource_file))%>
358 "$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res":
359 @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>"
360 $(RC) -fo$@ <%resource_file%>
367 @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
370 <%foreach(custom_types)%>
371 <%foreach(custom_type->input_files)%>
372 <%if(custom_type->input_file->output_files)%>
373 <%foreach(custom_type->input_file->output_files)%>
374 <%if(flag_overrides(custom_type->input_file, gendir))%>
375 @del "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" 2>NUL
377 @del "<%custom_type->input_file->output_file%>" 2>NUL
384 @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL
387 @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL
390 @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL
393 <%if(exename || sharedname || staticname)%>
394 @del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL