You can specify any number of targets for a build. For example, you can build several libraries and the executable file that uses those libraries in one build. Simply specify each library and the executable as target files.
If
your sources are C source files or object files, you can reuse
them within one build as often as you want, to build any number
of targets.
The
one-definition rule limits the way you can reuse C++ source files
in one codestore. You you cannot refine external functions or
variables in the codestore. Therefore, you sometimes need more
than one codestore to build more than one target. If two or more
of the targets contain common external functions or variables,
you must have different codestores for the targets that conflict.
Here are the most common combinations of targets, sources, and
options for which you need separate codestores:
There are two approaches you can take for builds:
The IDE works with a single configuration file and you must have a separate project for each configuration file. However, You can close one project and open another in a single IDE session.
The IDE builds a single codestore. Every time you build from the same configuration file in one IDE session, the codestore is overridden. Also, the value of environment variables is set when the IDE opens and cannot be changed in an IDE session. Therefore, the conditional logic in your configuration file should depend on local variables, which you can change between builds, rather than on environment variables.
You can automate a build that requires more than one codestore the following way:
or
Create another configuration file that contains a sequence of run directives, each of which issues a vacbld command. This method removes the need for a makefile. However, it may be less convenient if you use environment variables, because you cannot assign values to environment variables in a configuration file.
![]()
Configuration Files
Codestore
One-Definition Rule
Conditional Processing in
Builds
When to Use Makefiles
![]()
Add or Change Source
Files
Add or Change Targets
Change a Build Setup
Build
Run the Make
Utility
