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 LINKER_PASSTHROUGH = <%linker_passthrough%>
28 STARTUP_BITS = <%startup_bits%>
30 COMMON_LIBS = <%common_libs%>
32 DLLFLAGS = <%dllflags%>
33 <%if(pch)%>PCH = 1<%endif%>
34 <%if(objectsearchpath)%>
37 -j"<%libpath%>"<%fornotlast(" \\")%>
40 EXEFLAGS = <%exeflags%>
41 LINKER_DLL_ARGUMENTS = <%linker_dll_arguments%>
42 LINKER_EXE_ARGUMENTS = <%linker_exe_arguments%>
45 !error You must select one of these compilers:<%foreach(compilers)%> <%normalize(uc(compiler))%><%endfor%>
46 <%foreach(compilers)%>
50 <%foreach(configurations)%>
51 !ifdef <%normalize(uc(configuration))%>
52 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%>
53 LFLAGS =<%if(debug_prj)%> $(PDB_FLAGS)<%endif%>
54 CFG_DIR = <%intermediate_dir%>\\
55 LIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
56 EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
57 <%if(type_is_static)%>
60 <%if(type_is_static || need_staticflags)%>
62 STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
66 DYN_FLAGS =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
70 POSTLINKRM = <%postlinkrmext%>
73 EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
77 !error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%>
78 <%foreach(configurations)%>
83 UC_CFLAGS = <%unicode_flags%>
84 UNICODE_DIR = Unicode\\
86 ULIBMODIFIER = <%unicode_lib_modifier%>
87 UEXEMODIFIER = <%unicode_lib_modifier%>
98 LIBFLAGS = <%libflags%>
99 CCFLAGS = $(CC_CFLAGS)<%if(type_is_binary)%> $(BINARY_FLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>
102 STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>
104 VCL_CFLAGS = -D_NO_VCL
105 STARTUP_LETTER = <%startup_letter%>
107 STARTUP_OBJ = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)
109 INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
111 NAME = <%exename%>$(EXEMODIFIER)
114 NAME = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER)
117 NAME = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER)
123 <%if(exename || sharedname || staticname)%>
126 <%foreach(source_files)%>
127 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
142 <%if(StackReserveSize)%>
143 $(STACK_LFLAG)<%StackReserveSize%> \
145 <%if(StackCommitSize)%>
146 /Sc:<%StackCommitSize%> \
149 -v<%if(libpaths)%> \<%endif%>
151 <%foreach(libpaths)%>
158 <%foreach(reverse(libs))%>
159 $(LINKER_PASSTHROUGH) <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
161 <%foreach(reverse(lit_libs))%>
162 $(LINKER_PASSTHROUGH) <%lit_lib%>$(LIB_EXT) \
164 <%foreach(reverse(platform_libs))%>
165 $(PLATFORM_LIBS_PREFIX)<%platform_libs%> \
167 <%foreach(reverse(pure_libs))%>
172 <%if(resource_files)%>
176 <%foreach(resource_files)%>
177 $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
182 <%foreach(includes)%>
183 -i"<%include%>"<%fornotlast(" \\")%>
190 # Set NO_USE_PCH if you do not want to use precompiled headers.
193 PCH_CFLAGS = <%foreach(pch_defines)%>-D<%pch_define%> <%endfor%>-H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
204 <%foreach(macros common_defines)%>
207 <%foreach(includes)%>
215 OUTPUTDIR = $(EXEOUTPUTDIR)
216 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
218 $(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
219 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
224 $(LINKER_EXE_ARGUMENTS)
230 OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
231 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>
233 $(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
234 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
239 $(LINKER_DLL_ARGUMENTS)
246 OUTPUTDIR = <%libout%>\\
247 all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
249 $(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
250 @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
251 $(TLIB) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
258 <%if(!exename && !sharedname && !staticname)%>
259 all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%>
264 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%>
265 <%foreach(custom_types)%>
266 <%if(custom_type->libpath)%>
267 PATH = $(PATH);<%custom_type->libpath%>
269 <%foreach(custom_type->input_files)%>
270 <%if(custom_type->input_file->output_files)%>
271 <%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%>
272 <%if(flag_overrides(custom_type->input_file, gendir))%>
273 @if not exist "<%flag_overrides(custom_type->input_file, gendir)%>" mkdir "<%flag_overrides(custom_type->input_file, gendir)%>"
275 <%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%>
276 <%if(flag_overrides(custom_type->input_file, postcommand))%>
277 <%foreach(custom_type->input_file)%>
278 <%flag_overrides(custom_type->input_file, postcommand)%>
281 <%if(custom_type->postcommand)%>
282 <%foreach(custom_type->input_file)%>
283 <%custom_type->postcommand%>
288 <%if(custom_type->pch_postrule)%>
289 <%foreach(custom_type->input_file->source_output_files)%>
290 @echo \#include "<%pch_header%>" > temporary.src
291 @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
292 @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%>
300 <%if(exename || sharedname || staticname)%>
302 $(OBJFILES): $(GENERATED_DIRTY)
304 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
307 all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
311 generated: $(GENERATED_DIRTY)
314 .path$(OBJ_EXT) = $(INTERMEDIATE)
316 .path.cpp = $(CPPDIR)
318 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
319 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
321 .path.cxx = $(CPPDIR)
323 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
324 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
328 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
329 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
333 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
334 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
338 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
339 $(CC) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREAD_FLAGS) $(CCFLAGS) $(CFLAGS) $(WARN_FLAGS) -c -o $(@D)\$(@F) $<
341 <%foreach(source_files)%>
342 <%if(transdir(source_file) || flag_overrides(source_file, buildflags))%>
343 "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
344 @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
345 $(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%>
348 <%if(resource_files)%>
350 .path.res = $(INTERMEDIATE)
353 @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
354 $(RC) $(RC_FLAGS) -fo$@ $<
355 <%foreach(resource_files)%>
356 <%if(transdir(resource_file))%>
357 "$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res":
358 @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>"
359 $(RC) -fo$@ <%resource_file%>
366 @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)
369 <%foreach(custom_types)%>
370 <%foreach(custom_type->input_files)%>
371 <%if(custom_type->input_file->output_files)%>
372 <%foreach(custom_type->input_file->output_files)%>
373 <%if(flag_overrides(custom_type->input_file, gendir))%>
374 @del "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" 2>NUL
376 @del "<%custom_type->input_file->output_file%>" 2>NUL
383 @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL
386 @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL
389 @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL
392 <%if(exename || sharedname || staticname)%>
393 @del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL