
You may customize your makefiles using a series of code generation options. Options include generating makefiles for alternate platforms, assigning customized names to makefiles, and others. This section discusses the various options available.
The use of either the -noserver, -noclient, or -nosample options results in the generation of makefiles that don't build server components, client components, or sample applications, respectively. For example, the command
prompt> leifgen -projectname MyProject -noserver MyProject.wsdl
generates only client-side code with a corresponding set of makefiles that build only client-side code.
If you generate code with one of these options, and then later regenerate without the option in the same project directory, the code generator will regenerate the makefile as appropriate.
You may turn off the automatic generation of makefiles by using the -nomake option at code generation:
prompt> leifgen -projectname MyProject -nomake MyProject.wsdl
LEIF supports the creation of makefiles for any supported OS/compiler combination. When you generate code, by default LEIF creates makefiles for MSVC 7.1. If you wish to create additional makefiles for a non-default OS/compiler combination, use the -platform option when generating code, as follows:
prompt> leifgen -projectname MyProject -platform solaris-gcc myProject.wsdl
For the above command, LEIF generates makefiles gcc for Solaris based on MyProject.wsdl. If previously-generated code exists in the project directory, and no new options were provided that would change the generated classes, LEIF just generates new makefiles.
Generated makefiles with the default name makefile are overwrite protected, meaning that if the project directory contains existing makefiles named makefile or makefile_debug, LEIF appends a ".sample" extension to avoid overwriting them. (See Section 10.7 for information on overwrite protection.) To easily distinguish between makefiles for various platforms, we recommend that you name your makefile another name, using the -makefilename name option. See Section 12.3.4.
If you wish to build your application for more than one platform, first create one set of makefiles for one platform, move or harvest the generated libraries and binaries, then use the -platform option to create a new set of makefiles, and rebuild. You may also use makefile clean when building for an alternate platform in order to delete any files previous created.
The valid values are:
aix-va60 aix-va60-64 hpux-hpacc hpux-hpacc-64 redhat-gcc redhat-icc solaris-gcc solaris-sunpro solaris-sunpro-64 suse-gcc windows-msvc windows-icl
Note that some values specify more than one combination. For Windows, the option msvc represents MSVC 6 or 7.1 on either Windows 2000 or XP.
Note also that to compile the generated code, you must have the corresponding configuration file and product binaries. Configuration files for all supported platforms are provided in the conf directory in your product installation; you must install the appropriate binaries of LEIF from your product CD for the platform for which you want to compile code. For further information on using this feature, contact Rogue Wave technical support according to the terms of your license agreement.
LEIF provides an option at code generation that allows you to name the generated makefiles anything you wish. This is useful to distinguish between makefiles, especially if you are generating makefiles for different platforms.
To generate a makefile with a specific name, enter
prompt> leifgen -makefilename makefile.suse -platform suse-gcc MyProject.xml
where "suse" will be the name of the makefile, and the -platform option tells LEIF to create a makefile for the SuSE gcc platform, based on the options in a LEIF project file MyProject.xml.
When you call make or nmake, you may wish to use the clean target in order to delete all libraries and binaries created from a previous call to make using a different compiler:
UNIX/Linux | prompt> make -f makefile.suse clean |
To include third-party libraries or other includes in your project, add them to the generated include makefile, makefile.include, located in the top level of your project directory. This file is included in the top-level makefiles and supports easy customization and editing of your makefiles.
For example, the default generated makefile.include contains the following compiler and linker flags:
CPP_BASE_FLAGS= /nologo /GX /GR /Zm400 /W3 $(CONFIGDEF) LINKER_BASE_FLAGS= /nologo /LIBPATH:$(RWLEIF_HOME)\lib
So, to link in the Threads Module of SourcePro Core that ships with LEIF, add the includes and link in the library as follows:
CPP_BASE_FLAGS= /nologo /GX /GR /Zm400 /W3 $(CONFIGDEF) LINKER_BASE_FLAGS= /nologo /LIBPATH:$(RWLEIF_HOME)\lib \ thread$(TAG).lib functor$(TAG).lib tls$(TAG).lib functor_list$(TAG).lib functor_map$(TAG).lib itc$(TAG).lib pointer$(TAG)lib sync$(TAG).lib threxcept$(TAG).lib trace$(TAG).lib
Note: If you are linking the Threads Module from a different installation of SourcePro Core rather than the one that ships with LEIF, you would also need to add your SourcePro home to your makefile, as follows.
-$I$(SP_HOME)
where SP_HOME defines the directory where your SourcePro installation is located.
If you wish to customize your platform properties you can edit the makefile.include before building.
The system properties files for all supported platforms are located in your installdir\conf\common\platforms directory. LEIF uses these properties by default. To customize these properties, edit the makefile. include for your project.
©2003-2005 Copyright Quovadx, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Quovadx, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.