The -genmakeoption causes a makefile to be generated to assist in the C or C++ compilation of all of the generated source files. This makefile contains a rule to invoke XBinder to regenerate the .c and .h files if the XSD source file changes. It also contains rules to compile all of the C or C++ source files. Header file dependencies are generated for all the source files.
Two basic types of makefiles are generated:
A GNU compatible makefile. This makefile is compatible with the GNU make utility which is suitable for compiling code on Linux and many UNIX operating systems, and
A Microsoft Visual Studio compatible makefile. This makefile is compatible with the Microsoft Visual Studio nmakeutility.
A GNU compatible makefile is produced by default, the Microsoft compatible file is produced when the -w32command line option is specified in addition to -genmake.
Both of these makefile types rely on definitions in the platform.mkmake include file. This file contains parameters specific to different compiler and linker utilities available on different platforms. Typically, all the needs to be done to port to a different platform is to adjust the parameters in this file.
Related to -genmakeare the -genMakeLiband - genMakeDLLcommand-line options. -genmakecauses a makefile to be generated that will contain statements to compile the generated code into object files. -genMakeLibadds additional statements to store the object files in a static library file. -genMakeDLLadds additional statements to link the resulting objects into a Windows DLL or UNIX shared object file.