Web Service Development Guide : PART V HydraExpress Reference : Chapter 22 Options for Compiling : Makefile Options
Makefile Options
You may customize your makefiles using a series of code generation options. Options include control over which components get generated, assigning customized names to makefiles, and others. This section discusses the various options available.
The -noserver, -noclient, and -nosample Options
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.
The -nomake Option
You may turn off the automatic generation of makefiles by using the -nomake option at code generation:
 
prompt> rwsfgen -projectname MyProject -nomake MyProject.wsdl
Customizing the Name of a Makefile
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 generated for different purposes.
For example, say you have a project for a service that may or may not use database access for its data needs. To create two variants of this project, you might enter something like:
 
prompt> rwsfgen -makefilename makefile.db MyProject-DB.xml
where “makefile.db” will be the name of the makefile, and the options in a HydraExpress project file MyProject-DB.xml are appropriate for the database variant of the service.
When you call make or nmake, you may wish to use the clean target in order to delete all libraries and binaries created from the previous call to make, since the artifacts created may vary between to two variants of the project.
<prompt> make -f makefile.db clean
Adding Third Party Includes to Makefiles
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 for the Windows platform contains the following compiler and linker flags:
 
CPP_BASE_FLAGS= /nologo /EHsc /GR /Zm400 /W3 $(CONFIGDEF)
LINKER_BASE_FLAGS= /LIBPATH:$(BUILDSPACE)/lib /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 /EHsc /GR /Zm400 /W3 $(CONFIGDEF)
 
LINKER_BASE_FLAGS= /LIBPATH:$(BUILDSPACE)/lib /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.
Customizing Systems Properties
The system properties files for all supported platforms are located in your <installdir>\conf\common\platforms directory. HydraExpress uses these properties by default when generating the file makefile.include. To customize these properties for a particular project, edit its makefile.include file. To change the default properties for all projects, edit the file for your platform in <installdir>\conf\common\platforms.