Chapter 9. Format specific documentation

Table of Contents

MS VisualStudio 2005/2008 extended functionality
Watcom format extended functionality
Install and uninstall support on Windows

Depending on the format there are some additional steps required to get extra functionality specific to this format.

MS VisualStudio 2005/2008 extended functionality

The msvs2005prj and msvs2008prj formats are capable of generating project files both for Win32 PC platform and for embedded platform. By default, only Win32 configurations are generated, embedded configurations must be explicitly enabled.

This is done by setting the MSVS_PLATFORMS variable to comma-separated list of platforms to use. Accepted platform identifiers are:

Platform identifierVisual Studio name
win32Win32
win64x64
pocketpc2003Pocket PC 2003 (ARMV4)

The variable must be set before user bakefile file is processed, i.e. it has to be done using command-line -D argument or in the Bakefiles.bkgen file.

For example, the following command causes Bakefile to generate projects for Pocket PC 2003:

$ bakefile -fmsvs2005prj -DMSVS_PLATFORMS=pocketpc2003 hello.bkl

And this generates hybrid project for both PocketPC and Win32 platforms:

$ bakefile -fmsvs2005prj -DMSVS_PLATFORMS=win32,pocketpc2003 hello.bkl

Watcom format extended functionality

Open Watcom compiler has possibility of crossplatform building for many platforms. MS Windows binaries are the most common used output of this compiler but it has also possibility of building for DOS, OS/2 and other operating systems. Because of that by default watcom makefiles are outputed with settings for building windows binaries. This default setting can be changed by defining additional platform variable.

# generate makefile.wat dedicated to windows development
bakefile -f watcom file.bkl

# generate makefile.wat dedicated to DOS development in extended 32-bit mode
bakefile -f watcom -DPLATFORM_MSDOS=1 file.bkl

# generate makefile.wat dedicated to OS/2 development
bakefile -f watcom -DPLATFORM_OS2=1 file.bkl

PLATFORM_MSDOS note

Only 32-bit DOS mode with dedicated extender is supported. Generated makefile contains additional DOS32 variable which points to desired extender. Expected values: X32VM, X32, PMODEW, CAUSEWAY, DOS32A and default DOS4GW .

Install and uninstall support on Windows

By default the install-to and install-headers-to tags won't have any effect on Windows since the install and uninstall MAKE targets are not very common there (unlike in the Unix world).

However you may find it useful to have (un)installation targets under Windows as well. In this case you can enable this feature by defining the FORMAT_HAS_MAKE_INSTALL variable and setting it to 1:

# enable install and uninstall support also under Windows: 
bakefile file.bkl -f msvc -DFORMAT_HAS_MAKE_INSTALL=1

When enabling the install/uninstall support for Windows, you should also set the desired PREFIX and EXEC_PREFIX in your bakefile:

<set var="PREFIX">%MYPROJECTROOT%</set>
<set var="EXEC_PREFIX">%MYPROJECTROOT%</set>