Previous Next
Technical overview

The primary reason for the interdicting an automated Makefile generation feature in SNiFF+ was to "make" projects more manageable and easier to maintain from a build perspective. When new files or targets are added to a project, developers typically don't want to be involved in the modification of Makefiles because Makefiles tend to be very complex and changing Makefiles could have wide ranging side-effects on the overall system.

SNiFF+ knows which source files belong to a project and extracts include dependencies for browsing purposes. Hence, SNiFF+ could easily use its symbol database together with generic rules about how to build executables, libraries, etc. to generate Makefiles. SNiFF+ can derive file dependencies of source and header files, generate include paths for header files that are part of the project structure, and automatically update Makefiles when new files are added to a project.

Each time a SNiFF+ project is created, a project Makefile is created from a Makefile template, template.Makefile , located in the $SNIFF_DIR/config directory. This Makefile includes Make Support files, e.g. macros.incl . As a matter of fact, SNiFF+ never modifies the project Makefile itself, SNiFF+ only updates the Make Support files. These Make Support files located in a subdirectory of each project called .sniffdir , should not be modified by the user. The general makefiles, general.mk , general. <language> .mk and <platform> .mk are located in the $SNIFF_DIR/make_support directory.

    Note for Windows users
    In the following section, there are several references to symbolic links. Windows does not, however, support symbolic links. So, wherever symbolic links are created by SNiFF+ on Unix, local copies are made on Windows. Therefore, if you are working on Windows, please read all references to "symbolic links" as "local copies" in the following.

Features
SNiFF+'s Make Support:

Specifying your compiler
SNiFF+ does not have its own compiler. To compile in SNiFF+, you must have a compiler installed on your computer. By default, the following compiler is specified in your Platform Makefile:
  • On Unix

  • The gnu compiler
  • On Windows

  • Microsoft Developer Studio
If you use any other compiler to compile SNiFF+ projects, please specify it in your Platform Makefile. For information about Platform Makefiles, see Platform Makefile. The Platform Makefile then uses dependency and include path information from your Project Makefile. For information about Project Makefiles, see Project Makefile. In addition, make sure that your
PATH environment variable points to the compiler you are using.
Building targets when using team working environments
If you use SNiFF+'s working environments with your team software development projects, you must use SNiFF+'s Make Support in its entirety (i.e., including Makefiles and Make Support Files) for building your object files and targets.
SNiFF+'s Make Support allows you to take full advantage of working environments by providing a mechanism for automatically sharing source and object files between members of a team. As a result, it is not possible to use "normal" Makefiles with shared working environments.
Sharing source files
SNiFF+ uses an internal sharing mechanism for source files. This mechanism allows SNiFF+ to know exactly which project source files are shared (only found in shared working environments) and which are checked out to a PWE (contained in local project directories). However, this internal sharing mechanism is not supported by standard Make implementations, which expect that all source files needed to build the object files for the local target are also located in the local directory. If this is not the case, SNiFF+ creates symbolic links in your PWE to shared source files in your team's SSWE where appropriate. These symbolic links are automatically created when you open a project in your PWE or when needed.
When you check out a shared source file to your PWE, SNiFF+ removes the symbolic link and then makes a local copy of the file.

    Note
    Project Makefiles in a PWE are always symbolic links to those in the accessed SSWE, since Make assumes that Makefiles are stored in local directories.

Sharing object files
SNiFF+ also creates symbolic links in your PWE to shared object files and targets in your team's SOWE. This is done by means of a special help target, symbolic_links.
Before compiling source files and building targets locally in your PWE, we recommend that you first build (run) symbolic_links. This will reduce disk space and speed up compilation time by eliminating unnecessary recompilation and relinking.
To find out how to build symbolic_links, please refer to Building the help targets.
When you build targets in your PWE, SNiFF+'s Make Support first checks whether any object files need to be rebuilt or whether any targets need to be relinked. If so, SNiFF+ removes it and then rebuilds it (same principle applies to a target that needs to be relinked).