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> rwsfgen -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 code generation 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> rwsfgen -projectname MyProject -nomake MyProject.wsdl
HydraExpress supports the creation of makefiles for any supported OS/compiler combination. When you generate code, by default HydraExpress 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> rwsfgen -projectname MyProject -platform solaris-gcc myProject.wsdl
For the above command, HydraExpress generates makefiles gcc for Solaris based on MyProject.wsdl. If previously-generated code exists in the code generation directory, and no new options were provided that would change the generated classes, HydraExpress just generates new makefiles.
Generated makefiles with the default name makefile are overwrite protected, meaning that if the code generation directory contains existing makefiles named makefile or makefile_debug, HydraExpress appends a ".sample" extension to avoid overwriting them. (See Section 20.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 22.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:
redhat-gcc suse-gcc windows-msvc
Note that some values specify more than one combination. For Windows, the option windows-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 HydraExpress 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.
HydraExpress 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> rwsfgen -makefilename makefile.suse -platform suse-gcc MyProject.xml
where "suse" will be the name of the makefile, and the -platform option tells HydraExpress to create a makefile for the SuSE gcc platform, based on the options in a HydraExpress 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 code generation 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:$(RWSF_HOME)\lib
So, if you are using SourcePro and wish to link in the Threads Module, add the includes and link in the library as follows:
CPP_BASE_FLAGS= /nologo /GX /GR /Zm400 /W3 $(CONFIGDEF) LINKER_BASE_FLAGS= /nologo /LIBPATH:$(RWSF_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 -$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. HydraExpress uses these properties by default. To customize these properties, edit the makefile.include for your project.
© Copyright Rogue Wave Software, Inc. All Rights Reserved. All Rights Reserved. Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. HydraExpress is a trademark of Rogue Wave Software, Inc. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.