1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
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].
|