#----------------------------------------------------------------------------
#       Borland Makefile
#
# This file was automatically generated by MPC.  Any changes made directly to
# this file will be lost the next time it is generated.
#
#----------------------------------------------------------------------------
<%marker(top)%>
<%foreach(configurations)%>
!ifdef <%normalize(uc(configuration))%>
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%>
OCFLAGS32C   = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-Od -vi- <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
OCFLAGS64    = <%if(optimize)%>-O3<%else%><%if(debug_prj)%>-g -O0 <%foreach(debug_macros)%> -D<%debug_macro%><%endfor%><%endif%><%endif%><%foreach(defines)%> -D<%define%><%endfor%>
CFG_DIR      = <%intermediate_dir%>\\
LIBMODIFIER  = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
EXEMODIFIER  = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
<%if(type_is_static)%>
STATIC_CFG   = 1
<%endif%>
<%if(type_is_static || need_staticflags)%>
<%if(staticflags)%>
STATIC_FLAGS =<%foreach(staticflags)%> -D<%staticflag%><%endfor%>
<%endif%>
<%else%>
<%if(dynamicflags)%>
DYN_FLAGS    =<%foreach(dynamicflags)%> -D<%dynamicflag%><%endfor%>
<%endif%>
<%endif%>
<%if(postlinkrmext)%>
POSTLINKRM   = <%postlinkrmext%>
<%endif%>
<%if(exename)%>
EXEOUTPUTDIR = <%if(exeout)%><%exeout%><%if(windows_style)%>\<%output_dir("Debug")%><%endif%><%else%><%if(windows_style)%><%output_dir("Debug")%><%else%><%output_dir(".")%><%endif%><%endif%>\\
<%endif%>
!else
<%endfor%>
!error You must define one of these valid configurations:<%foreach(configurations)%> <%normalize(uc(configuration))%><%endfor%>
<%foreach(configurations)%>
!endif
<%endfor%>

!ifdef UNICODE
UC_CFLAGS    = <%unicode_flags%>
UNICODE_DIR  = Unicode\\
UC_MAIN      = w
ULIBMODIFIER = <%unicode_lib_modifier%>
UEXEMODIFIER = <%unicode_lib_modifier%>
!endif

!ifdef CODEGUARD
CG_CFLAGS = -vG
CG_LIB    = cg32.lib
!endif

DLL_EXT      = <%dll_ext%>
EXE_EXT      = <%exe_ext%>
<%if(build64bit)%>
STARTUP_BITS = 64
CC64         = <%cc64%>
LINK64       = <%link64%>
LIB_EXT      = <%lib64_ext%>
OBJ_EXT      = <%obj64_ext%>
THREADFLAGS  = <%thrflags64%>
BINARYFLAGS  = <%binaryflags64%>
LINKERPATHS  = -L"$(BDS)\lib\win64\debug" -L"$(BDS)\lib\win64\release"
WARNFLAGS64  = <%warnflags64%>
<%else%>
LINK32       = <%link32%>
STARTUP_BITS = 32
!ifdef CLASSIC
CC32         = <%cc32%>
LIB_EXT      = <%lib32_ext%>
OBJ_EXT      = <%obj32_ext%>
THREADFLAGS  = <%thrflags32%>
BINARYFLAGS  = <%binaryflags32%>
LINKERPATHS  = -L"$(BDS)\lib\win32\release" -L"$(BDS)\lib\win32\debug"
WARNFLAGS32  = <%warnflags32%>
!else
CC32C        = <%cc32c%>
LIB_EXT      = <%lib32c_ext%>
OBJ_EXT      = <%obj32c_ext%>
THREADFLAGS  = <%thrflags32c%>
BINARYFLAGS  = <%binaryflags32c%>
LINKERPATHS  = -L"$(BDS)\lib\win32c\debug" -L"$(BDS)\lib\win32c\release"
WARNFLAGS32C = <%warnflags32c%>
!endif
<%endif%>
RC           = <%rc%>
TLIB32       = <%tlib32%>
DLLFLAGS     = <%dllflags%>
LIBFLAGS     = <%libflags%>
EXEFLAGS     = <%exeflags%>
CCFLAGS      = <%ccflags%><%if(type_is_binary)%> $(BINARYFLAGS)<%endif%><%if(compile_flags)%> <%compile_flags%><%endif%>

<%if(use_vcl)%>
STARTUP_LETTER = <%if(exename)%>w<%else%><%startup_letter%><%endif%>
<%else%>
VCL_CFLAGS     = -D_NO_VCL
STARTUP_LETTER = <%startup_letter%>
<%endif%>
STARTUP_OBJ    = c0$(STARTUP_LETTER)$(STARTUP_BITS)$(UC_MAIN)$(OBJ_EXT)

INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
<%if(exename)%>
NAME         = <%exename%>$(EXEMODIFIER)
<%else%>
<%if(sharedname)%>
NAME         = <%libname_prefix%><%sharedname%>$(LIBMODIFIER)$(ULIBMODIFIER)
<%else%>
<%if(staticname)%>
NAME         = <%libname_prefix%><%staticname%>$(LIBMODIFIER)$(ULIBMODIFIER)
<%endif%>
<%endif%>
<%endif%>
CPPDIR       = <%cppdir%>
RESDIR       = <%rcdir%>
<%if(exename || sharedname || staticname)%>

OBJFILES = \
<%foreach(source_files)%>
           "$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)"<%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%if(libpaths)%>

LFLAGS   = \
           $(LINKERPATHS) \
<%if(debug_prj)%>
           -v \
           -r \
<%endif%>
<%if(linkflags)%>
        <%linkflags%> \
<%endif%>
<%if(StackReserveSize)%>
           /S:<%StackReserveSize%> \
<%endif%>
<%if(StackCommitSize)%>
           /Sc:<%StackCommitSize%> \
<%endif%>
<%if(!optimize)%>
           -v<%if(libpaths)%> \<%endif%>
<%endif%>
<%foreach(libpaths)%>
           -L"<%libpath%>" -j"<%libpath%>"<%fornotlast(" \\")%>
<%endfor%>
<%endif%>

<%if(build64bit)%>
COMMON_LIBS = <%common_libs%> <%common64_libs%>
<%else%>
!ifdef CLASSIC
COMMON_LIBS = $(CG_LIB) <%common_libs%> <%common32_libs%>
!else
COMMON_LIBS = <%common_libs%> <%common32c_libs%>
!endif
<%endif%>

LIBFILES = \
<%foreach(reverse(libs))%>
           <%libname_prefix%><%lib%>$(LIBMODIFIER)$(ULIBMODIFIER)$(LIB_EXT) \
<%endfor%>
<%foreach(reverse(lit_libs))%>
           <%lit_lib%>$(LIB_EXT) \
<%endfor%>
<%foreach(reverse(pure_libs))%>
           <%pure_lib%> \
<%endfor%>
           $(COMMON_LIBS)

<%if(resource_files)%>

!ifndef STATIC_CFG
RESOURCE = \
<%foreach(resource_files)%>
           $(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res<%fornotlast(" \\")%>
<%endfor%>
<%if(includes)%>

RC_FLAGS = \
<%foreach(includes)%>
        -i"<%include%>"<%fornotlast(" \\")%>
<%endfor%>
<%endif%>
!endif
<%endif%>
<%if(!build64bit)%>
<%if(pch_header)%>

# Borland bcc32 precompiled headers can choke on some header files.
# Set NO_USE_PCH if you do not want to use precompiled headers.
!ifndef NO_USE_PCH
!ifdef CLASSIC
PCH_CFLAGS = \
<%foreach(pch_defines)%>
             -D<%pch_define%> \
<%endfor%>
             -H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
!endif
!endif
<%endif%>
<%endif%>

<%if(build64bit)%>
COMMON_FLAGS = \
<%foreach(common64_flags)%>
         <%common64_flag%><%fornotlast(" \\")%>
<%endfor%>
<%else%>
!ifdef CLASSIC
COMMON_FLAGS = \
<%foreach(common32_flags)%>
         <%common32_flag%><%fornotlast(" \\")%>
<%endfor%>
!else
COMMON_FLAGS = \
<%foreach(common32c_flags)%>
         <%common32c_flag%><%fornotlast(" \\")%>
<%endfor%>
!endif
<%endif%>

<%if(build64bit)%>
<%if(common64_defines)%>
COMMON_DEFINES = \
<%foreach(common64_defines)%>
         -D<%common64_define%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%else%>
!ifdef CLASSIC
<%if(common32_defines)%>
COMMON_DEFINES = \
<%foreach(common32_defines)%>
         -D<%common32_define%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
!else
<%if(common32c_defines)%>
COMMON_DEFINES = \
<%foreach(common32c_defines)%>
         -D<%common32c_define%><%fornotlast(" \\")%>
<%endfor%>
<%endif%>
!endif
<%endif%>

CFLAGS = \
<%foreach(cflags)%>
         <%cflag%> \
<%endfor%>
         $(COMMON_FLAGS) \
         $(COMMON_DEFINES) \
<%foreach(macros common_defines)%>
         -D<%macro%> \
<%endfor%>
<%foreach(includes)%>
         -I"<%include%>" \
<%endfor%>
         $(PCH_CFLAGS) \
         $(VCL_CFLAGS)

<%marker(macros)%>
<%if(exename)%>
OUTPUTDIR = $(EXEOUTPUTDIR)
all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>

$(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
  @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
<%if(prelink)%>
  <%eval(prelink)%>
<%endif%>
<%if(build64bit)%>
  $(LINK64) @&&!
<%else%>
  $(LINK32) @&&!
<%endif%>
  $(EXEFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE)
!

<%endif%>
<%if(sharedname)%>
!ifndef STATIC_CFG
OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>

$(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
  @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
<%if(prelink)%>
  <%eval(prelink)%>
<%endif%>
<%if(build64bit)%>
  $(LINK64) @&&!
<%else%>
  $(LINK32) @&&!
<%endif%>
  $(DLLFLAGS) $(LFLAGS) $(STARTUP_OBJ) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE)
!
!endif

<%endif%>
<%if(staticname)%>
!ifdef STATIC_CFG
OUTPUTDIR = <%libout%>\\
all:<%if(prebuild)%> __prebuild__<%endif%> $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>

$(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
  @if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
  $(TLIB32) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
+ $(**: = &^
+ )
!
!endif

<%endif%>
<%if(!exename && !sharedname && !staticname)%>
all:<%if(prebuild)%> __prebuild__<%endif%><%if(postbuild)%> __postbuild__<%endif%>
  @-rem

<%endif%>
<%if(custom_types)%>
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%>
<%foreach(custom_types)%>
<%if(custom_type->libpath)%>
PATH = $(PATH);<%custom_type->libpath%>
<%endif%>
<%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%><%fornotlast(" ")%><%endfor%>: <%custom_type->input_file%><%if(custom_type->input_file->dependencies)%> <%custom_type->input_file->dependencies%><%endif%>
<%if(flag_overrides(custom_type->input_file, gendir))%>
        @if not exist "<%flag_overrides(custom_type->input_file, gendir)%>" mkdir "<%flag_overrides(custom_type->input_file, gendir)%>"
<%endif%>
  <%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%>
<%if(flag_overrides(custom_type->input_file, postcommand))%>
<%foreach(custom_type->input_file)%>
  <%flag_overrides(custom_type->input_file, postcommand)%>
<%endfor%>
<%else%>
<%if(custom_type->postcommand)%>
<%foreach(custom_type->input_file)%>
  <%custom_type->postcommand%>
<%endfor%>
<%endif%>
<%endif%>
<%if(pch_header)%>
<%if(custom_type->pch_postrule)%>
<%foreach(custom_type->input_file->source_output_files)%>
  @echo \#include "<%pch_header%>" > temporary.src
  @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
  @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%>
<%endfor%>
<%endif%>
<%endif%>

<%endif%>
<%endfor%>
<%endfor%>
<%if(exename || sharedname || staticname)%>
<%if(source_files)%>
$(OBJFILES): $(GENERATED_DIRTY)
<%else%>
all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
<%endif%>
<%else%>
all:<%if(prebuild)%> __prebuild__<%endif%> $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
<%endif%>

<%endif%>
generated: $(GENERATED_DIRTY)
  @-rem

.path$(OBJ_EXT) = $(INTERMEDIATE)

.path.cpp = $(CPPDIR)
<%if(build64bit)%>
.cpp$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
<%else%>
!ifdef CLASSIC
.cpp$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
!else
.cpp$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
!endif
<%endif%>

.path.cxx = $(CPPDIR)
<%if(build64bit)%>
.cxx$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
<%else%>
!ifdef CLASSIC
.cxx$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
!else
.cxx$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
!endif
<%endif%>

.path.cc = $(CPPDIR)
<%if(build64bit)%>
.cc$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
<%else%>
!ifdef CLASSIC
.cc$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
!else
.cc$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
!endif
<%endif%>

.path.C = $(CPPDIR)
<%if(build64bit)%>
.C$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
<%else%>
!ifdef CLASSIC
.C$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
!else
.C$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
!endif
<%endif%>

.path.c = $(CPPDIR)
<%if(build64bit)%>
.c$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC64) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS64) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS64) -c -o $(@D)\$(@F) $<
<%else%>
!ifdef CLASSIC
.c$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32) -c -n$(@D) $<
!else
.c$(OBJ_EXT):
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(CC32C) $(DYN_FLAGS) $(STATIC_FLAGS) $(OCFLAGS32C) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS32C) -c -o $(@D)\$(@F) $<
!endif
<%endif%>

<%foreach(source_files)%>
<%if(transdir(source_file) || flag_overrides(source_file, buildflags))%>
"$(INTERMEDIATE)\<%transdir(source_file)%><%basenoextension(source_file)%>$(OBJ_EXT)":
  @if not exist "$(INTERMEDIATE)\<%transdir(source_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(source_file)%>"
<%if(build64bit)%>
  $(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%>
<%else%>
!ifdef CLASSIC
  $(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%>
!else
  $(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%>
!endif
<%endif%>

<%endif%>
<%endfor%>
<%if(resource_files)%>
!ifndef STATIC_CFG
.path.res = $(INTERMEDIATE)

.path.rc = $(RESDIR)
.rc.res:
  @if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
        $(RC) $(RC_FLAGS) -fo$@ $<

<%foreach(resource_files)%>
<%if(transdir(resource_file))%>
"$(INTERMEDIATE)\<%transdir(resource_file)%><%basenoextension(resource_file)%>.res":
  @if not exist "$(INTERMEDIATE)\<%transdir(resource_file)%>" mkdir "$(INTERMEDIATE)\<%transdir(resource_file)%>"
  $(RC) -fo$@ <%resource_file%>

<%endif%>
<%endfor%>
!endif

<%endif%>
clean:
        @if exist "$(INTERMEDIATE)" rmdir /s/q $(INTERMEDIATE)

realclean: clean
<%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))%>
        @del "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" 2>NUL
<%else%>
        @del "<%custom_type->input_file->output_file%>" 2>NUL
<%endif%>
<%endfor%>
<%endif%>
<%endfor%>
<%endfor%>
<%if(exename)%>
        @del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" 2>NUL
<%else%>
<%if(sharedname)%>
        @del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" 2>NUL
<%endif%>
<%if(staticname)%>
        @del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" 2>NUL
<%endif%>
<%endif%>
<%if(exename || sharedname || staticname)%>
        @del "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" 2>NUL
<%endif%>
<%if(postclean)%>
  -<%eval(postclean)%>
<%endif%>

<%if(prebuild)%>
__prebuild__:
  @<%eval(prebuild)%>

<%endif%>
<%if(postbuild)%>
__postbuild__:
  @<%eval(postbuild)%>

<%endif%>
<%marker(local)%>
<%marker(bottom)%>
