Use Custom Makefile Rules (Compact 2013)
3/26/2014
Custom makefile rules can control Build Tool (Build.exe) in ways that Sources Macros cannot. For instance, you can specify that actions such as copying files and running external programs occur before or after the compile phase.
One common use of custom makefile rules is to turn a compiled boot loader into a binary image file that you can download and flash to a target device. The following example demonstrates how to do this in the directory platform of your choice.
In the sources file, the WINCETARGETFILES macro calls out a makefile rule named BootImage. To avoid editing the makefile directly, specify the rule in Makefile.inc, which Makefile.def includes automatically.
For Makefile.inc in this directory, there is only one rule, which is a series of simple commands that creates the Boot.bin and Boot.sre files. This rule could just as easily copy files, delete files, or perform another operation.
If you need a rule to run before the compile phase, use WINCETARGETFILE0 instead.