Sophie

Sophie

distrib > Mageia > cauldron > x86_64 > by-pkgid > 0c4fc8a7defbac40bfcff8f80a768649 > files > 14

bam-0.5.1-2.mga7.x86_64.rpm

This section is a short introduction to bam and is designed to get
you started quickly.

@GROUP Your first script @END

{{{{
1: settings = NewSettings()
2: source = Collect("src/*.c")
3: objects = Compile(settings, source)
4: exe = Link(settings, "my_app", objects)
}}}}

Line 1 creates a new settings object. This contains all the settings
on how to compile, link etc. See [NewSettings].

Line 2 gathers all the files under the src/ directory which has .c as
extention. Collect returns a table of strings which are the files.
See [Collect].

Line 3 compiles the source using the specified settings and returns a
table of the object files. See [Compile].

Line 4 links the object files to an executable named "my_app", using
the specified settings. See [Link].