Sources Macros (Compact 7)
3/12/2014
A sources file is a text file that sets macro definitions to direct the compile and link operations of build.exe. Some of the more common macros that developers use are described below. You can find the full list of sources macros in Sources File.
Output File Macros
These macros describe the output files to create, providing file names, types, locations and other information.
- TARGETTYPE: Type of binary file to build. Common values are DYNLINK (for .dll files), PROGRAM (for .exe files), LIBRARY (for .lib files), and NOTARGET (for special sources files that do not produce an output binary).
- TARGETNAME: Name of the .dll, .exe, or .lib file to build.
- EXEENTRY or DLLENTRY: Name of the function that is used as an entry point for a .exe or .dll file.
- RELEASETYPE: Output directory in which to place binaries and libraries.
Input File Macros
These macros describe the inputs for the compiling and linking activities, including sources and libraries.
- DEFFILE: Name of the module definition file for .dll files.
- SOURCES: List of source code files to compile.
- TARGETLIBS: List of libraries to search for code references. Typically, this macro is used when creating a .dll or .exe file.
- SOURCELIBS: List of libraries whose object code is included in its entirety. Typically, this macro is used when creating a static .lib file.
Compiler and Linker Control Macros
These macros control the operation of the compiler and linker.
- CDEFINES / ADEFINES: Macros passed as #defines to the compiler and assembler, respectively.
- INCLUDES: Include path to search for the header files that are included by the source files.
Synchronization Macros
These macros are useful in the multithreaded build environment, which build.exe uses by default. During execution of build.exe, these macros ensure that modules with dependencies are not built until those dependencies are satisfied. Build.exe generally handles dependencies properly, but if you use special makefile rules, these macros may be necessary.
- SYNCHRONIZE_BLOCK: Deprecated in Windows Embedded CE 6.0, but still supported and occasionally used. This macro delays all future sources files in the dirs tree until the current one is completely finished building.
- SYNCHRONIZE_DRAIN: Deprecated in Windows Embedded CE 6.0, but still supported and occasionally used. This macro forces all previous sources files in the dirs tree to finish building before the current directory is built.
Makefile Rules Macros
These macros contain makefile rules.
- WINCETARGETFILE0: Specifies extra makefile rules to run once before all build passes (not once per pass).
- WINCETARGETFILES: Specifies extra makefile rules to run once after the link pass (not once per pass).