GBS Logo Generic Build Support (GBS) - User Manual HOME
Create a GBS-WA/System
Creating a new GBS-WA is serious business.
A good understanding of the concept and principles of GBS is needed.
Once done however, things get extremely simple, convenient and fast.

Before you start

Make sure you have read and understood the items as mentioned under "basics':
Have the following information ready at hand: See the sections below on how to decide on the names mentioned above.

Example

For the explanation below a 'Hello world' implementation is used as example: We will be using the MinGW environment under Windows.
You can obtain MinGW via SourceForge/MinGW
Be sure you install it in a Hard Versioned Directory e.g: C:\WinGW\2013072200.
You only need to install Basic Setup: mingw32-base for this exercise.

Creating the GBS-WA

Make sure your 'Site' is defined in GBS
We will now proceed to create a SubSystem

Creating a Subsystem

We will now proceed to create a Component

Creating a Component

We will now proceed to create a file and compile it

Getting one file to compile

Setup Editor

You probably want to use your own editor:

Create and edit the file

Now we create the file:

Adjust the Target-environment

You can try to compile the file with gbsgen hello.c, but that will fail

Compile the file

Repeat until no more errors: Note: You need not be in the src directory when you execute a gbsgen.
We will now proceed to create the executable

Creating the executable

For linking we need a .glk file in the src directory

Create the .glk file

Link the .glk file

We will now proceed to export the executable

Exporting the executable

For the Export we will need an export.gbs file in the component.

Create export.gbs file

We will assume that this executable is for a customer called FOO

Export the file

Generate in the Batch

If at a later stage you want to view your gbssysgen logfiles:

Adding a Target

The previously defined Target will generate our FINAL (non-debug) version.
But we also want a DEBUG version: It is done now. You can generate single stuff for a single Target with gbsgen and use swt to switch Targets.
Enter gbssysgen and observe how the system is generated for both Targets in parallel.

Creating a non-GBS SubSystem

TBS

Interfacing with the outside-world

System (Root)

switch.gbs(.bat/.sh)

This file resides in the $GBS_ROOT_PATH directory.
It is a script that is executed every time GBS makes a System (Root) current.
Its purpose is to define the particularities of the general building environment of the selected System.
e.g.: Here you want to make sure you are using the proper environment for your particular System.
Have a look at the contents of this file.
It is maintained by the GBS Administrator and must be under SCM control.
Note that at the moment of invocation all environment variables for that Root have been set.

switch.usr(.bat./sh)

This optional file also resides in the $GBS_ROOT_PATH directory.
It is an optional script that is executed every time GBS makes a System current.
And after the switch.gbs mentioned above has been executed.
Its purpose is to enable a developer to (re-) define the particularities of the general building environment of the selected System.
It is maintained by the Developer and must never be under SCM control.

Note: If you change any of these two files you must swr . for them to take effect.