BETA support through Make.gfxtools.rules

This feature allows you to have a RELEASE version and a BETA version of your libraries and programs. That way you can provide users with a stable release while you keep developing the code in the BETA version. Users will have the option of linking against BETA libraries, or using BETA programs, at their own risk. They know is a non-released version and they have to explicitly modify their Makefiles to add the a '-BETA' flag.

Compiling and installing BETA libraries

For static libraries there is no change in the compiler flags. You compile the libraries normally. It's only the installation flags that need to be changed so that the -BETA versions of the library and include files get installed.
  1. Make a 'install-beta' rule. Here's an example of how to make a 'install-beta' rule in your Makefile:
     install:   inst-config inst-libs inst-h 
     install-beta:  inst-config-beta inst-libs-beta inst-h-beta 
    All the 'inst-*' rules defined in Make.gfxtools.rules have their '-beta' counterpart.

Linking against BETA libraries

You will only need to make changes in your program's Makefile. The '#include' lines in your code will not need any changes.
  1. The first thing you will need to do is create a list of all your libraries as variables in your Makefile. That is, you will go from something like this:
     G_INCLUDE_DIRS =	. vrjuggler-1.0.6 mynewlibrary-2.0 
     DEBUG_LIBS =	vrjuggler-1.0.6-d mynewlibrary-2.0-d 
    to this:
     VRJUGGLER_LIB = vrjuggler-1.0.6  
     MYNEWLIBR_LIB = mynewlibrary-2.0  
     G_INCLUDE_DIRS =	. $(VRJUGGLER_LIB) $(MYNEWLIBR_LIB) 
     DEBUG_LIBS =	. $(VRJUGGLER_LIB)-d $(MYNEWLIBR_LIB)-d 
    Separating your library names like this will allow you to easily control the version you use for each library, without having to change their name in multiple places.
  2. The second change will be to add support for the use of -BETA libraries. This is done ONLY IN YOUR INCLUDE LINES. You don't need to change the LIB lines. For each library that you want to add BETA support for, you will need to call a function defined in the Make.gfxtools.rules file. Following the previous example, we will add BETA support to the 'mynewlibrary' library. The include lines will change from this:
     G_INCLUDE_DIRS =	. $(VRJUGGLER_LIB) $(MYNEWLIBR_LIB) 
    to this:
     G_INCLUDE_DIRS =	. $(VRJUGGLER_LIB) $(call supportBetaIncludeDir,$(MYNEWLIBR_LIB)) 
    IMPORTANT!! Do this only for the INCLUDE directories. Don't change your LIB directories.
  3. You are done! Now each time you want to compile your program against a BETA library, all you need to do is add a '-BETA' flag to your library name. Here's an example following the previous one:
     MYNEWLIBR_LIB = mynewlibrary-2.0-BETA  

Installing the BETA version of your program

  1. The same as for the libraries, you will have to add a new 'install-beta' rule to your Makefile. For example:
     install: inst-doc inst-config inst-progs 
     install-beta: inst-doc-beta inst-config-beta inst-progs-beta