Rev 107 | Go to most recent revision | Blame | Last modification | View Log | RSS feed
#----------------------------------------------------------------------------
# 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 <%uc(configuration)%>
OCFLAGS = <%if(optimize)%>-O2<%else%>-v -y -Od -vi- -k<%endif%><%foreach(defines debug_macros)%> -D<%define%><%endfor%>
CFG_DIR = <%intermediate_dir%>\\
ILIBMODIFIER = <%lib_modifier%>
OLIBMODIFIER = <%if(use_lib_modifier)%><%lib_modifier%><%endif%>
EXEMODIFIER = <%if(use_exe_modifier)%><%lib_modifier%><%endif%>
<%if(postlinkrmext)%>
POSTLINKRM = <%postlinkrmext%>
<%endif%>
<%if(exename)%>
EXEOUTPUTDIR = <%exeoutputdir(".")%>\\
<%endif%>
!else
<%endfor%>
!error You must define one of these valid configurations: <%configurations%>
<%foreach(configurations)%>
!endif
<%endfor%>
!ifdef UNICODE
UC_CFLAGS = <%unicode_flags%>
UNICODE_DIR = Unicode\\
UC_MAIN = w
!endif
!ifdef CODEGUARD
CG_CFLAGS = -vG
CG_LIB = cg32.lib
!endif
<%foreach(compilers)%>
<%fornotlast("!ifdef")%><%forlast("!else #")%> <%uc(compiler)%>
OBJ_EXT = <%obj_ext%>
DLL_EXT = <%dll_ext%>
LIB_EXT = <%lib_ext%>
EXE_EXT = <%exe_ext%>
CC = <%cc%>
RC = <%rc%>
LINK = <%link%>
TLIB = <%tlib%>
THREADFLAGS = <%thflags%>
DLLFLAGS = <%dllflags%>
LIBFLAGS = <%libflags%>
EXEFLAGS = <%exeflags%>
WARNFLAGS = <%warnflags%>
CCFLAGS = <%ccflags%><%if(compile_flags)%> <%compile_flags%><%endif%>
<%endfor%>
!endif
INTERMEDIATE = $(CFG_DIR)$(UNICODE_DIR)<%noextension(project_name)%>
<%if(exename)%>
NAME = <%exename%>$(EXEMODIFIER)
<%else%>
<%if(sharedname)%>
NAME = <%libname_prefix%><%sharedname%>$(OLIBMODIFIER)
<%else%>
<%if(staticname)%>
NAME = <%libname_prefix%><%staticname%>$(OLIBMODIFIER)
<%endif%>
<%endif%>
<%endif%>
CPPDIR = <%cppdir%>
RESDIR = <%rcdir%>
<%if(exename || sharedname || staticname)%>
OBJFILES = \
<%foreach(source_files)%>
"$(INTERMEDIATE)\<%if(dirname(source_file))%><%noextension(source_file)%><%else%><%basenoextension(source_file)%><%endif%>$(OBJ_EXT)"<%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%if(libpaths)%>
LFLAGS = \
<%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%>
LIBFILES = \
<%foreach(reverse(libs))%>
<%libname_prefix%><%lib%>$(ILIBMODIFIER)$(LIB_EXT) \
<%endfor%>
<%foreach(reverse(lit_libs))%>
<%lit_lib%>$(LIB_EXT) \
<%endfor%>
<%foreach(reverse(pure_libs))%>
<%pure_lib%> \
<%endfor%>
$(CG_LIB) <%common_libs%>
<%if(resource_files && !type_is_static)%>
RESOURCE = \
<%foreach(resource_files)%>
$(INTERMEDIATE)\<%noextension(resource_file)%>.res<%fornotlast(" \\")%>
<%endfor%>
<%if(includes)%>
RC_FLAGS = \
<%foreach(includes)%>
-i"<%include%>"<%fornotlast(" \\")%>
<%endfor%>
<%endif%>
<%endif%>
<%if(pch_header)%>
# Borland 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
PCH_CFLAGS = \
<%foreach(pch_defines)%>
-D<%pch_define%> \
<%endfor%>
-H=$(INTERMEDIATE)\<%noextension(project_name)%>.csm -Hh=<%pch_header%>
!endif
<%endif%>
CFLAGS = \
$(PCH_CFLAGS) \
<%foreach(cc_flags)%>
<%cc_flags%> \
<%endfor%>
<%foreach(common_flags)%>
<%common_flags%> \
<%endfor%>
<%foreach(macros common_defines)%>
-D<%macro%> \
<%endfor%>
<%if(type_is_static || need_staticflags)%>
<%if(staticflags)%>
<%foreach(staticflags)%>
-D<%staticflag%> \
<%endfor%>
<%endif%>
<%else%>
<%if(dynamicflags)%>
<%foreach(dynamicflags)%>
-D<%dynamicflag%> \
<%endfor%>
<%endif%>
<%endif%>
<%foreach(includes)%>
-I"<%include%>" \
<%endfor%>
$(DUMMY_VALUE_NOT_ENDING_IN_BACKSLASH)
<%marker(macros)%>
<%if(exename)%>
OUTPUTDIR = <%if(install)%><%install%>\\<%else%>$(EXEOUTPUTDIR)<%endif%>
all: $(OUTPUTDIR)$(NAME)$(EXE_EXT)<%if(postbuild)%> __postbuild__<%endif%>
$(OUTPUTDIR)$(NAME)$(EXE_EXT): $(OBJFILES) $(RESOURCE)
@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
$(LINK) @&&!
$(EXEFLAGS) $(LFLAGS) <%startup_obj%>$(UC_MAIN)$(OBJ_EXT) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(EXE_EXT),, $(LIBFILES),, $(RESOURCE)
!
<%endif%>
<%if(sharedname)%>
OUTPUTDIR = <%if(dllout)%><%dllout%><%else%><%libout%><%endif%>\\
all: $(OUTPUTDIR)$(NAME)$(DLL_EXT)<%if(postbuild)%> __postbuild__<%endif%>
$(OUTPUTDIR)$(NAME)$(DLL_EXT): $(OBJFILES) $(RESOURCE)
@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
$(LINK) @&&!
$(DLLFLAGS) $(LFLAGS) <%startup_obj%>$(UC_MAIN)$(OBJ_EXT) $(OBJFILES), $(OUTPUTDIR)$(NAME)$(DLL_EXT),, $(LIBFILES),, $(RESOURCE)
!
<%endif%>
<%if(type_is_static && staticname)%>
OUTPUTDIR = <%libout%>\\
all: $(OUTPUTDIR)$(NAME)$(LIB_EXT)<%if(postbuild)%> __postbuild__<%endif%>
$(OUTPUTDIR)$(NAME)$(LIB_EXT): $(OBJFILES)
@if not exist "$(OUTPUTDIR)" mkdir "$(OUTPUTDIR)"
$(TLIB) $(LIBFLAGS) $(OUTPUTDIR)$(NAME)$(LIB_EXT) @&&!
+ $(**: = &^
+ )
!
<%endif%>
<%if(!exename && !sharedname && !staticname)%>
all:<%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)%>
<%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->output_option%> $@<%endif%> <%custom_type->input_file%>
<%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: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
<%endif%>
<%else%>
all: $(GENERATED_DIRTY)<%if(postbuild)%> __postbuild__<%endif%>
<%endif%>
<%endif%>
generated: $(GENERATED_DIRTY)
@-rem
.path$(OBJ_EXT) = $(INTERMEDIATE)
.path.cpp = $(CPPDIR)
.cpp$(OBJ_EXT):
@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
.path.cxx = $(CPPDIR)
.cxx$(OBJ_EXT):
@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
.path.cc = $(CPPDIR)
.cc$(OBJ_EXT):
@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
.path.C = $(CPPDIR)
.C$(OBJ_EXT):
@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
.path.c = $(CPPDIR)
.c$(OBJ_EXT):
@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) $<
<%foreach(source_files)%>
<%if(dirname(source_file))%>
"$(INTERMEDIATE)\<%noextension(source_file)%>$(OBJ_EXT)":
@if not exist "$(INTERMEDIATE)\<%dirname(source_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(source_file)%>"
$(CC) $(OCFLAGS) $(CG_CFLAGS) $(UC_CFLAGS) $(THREADFLAGS) $(CCFLAGS) $(CFLAGS) $(WARNFLAGS) -c -n$(@D) <%source_file%>
<%endif%>
<%endfor%>
<%if(resource_files && !type_is_static)%>
.path.res = $(INTERMEDIATE)
.path.rc = $(RESDIR)
.rc.res:
@if not exist "$(INTERMEDIATE)" mkdir "$(INTERMEDIATE)"
$(RC) $(RC_FLAGS) -fo$@ $<
<%foreach(resource_files)%>
<%if(dirname(resource_file))%>
"$(INTERMEDIATE)\<%noextension(resource_file)%>.res":
@if not exist "$(INTERMEDIATE)\<%dirname(resource_file)%>" mkdir "$(INTERMEDIATE)\<%dirname(resource_file)%>"
$(RC) -fo$@ <%resource_file%>
<%endif%>
<%endfor%>
<%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))%>
if exist "<%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>" del <%flag_overrides(custom_type->input_file, gendir)%>\<%basename(custom_type->input_file->output_file)%>
<%else%>
if exist "<%custom_type->input_file->output_file%>" del <%custom_type->input_file->output_file%>
<%endif%>
<%endfor%>
<%endif%>
<%endfor%>
<%endfor%>
<%if(exename)%>
if exist "$(OUTPUTDIR)$(NAME)$(EXE_EXT)" del $(OUTPUTDIR)$(NAME)$(EXE_EXT)
<%else%>
<%if(sharedname)%>
if exist "$(OUTPUTDIR)$(NAME)$(DLL_EXT)" del $(OUTPUTDIR)$(NAME)$(DLL_EXT)
<%endif%>
<%if(staticname)%>
if exist "$(OUTPUTDIR)$(NAME)$(LIB_EXT)" del $(OUTPUTDIR)$(NAME)$(LIB_EXT)
<%endif%>
<%endif%>
<%if(exename || sharedname || staticname)%>
if exist "$(OUTPUTDIR)$(NAME)$(POSTLINKRM)" del $(OUTPUTDIR)$(NAME)$(POSTLINKRM)
<%endif%>
<%if(postbuild)%>
__postbuild__:
@<%eval(postbuild)%>
<%endif%>
<%marker(local)%>
<%marker(bottom)%>