Game Development Reference
In-Depth Information
Since you store the final build result in separate directories for each platform and
build configuration, you can set the output filename in the linker settings to
$(OutDir)/$(TargetName)$(TargetExt) for all build configurations and all platforms.
Rename Your Build Targets So They Exist in the Same Directory
You can distinguish the debug, profile, and release files by adding a
to the end of any final
build target. You could also use the $(ConfigurationName) macro if you wanted absolute clarity. If for
any reason the files need to coexist in the same directory, you don
“
d
”
or a
“
p
”
'
t have to worry about copying them
or creating temporary names.
With the target directories set right, Visual Studio has some macros you can use in
your project settings.
n
$(IntDir):
The path to intermediate files
n
$(OutDir):
The path to the output directory
n
$(TargetDir):
The path to the primary output file
n
$(TargetName):
The name of the primary output file of the build without the
extension
n
$(TargetPath):
The fully qualified path and filename for the output file
n
$(Configuration):
Set to the name of your current configuration, such as Debug
or Release
Use these macros for the following settings for all build configurations:
n
Debugging/Debugging Command:
$(TargetPath) will call the right executable
for each build target
n
Debugging/Working Directory:
Should be set to your Game directory
n
C
/C++/Precompiled Headers/Precompiled Header File:
$(IntDir)$(TargetName).pch
n
C/C++/Output Files:
$(IntDir) for the ASM list location, object filename, and
program database filename
n
Linker/Debug Settings/Generate Program Database File:
$(TargetDir)$(TargetName).pdb
n
Linker/Debug Settings/Map File:
$(TargetDir)$(TargetName).map