Release RMC-06.02
(2024-04-29)
|
ContentsDescriptionBuilding basics| The difference between GBSBUILD and GBSMAKE| Specifying Files in GBSBUILD, GBSMAKE and GBSAUDIT| Specifying FLAGS (-D)| Specifying Derived Filetypes (.o)| Specifying Search Paths (for -I and -L)
DescriptionBuilding basicsThere are two commands to be used for building (generating code): gbsbuild and gbsmake.Each command is used for all aspects of building: compile, archive, link, test. They are almost alike for the difference see the next chapter below. gbsbuild is straightforward. gbsmake requires some explanation. gbsmakegbsmake needs a 'make'-file.The gbsmakemake command creates a make-file per SubSystem and Build. You only need to run gbsmakemake when your include-structure changes. Note that the system-wide gbssysbuild and gbssysmake will always create new make-files (implicit makemake). gbsmakemakegbsmakemake will parse all the Component src-files in a SubSystem to detect dependencies and create one (big) make-file per Component with no macros at all. This makes 'make' super-fast.To be able to do this, gbsmakemake needs to know where the compiler gets its include-files. All other include-paths are derived from the GBS file-structure. The compiler include-files are found via GBSEXT_plugin>_PATH which is a combination of GBSEXT_plugin>_ROOT and GBSEXT_plugin>_REL. A wrong '_REL.' may cause gbsmakemake to fail. gbsmakemake has no knowledge of conditional includes (speed). Sometimes the include file may not be available (i.e. because of platform dependency). If all fails, you can put dummy files (stubs) in the makemake_stubs directory in sysbuild to satisfy gbsmakemake. The difference between GBSBUILD and GBSMAKEgbsbuild
gbsmake
Specifying Files in GBSBUILD, GBSMAKE and GBSAUDITSyntaxThe generic syntax to specify files in GBSBUILD, GBSMAKE and GBSAUDIT is:
gbsbuild, gbsauditoptions1 if present, will be passed to all file-generations options2 if present, will be passed to all file-generations preceding the options2 gbsmakeoptions1 if present, will be passed to 'make' options2 cannot be present in gbsmake. Use the GBS_FLAGS_type to specify options with gbsmake. Typical use of GBSBUILD:
gbsbuild my_file.c -DTEST comp1.c comp2:test.c -DTEST2
This results in:
Specifying FLAGS (-D)There are predefined FLAGS for Debug-Mode, Debugger, Optimizer and Map-files
Flags will be placed behind the generation scripts own flags in the following order
Specifying Derived Filetypes (.o)For 'make', GLKBT,
gbsexport and script files a platform/tool independent notation is used. Specifying Search Paths (for -I and -L)Include Paths are passed to the generation scripts in the following order
Note that the contents of the incs_TYPE.gbs files must refer to directories outside the current (Sub)System. Do not prefix directories (with -I or -L) |